From 92917e997512013a19844bef36d4222bb2f8bb07 Mon Sep 17 00:00:00 2001 From: hugary1995 Date: Thu, 9 Jul 2026 13:47:38 -0500 Subject: [PATCH] Publish a py3-none-any wheel (not just an sdist); bump to 1.1.4 The release workflow built only an sdist (`build --sdist`), so every pyzag release on PyPI is source-only. pip therefore has to *build* pyzag from source at install time -- which fails under --no-build-isolation when `wheel` isn't present in the environment (e.g. neml2's Windows/MSVC build: "error: invalid command 'bdist_wheel'"). pyzag is pure Python, so a py3-none-any wheel is universal and installs on every platform with no build step. Build both sdist and wheel (`build` with no --sdist) and publish both. Building on every push/PR also keeps the wheel build under CI. Bump 1.1.3 -> 1.1.4 so the wheel ships as a new release. Co-Authored-By: Claude Opus 4.8 (1M context) --- .github/workflows/python.yml | 24 +++++++++++++++--------- pyproject.toml | 2 +- 2 files changed, 16 insertions(+), 10 deletions(-) diff --git a/.github/workflows/python.yml b/.github/workflows/python.yml index 802dcaa..657c0c0 100644 --- a/.github/workflows/python.yml +++ b/.github/workflows/python.yml @@ -15,22 +15,28 @@ concurrency: cancel-in-progress: true jobs: - sdist: - name: Build source distribution + dist: + name: Build distributions (sdist + wheel) runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - - name: Build SDist - run: pipx run build --sdist - - name: Upload SDist + - name: Build sdist + wheel + # `build` with no --sdist produces BOTH the sdist and a py3-none-any + # wheel. pyzag is pure Python, so the wheel is universal: pip installs it + # on every platform with no build step. That matters for consumers that + # build under --no-build-isolation (e.g. neml2's Windows/MSVC build), where + # an sdist-only release forces a source build that fails without `wheel`. + # Building both on every push/PR also keeps the wheel build under CI. + run: pipx run build + - name: Upload distributions uses: actions/upload-artifact@v4 if: github.event_name == 'release' && github.event.action == 'published' with: - name: package-sdist - path: dist/*.tar.gz + name: package-dist + path: dist/* PyPI: - needs: sdist + needs: dist environment: pypi permissions: id-token: write @@ -39,7 +45,7 @@ jobs: steps: - uses: actions/download-artifact@v4 with: - pattern: package-sdist + pattern: package-dist path: dist merge-multiple: true - uses: pypa/gh-action-pypi-publish@release/v1 diff --git a/pyproject.toml b/pyproject.toml index 2bde2b5..61acb23 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta" [project] name = "pyzag" -version = "1.1.3" +version = "1.1.4" authors = [ { name="Mark Messner", email="messner@anl.gov" }, ]