An experimental GitHub action to build and test source distributions for Python packages, and optionally a wheel for pure Python packages.
jobs:
build_sdist:
name: Build source distribution
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- id: build
uses: OpenAstronomy/build-python-dist@v1jobs:
build_sdist:
name: Build source distribution
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- id: build
uses: OpenAstronomy/build-python-dist@v1
with:
test_extras: test
test_command: pytest --pyargs test_packageThe test_extras option, if specified, should contain a string (e.g. test or test,all) that will be used to determine which 'extras' should be installed when testing. The test_command option should contain the full command to use for testing the installed package (this is run from an empty temporary directory).
jobs:
build_sdist_and_wheel:
name: Build source distribution and pure-Python wheel
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- id: build
uses: OpenAstronomy/build-python-dist@v1
with:
pure_python_wheel: true
test_extras: test
test_command: pytest --pyargs test_packageIf you want to use the latest available version of this action instead
of hard-coding a specific version, you can replace
OpenAstronomy/build-python-dist@v1 by OpenAstronomy/build-python-dist@main.
To build wheels for packages with extensions, you should instead use cibuildwheel which includes a GitHub action for convenience.