Only build a source distribution in Github Actions (#98)
Binary distributions for Linux can't be uploaded to PyPI because of ABI incompatibilities.
We could in principle build a binary distribution for macOS, however we don't have many
macOS builders available, which means we'd increase the latency of Github Actions to
potentially hours for the purpose of building a single C++ file.
Instead, just distribute a source distribution.
diff --git a/.github/workflows/build-and-publish-package.yml b/.github/workflows/build-and-publish-package.yml
index 0e0ad36..0728661 100644
--- a/.github/workflows/build-and-publish-package.yml
+++ b/.github/workflows/build-and-publish-package.yml
@@ -17,10 +17,12 @@
uses: actions/setup-python@v5
with:
python-version: "3.10"
+ # We only build a source distribution because binary distributions for Linux can't be uploaded
+ # to PyPI. Our source distribution is trivial to build anyway.
- name: Build the source tarball
run: |
python -m pip install build
- python -m build
+ python -m build --sdist
- name: Store the distribution packages
uses: actions/upload-artifact@v4
with: