Skip to content

Commit

Permalink
Publish platform and python version specific wheels
Browse files Browse the repository at this point in the history
  • Loading branch information
marvinpfoertner committed Aug 17, 2021
1 parent 9a01ea7 commit fae4e02
Show file tree
Hide file tree
Showing 5 changed files with 34 additions and 9 deletions.
28 changes: 28 additions & 0 deletions .github/workflows/python-publish-linux.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Publish Linux Python + Cython Packages

on:
release:
types: [published]

jobs:
deploy:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0 # This is needed so that all tags are loaded (these are used in setuptools_scm)
- name: Build Linux Wheels
# You may pin to the exact commit or the version.
# uses: RalfG/python-wheels-manylinux-build@34161e0af9394fc7b5140da1ae8fc861540bba8d
uses: RalfG/python-wheels-manylinux-build@v0.3.3
with:
python-versions: cp36-cp36m cp37-cp37m cp38-cp38 cp39-cp39
- name: Publish to PyPI
env:
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
run: |
python -m pip install --upgrade pip
pip install --upgrade twine
twine upload dist/*-manylinux*.whl
11 changes: 5 additions & 6 deletions .github/workflows/python-publish.yml
Original file line number Diff line number Diff line change
@@ -1,18 +1,17 @@
# This workflows will upload a Python Package using Twine when a release is created
# For more information see: https://help.github.com/en/actions/language-and-framework-guides/using-python-with-github-actions#publishing-to-package-registries

name: Upload Python Package
name: Publish Python-only Package

on:
release:
types: [created]

jobs:
deploy:
runs-on: ubuntu-latest
runs-on: 'ubuntu-latest'

steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0 # This is needed so that all tags are loaded (important for setuptools_scm)
- name: Set up Python
uses: actions/setup-python@v2
with:
Expand All @@ -31,4 +30,4 @@ jobs:
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
run: |
twine upload dist/*
twine upload dist/*-py3-none-any.whl
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ requires = [
build-backend = "setuptools.build_meta"

[tool.setuptools_scm]
local_scheme = "dirty-tag"
write_to = "src/cholupdates/_version.py"

[tool.pytest.ini_options]
Expand Down
2 changes: 0 additions & 2 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@ include_package_data = True
package_dir =
=src
zip_safe = False # Needed for Cython to work
setup_requires =
setuptools_scm[toml]>=6.0 # This is only here for compatibility reasons
install_requires =
numpy
scipy
Expand Down
1 change: 0 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,4 @@

setup(
ext_modules=ext_modules,
use_scm_version=True, # This is only here for compatibility reasons
)

0 comments on commit fae4e02

Please sign in to comment.