From 25ee3fa746a709d3d71f82993c0ee67f42f2fcbd Mon Sep 17 00:00:00 2001 From: Inada Naoki Date: Sat, 2 Sep 2023 03:47:38 +0900 Subject: [PATCH] support pyproject --- .github/workflows/build.yaml | 6 +++--- MANIFEST.in | 4 +++- requirements.txt | 5 ++--- setup.cfg | 20 ++++++++++++++++++++ setup.py | 33 +++++---------------------------- 5 files changed, 33 insertions(+), 35 deletions(-) create mode 100644 setup.cfg diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 6a30b0a..dd6e8c7 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -13,7 +13,7 @@ jobs: - name: build run: | pip install -r requirements.txt - python setup.py sdist + python -m build -s - uses: actions/upload-artifact@v2 with: name: sdist @@ -45,10 +45,10 @@ jobs: shell: bash run: | pip install -r requirements.txt - python setup.py sdist # To run cythonize + python -m build -s # to run Cythonize - name: Build - uses: pypa/cibuildwheel@v2.11.2 + uses: pypa/cibuildwheel@v2.15.0 env: CIBW_ARCHS_LINUX: auto aarch64 CIBW_ARCHS_MACOS: x86_64 universal2 arm64 diff --git a/MANIFEST.in b/MANIFEST.in index 4364581..c6627a2 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -1,3 +1,5 @@ include wsaccel/*.[ch] -include README.rst include LICENSE +include README.rst +include pyproject.toml +include setup.* diff --git a/requirements.txt b/requirements.txt index b236e90..3943c73 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,3 +1,2 @@ -Cython~=0.29.32 -wheel -setuptools +build +cython diff --git a/setup.cfg b/setup.cfg new file mode 100644 index 0000000..4697258 --- /dev/null +++ b/setup.cfg @@ -0,0 +1,20 @@ +[metadata] +name = wsaccel +version = 0.6.5 +description = Accelerator for ws4py and AutobahnPython +maintainer = Inada Naoki +maintainer_email = songofacandy@gmail.com +url = https://github.com/methane/wsaccel +license = Apache 2.0 +long_description = file: README.md +long_description_content_type = text/x-rst +classifiers= + "Intended Audience :: Developers" + "Operating System :: OS Independent" + "Programming Language :: Python" + "Programming Language :: Python :: 3" + "Programming Language :: Python :: 3.9" + "Programming Language :: Python :: 3.10" + "Programming Language :: Python :: 3.11" + "Programming Language :: Python :: 3.12" + "Programming Language :: Python :: Implementation :: CPython" diff --git a/setup.py b/setup.py index 7b8e0e8..eb0ddd1 100644 --- a/setup.py +++ b/setup.py @@ -47,31 +47,8 @@ def __init__(self, *args, **kwargs): Extension('wsaccel.xormask', ['wsaccel/xormask.c']), ] -with open('README.rst', encoding='utf-8') as f: - long_description = f.read() - -setup(name="wsaccel", - version='0.6.4', - description="Accelerator for ws4py and AutobahnPython", - maintainer="Inada Naoki", - maintainer_email="songofacandy@gmail.com", - url="https://github.com/methane/wsaccel", - packages=["wsaccel"], - cmdclass={'build_ext': BuildExt, 'sdist': Sdist}, - ext_modules=ext_modules, - platforms=["any"], - license='Apache', - long_description=long_description, - classifiers=[ - 'Intended Audience :: Developers', - 'Operating System :: OS Independent', - 'Programming Language :: Python', - 'Programming Language :: Python :: 3', - 'Programming Language :: Python :: 3.7', - 'Programming Language :: Python :: 3.8', - 'Programming Language :: Python :: 3.9', - 'Programming Language :: Python :: 3.10', - 'Programming Language :: Python :: 3.11', - 'Programming Language :: Python :: Implementation :: CPython', - ], - ) +setup( + packages=["wsaccel"], + cmdclass={'build_ext': BuildExt, 'sdist': Sdist}, + ext_modules=ext_modules, +)