From ddedc30c0db1d4cbd2f33ea4820b3f74676a7672 Mon Sep 17 00:00:00 2001 From: David Bloomin Date: Wed, 7 Aug 2024 16:18:08 -0700 Subject: [PATCH] add workflow to build pypi --- .github/workflows/build.yaml | 41 ++++++++++++++++++++++++++++++++++++ MANIFEST.in | 4 ++++ setup.py | 18 +++++++++++++--- 3 files changed, 60 insertions(+), 3 deletions(-) create mode 100644 .github/workflows/build.yaml create mode 100644 MANIFEST.in diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml new file mode 100644 index 0000000..3669687 --- /dev/null +++ b/.github/workflows/build.yaml @@ -0,0 +1,41 @@ +name: Build and Publish + +on: + push: + tags: + - 'v*.*.*' # Trigger on version tags + +jobs: + build: + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: [ubuntu-latest, macos-latest, windows-latest] + python-version: [3.6, 3.7, 3.8, 3.9, 3.10, 3.11] + + steps: + - name: Checkout code + uses: actions/checkout@v2 + + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v2 + with: + python-version: ${{ matrix.python-version }} + + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install cibuildwheel==2.3.0 + + - name: Build wheels + run: | + cibuildwheel --output-dir wheelhouse + + - name: Upload wheels to PyPI + if: startsWith(github.ref, 'refs/tags/') + env: + TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }} + TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }} + run: | + pip install twine + twine upload wheelhouse/* diff --git a/MANIFEST.in b/MANIFEST.in new file mode 100644 index 0000000..0ff5487 --- /dev/null +++ b/MANIFEST.in @@ -0,0 +1,4 @@ +include README.md +include LICENSE +recursive-include puffergrid *.pyx *.pxd *.py +recursive-include examples *.pyx *.pxd *.py diff --git a/setup.py b/setup.py index 0a0bbcc..bbee13d 100644 --- a/setup.py +++ b/setup.py @@ -51,9 +51,21 @@ def build_ext(srcs, package="puffergrid"): }, annotate=True, ), + description='A framework for fast grid-based environments', + long_description=open('README.md').read(), + long_description_content_type='text/markdown', + author='David Bloomin', + author_email='daveey@gmail.com', + url='https://github.com/daveey/puffergrid', install_requires=[ - "numpy", - "cython", + 'numpy', + 'cython', + 'tqdm', ], - gdb_debug=True, + classifiers=[ + 'Programming Language :: Python :: 3', + 'License :: OSI Approved :: MIT License', + 'Operating System :: OS Independent', + ], + python_requires='>=3.6', )