mirror of
https://github.com/tcsenpai/pensieve.git
synced 2025-06-06 03:05:25 +00:00
chore: use pyproject.toml
This commit is contained in:
parent
e19ebe6054
commit
a8709ee715
7
.github/workflows/release.yml
vendored
7
.github/workflows/release.yml
vendored
@ -23,7 +23,7 @@ jobs:
|
|||||||
node-version: '20'
|
node-version: '20'
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: |
|
run: |
|
||||||
pip install setuptools wheel twine
|
pip install build
|
||||||
- name: Build web assets
|
- name: Build web assets
|
||||||
run: |
|
run: |
|
||||||
cd web
|
cd web
|
||||||
@ -31,14 +31,14 @@ jobs:
|
|||||||
npm run build
|
npm run build
|
||||||
- name: Build Python package
|
- name: Build Python package
|
||||||
run: |
|
run: |
|
||||||
python setup.py sdist bdist_wheel
|
python -m build
|
||||||
- uses: actions/upload-artifact@v4
|
- uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: dist
|
name: dist
|
||||||
path: dist
|
path: dist
|
||||||
|
|
||||||
release:
|
release:
|
||||||
needs: build
|
needs: build
|
||||||
name: Upload release to PyPI
|
name: Upload release to PyPI
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
environment:
|
environment:
|
||||||
@ -53,4 +53,3 @@ jobs:
|
|||||||
path: dist
|
path: dist
|
||||||
- name: Publish package distributions to PyPI
|
- name: Publish package distributions to PyPI
|
||||||
uses: pypa/gh-action-pypi-publish@release/v1
|
uses: pypa/gh-action-pypi-publish@release/v1
|
||||||
|
|
||||||
|
43
pyproject.toml
Normal file
43
pyproject.toml
Normal file
@ -0,0 +1,43 @@
|
|||||||
|
[build-system]
|
||||||
|
requires = ["setuptools>=45", "wheel"]
|
||||||
|
build-backend = "setuptools.build_meta"
|
||||||
|
|
||||||
|
[project]
|
||||||
|
name = "memos"
|
||||||
|
version = "0.2.0"
|
||||||
|
description = "A package for memos"
|
||||||
|
readme = "README.md"
|
||||||
|
authors = [{ name = "arkohut" }]
|
||||||
|
license = { file = "LICENSE" }
|
||||||
|
classifiers = [
|
||||||
|
"Programming Language :: Python :: 3",
|
||||||
|
"License :: OSI Approved :: Apache Software License",
|
||||||
|
"Operating System :: OS Independent",
|
||||||
|
]
|
||||||
|
requires-python = ">=3.10"
|
||||||
|
dependencies = [
|
||||||
|
"fastapi",
|
||||||
|
"uvicorn",
|
||||||
|
"httpx",
|
||||||
|
"pydantic",
|
||||||
|
"sqlalchemy",
|
||||||
|
"typer",
|
||||||
|
"magika",
|
||||||
|
"pydantic-settings",
|
||||||
|
"typesense",
|
||||||
|
"opencv-python",
|
||||||
|
"pillow",
|
||||||
|
"piexif",
|
||||||
|
]
|
||||||
|
|
||||||
|
[project.urls]
|
||||||
|
Homepage = "https://github.com/arkohut/memos"
|
||||||
|
|
||||||
|
[project.scripts]
|
||||||
|
memos = "memos.commands:app"
|
||||||
|
|
||||||
|
[tool.setuptools]
|
||||||
|
packages = ["memos"]
|
||||||
|
|
||||||
|
[tool.setuptools.package-data]
|
||||||
|
"*" = ["static/**/*"]
|
38
setup.py
38
setup.py
@ -1,37 +1 @@
|
|||||||
from setuptools import setup, find_packages
|
from setuptools import setup
|
||||||
import pathlib
|
|
||||||
|
|
||||||
here = pathlib.Path(__file__).parent.resolve()
|
|
||||||
long_description = (here / 'README.md').read_text(encoding='utf-8')
|
|
||||||
|
|
||||||
setup(
|
|
||||||
name='memos',
|
|
||||||
version='0.2.0',
|
|
||||||
packages=find_packages(),
|
|
||||||
package_data={
|
|
||||||
'': ['static/**/*'],
|
|
||||||
},
|
|
||||||
long_description=long_description,
|
|
||||||
long_description_content_type='text/markdown',
|
|
||||||
author="arkohut",
|
|
||||||
url="https://github.com/arkohut/memos",
|
|
||||||
install_requires=[
|
|
||||||
'fastapi',
|
|
||||||
'uvicorn',
|
|
||||||
'httpx',
|
|
||||||
'pydantic',
|
|
||||||
'sqlalchemy',
|
|
||||||
'typer',
|
|
||||||
'magika',
|
|
||||||
'pydantic-settings',
|
|
||||||
'typesense',
|
|
||||||
'opencv-python',
|
|
||||||
'pillow',
|
|
||||||
],
|
|
||||||
entry_points={
|
|
||||||
'console_scripts': [
|
|
||||||
'memos=memos.commands:app',
|
|
||||||
],
|
|
||||||
},
|
|
||||||
python_requires='>=3.10',
|
|
||||||
)
|
|
Loading…
x
Reference in New Issue
Block a user