From 49919683c328a405fb39372c9d435b85dd0f7a04 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marco=20Mart=C3=ADnez=20Gonz=C3=A1lez?= Date: Tue, 4 Feb 2025 11:55:32 -0500 Subject: [PATCH 01/18] Add toml cibuild linux section --- pyproject.toml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pyproject.toml b/pyproject.toml index 0c426ab..8e1f522 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -103,6 +103,11 @@ build-frontend = "build" before-build = "bash {project}/tools/wheels/cibw_before_build_linux.sh" +[tool.cibuildwheel] +output-dir = "wheelhouse" +CIBW_BEFORE_ALL_LINUX = "bash ./tools/wheels/cibw_before_all_linux.sh" + + # Version management configuration [tool.setuptools_scm] # Enable setuptools-scm for version management From bd758913e1bd54c7b3bd637dfcbfc14fb4597528 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marco=20Mart=C3=ADnez=20Gonz=C3=A1lez?= Date: Tue, 4 Feb 2025 13:05:11 -0500 Subject: [PATCH 02/18] Add cibw corrections --- pyproject.toml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 8e1f522..66b93b3 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -103,9 +103,9 @@ build-frontend = "build" before-build = "bash {project}/tools/wheels/cibw_before_build_linux.sh" -[tool.cibuildwheel] -output-dir = "wheelhouse" -CIBW_BEFORE_ALL_LINUX = "bash ./tools/wheels/cibw_before_all_linux.sh" + +[tool.cibuildwheel.linux] +before-build = "bash {project}/tools/wheels/cibw_before_build_linux.sh" # Version management configuration From 24f331595d3f8f5397ad842f142e8872d4a31667 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marco=20Mart=C3=ADnez=20Gonz=C3=A1lez?= Date: Tue, 4 Feb 2025 16:20:33 -0500 Subject: [PATCH 03/18] Testing cibw workflow --- pyproject.toml | 8 ++++++++ tools/wheels/cibw_before_build_linux.sh | 4 ++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 66b93b3..0885432 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -104,6 +104,10 @@ before-build = "bash {project}/tools/wheels/cibw_before_build_linux.sh" +[tool.cibuildwheel] +# Switch to using build +build-frontend = "build" + [tool.cibuildwheel.linux] before-build = "bash {project}/tools/wheels/cibw_before_build_linux.sh" @@ -111,3 +115,7 @@ before-build = "bash {project}/tools/wheels/cibw_before_build_linux.sh" # Version management configuration [tool.setuptools_scm] # Enable setuptools-scm for version management + +[tool.setuptools.commands] +# Custom command to run `make` during the build process +build_ext = { module = "pyci.make_build_wrapper", callable = "make_build" } \ No newline at end of file diff --git a/tools/wheels/cibw_before_build_linux.sh b/tools/wheels/cibw_before_build_linux.sh index 6b38f54..925b354 100644 --- a/tools/wheels/cibw_before_build_linux.sh +++ b/tools/wheels/cibw_before_build_linux.sh @@ -29,5 +29,5 @@ python -m pip install pytest # compile library -make -make test \ No newline at end of file +# make +# make test \ No newline at end of file From 717105068b0fdd97c5024ca2e9d4fe6c9ff77c3a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marco=20Mart=C3=ADnez=20Gonz=C3=A1lez?= Date: Tue, 4 Feb 2025 16:43:05 -0500 Subject: [PATCH 04/18] New attempt to build --- build_wrapper.py | 19 +++++++++++++++++++ pyproject.toml | 2 +- 2 files changed, 20 insertions(+), 1 deletion(-) create mode 100644 build_wrapper.py diff --git a/build_wrapper.py b/build_wrapper.py new file mode 100644 index 0000000..ab33f96 --- /dev/null +++ b/build_wrapper.py @@ -0,0 +1,19 @@ +import os +import subprocess +import sys + +def build_with_make(): + # Ensure we're in the correct directory (root of the project with Makefile) + os.chdir(os.path.dirname(os.path.abspath(__file__))) + + try: + subprocess.run(["make"]) + except subprocess.CalledProcessError as e: + print("Error: make failed with exit code", e.returncode) + sys.exit(1) + + try: + subprocess.run(["make", "test"]) + except subprocess.CalledProcessError as e: + print("Error: make test failed with exit code", e.returncode) + sys.exit(1) diff --git a/pyproject.toml b/pyproject.toml index 0885432..080f392 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -118,4 +118,4 @@ before-build = "bash {project}/tools/wheels/cibw_before_build_linux.sh" [tool.setuptools.commands] # Custom command to run `make` during the build process -build_ext = { module = "pyci.make_build_wrapper", callable = "make_build" } \ No newline at end of file +build_ext = { module = "build_wrapper", callable = "build_with_make" } \ No newline at end of file From 5aaad5adcabcfc9b58e3024161b4fca02e20f373 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marco=20Mart=C3=ADnez=20Gonz=C3=A1lez?= Date: Wed, 5 Feb 2025 01:21:14 -0500 Subject: [PATCH 05/18] New attempt cibuild --- pyproject.toml | 6 +----- tools/wheels/cibw_before_build_linux.sh | 4 ++-- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 080f392..4d109a1 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -114,8 +114,4 @@ before-build = "bash {project}/tools/wheels/cibw_before_build_linux.sh" # Version management configuration [tool.setuptools_scm] -# Enable setuptools-scm for version management - -[tool.setuptools.commands] -# Custom command to run `make` during the build process -build_ext = { module = "build_wrapper", callable = "build_with_make" } \ No newline at end of file +# Enable setuptools-scm for version management \ No newline at end of file diff --git a/tools/wheels/cibw_before_build_linux.sh b/tools/wheels/cibw_before_build_linux.sh index 925b354..6b38f54 100644 --- a/tools/wheels/cibw_before_build_linux.sh +++ b/tools/wheels/cibw_before_build_linux.sh @@ -29,5 +29,5 @@ python -m pip install pytest # compile library -# make -# make test \ No newline at end of file +make +make test \ No newline at end of file From fb1ee6d92972ab941d0de84a28da1c1d0c6aba50 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marco=20Mart=C3=ADnez=20Gonz=C3=A1lez?= Date: Wed, 5 Feb 2025 12:21:31 -0500 Subject: [PATCH 06/18] Add option to include pyci package data --- pyproject.toml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pyproject.toml b/pyproject.toml index 4d109a1..f3322aa 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -104,6 +104,9 @@ before-build = "bash {project}/tools/wheels/cibw_before_build_linux.sh" +[tool.setuptools] +include_package_data = true + [tool.cibuildwheel] # Switch to using build build-frontend = "build" From b0783b01566246013811420797b458f59d34cf2b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marco=20Mart=C3=ADnez=20Gonz=C3=A1lez?= Date: Wed, 5 Feb 2025 12:25:02 -0500 Subject: [PATCH 07/18] Fix option to include pyci package data --- pyproject.toml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index f3322aa..231ff11 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -75,6 +75,7 @@ packages = [ "pyci.test", "pyci.fanci.test", ] +include_package_data = true [tool.setuptools.package-data] # Non-Python files to include in the package @@ -104,9 +105,6 @@ before-build = "bash {project}/tools/wheels/cibw_before_build_linux.sh" -[tool.setuptools] -include_package_data = true - [tool.cibuildwheel] # Switch to using build build-frontend = "build" From bb850c7dc2a95a048969ecba163390dca816ba0e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marco=20Mart=C3=ADnez=20Gonz=C3=A1lez?= Date: Wed, 5 Feb 2025 12:33:50 -0500 Subject: [PATCH 08/18] Fix option to include pyci package data --- MANIFEST.in | 7 +++++++ pyproject.toml | 1 - 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/MANIFEST.in b/MANIFEST.in index 5f28ae1..17a6d0b 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -5,3 +5,10 @@ include README.rst include doc/Makefile include doc/source/conf.py include doc/source/*.rst +include pyci/pyci.so.0 +include pyci/pyci.so.0.6.1 +include pyci/_pyci.so +include pyci/_pyci.so.0 +include pyci/_pyci.so.0.6.1 + + diff --git a/pyproject.toml b/pyproject.toml index 231ff11..4d109a1 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -75,7 +75,6 @@ packages = [ "pyci.test", "pyci.fanci.test", ] -include_package_data = true [tool.setuptools.package-data] # Non-Python files to include in the package From 565bee4f6fc42119cc8f1d88123d99d0d43448e8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marco=20Mart=C3=ADnez=20Gonz=C3=A1lez?= Date: Wed, 5 Feb 2025 15:47:53 -0500 Subject: [PATCH 09/18] Fix errors in build workflow --- .github/workflows/build_wheels.yml | 22 ++++++++-------------- 1 file changed, 8 insertions(+), 14 deletions(-) diff --git a/.github/workflows/build_wheels.yml b/.github/workflows/build_wheels.yml index a77ab8d..5409e99 100644 --- a/.github/workflows/build_wheels.yml +++ b/.github/workflows/build_wheels.yml @@ -171,16 +171,10 @@ jobs: name: ${{ matrix.python[0] }}-${{ matrix.buildplat[1] }} ${{ matrix.buildplat[2] }} ${{ matrix.buildplat[3] }} ${{ matrix.buildplat[4] }} - - - - # TODO: Test the build wheels - # - name: Test the build wheels - - # TODO: Upload the build wheels to the release publish-to-pypi: name: Publish Python distribution to PyPI + # only publish to PyPI on tag pushes if: startsWith(github.ref, 'refs/tags/') needs: @@ -196,8 +190,8 @@ jobs: - name: Download all the dists uses: actions/download-artifact@v4 with: - name: python-package-distributions path: ./wheelhouse/*.whl + name: - name: Publish distribution to PyPI uses: pypa/gh-action-pypi-publish@release/v1 env: @@ -218,13 +212,13 @@ jobs: - name: Download all the dists uses: actions/download-artifact@v4 with: - name: python-package-distributions - path: ./wheelhouse + name: + path: ./wheelhouse/* - name: Sign the dists with Sigstore uses: sigstore/gh-action-sigstore-python@v3.0.0 with: inputs: >- - ./wheelhouse/*.whl + ./wheelhouse/* - name: Create GitHub Release env: @@ -239,7 +233,7 @@ jobs: GITHUB_TOKEN: ${{ github.token }} run: >- gh release upload - "${{ github.ref_name }}" wheelhouse/** + "${{ github.ref_name }}" ./wheelhouse/* --repo "${{ github.repository }}" publish-to-testpypi: @@ -260,8 +254,8 @@ jobs: - name: Download all the dists uses: actions/download-artifact@v4 with: - name: python-package-distributions - path: wheelhouse/ + name: + path: ./wheelhouse/* - name: Publish distribution to TestPyPI uses: pypa/gh-action-pypi-publish@release/v1 with: From 019b4dcac3c36c5f6278dbf047925582d2e380b6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marco=20Mart=C3=ADnez=20Gonz=C3=A1lez?= Date: Thu, 6 Feb 2025 11:01:31 -0500 Subject: [PATCH 10/18] Add actions to publish wheels --- .github/workflows/build_wheels.yml | 79 +----------------------------- 1 file changed, 2 insertions(+), 77 deletions(-) diff --git a/.github/workflows/build_wheels.yml b/.github/workflows/build_wheels.yml index 5409e99..e438c5b 100644 --- a/.github/workflows/build_wheels.yml +++ b/.github/workflows/build_wheels.yml @@ -157,14 +157,6 @@ jobs: mv ./wheelhouse/*.whl $(find ./wheelhouse -type f -name '*.whl' | sed 's/13_0/14_0/') fi - # - name: Test the build wheels - # run: | - # # Install the built wheels - # pip install pytest - # pip install ./wheelhouse/*.whl - # # Test the installed wheels - # pytest project/pyci - - uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3 with: path: ./wheelhouse/*.whl @@ -190,76 +182,9 @@ jobs: - name: Download all the dists uses: actions/download-artifact@v4 with: - path: ./wheelhouse/*.whl - name: + path: wheelhouse - name: Publish distribution to PyPI uses: pypa/gh-action-pypi-publish@release/v1 env: TWINE_USERNAME: "__token__" - TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }} - - github-release: - name: Sign the Python distribution with Sigstore and upload them to GitHub Release - needs: - - publish-to-pypi - runs-on: ubuntu-latest - - permissions: - contents: write - id-token: write - - steps: - - name: Download all the dists - uses: actions/download-artifact@v4 - with: - name: - path: ./wheelhouse/* - - name: Sign the dists with Sigstore - uses: sigstore/gh-action-sigstore-python@v3.0.0 - with: - inputs: >- - ./wheelhouse/* - - - name: Create GitHub Release - env: - GITHUB_TOKEN: ${{ github.token }} - run: >- - gh release create - "${{ github.ref_name }}" - --repo "${{ github.repository }}" - --notes "" - - name: Upload artifact signatures to GitHub Release - env: - GITHUB_TOKEN: ${{ github.token }} - run: >- - gh release upload - "${{ github.ref_name }}" ./wheelhouse/* - --repo "${{ github.repository }}" - - publish-to-testpypi: - name: Publish Python distribution to TestPyPI - # if: ${{ github.ref == "refs/heads/master" && github.repository_owner == "theochem" }} - needs: - - build_wheels - runs-on: ubuntu-latest - - environment: - name: TestPyPI - url: https://test.pypi.org/project/${{ env.PYPI_NAME }} - - permissions: - id-token: write - - steps: - - name: Download all the dists - uses: actions/download-artifact@v4 - with: - name: - path: ./wheelhouse/* - - name: Publish distribution to TestPyPI - uses: pypa/gh-action-pypi-publish@release/v1 - with: - repository-url: https://test.pypi.org/legacy/ - env: - TWINE_USERNAME: "__token__" - TWINE_PASSWORD: ${{ secrets.TEST_PYPI_TOKEN }} + TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }} \ No newline at end of file From 41701bb6351578586361796744f20f10e4d7b28e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marco=20Mart=C3=ADnez=20Gonz=C3=A1lez?= Date: Thu, 6 Feb 2025 11:34:24 -0500 Subject: [PATCH 11/18] Add fix to actions to publish wheels --- .github/workflows/build_wheels.yml | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/.github/workflows/build_wheels.yml b/.github/workflows/build_wheels.yml index e438c5b..962702e 100644 --- a/.github/workflows/build_wheels.yml +++ b/.github/workflows/build_wheels.yml @@ -144,7 +144,7 @@ jobs: CIBW_ARCHS: ${{ matrix.buildplat[2] }} CIBW_PRERELEASE_PYTHONS: True CIBW_FREE_THREADED_SUPPORT: True - CIBW_OUTPUT_DIR: ./wheelhouse + CIBW_OUTPUT_DIR: ./dist CIBW_BUILD_VERBOSITY: 2 CIBW_ENVIRONMENT: CFLAGS="-I/project/pyci/include" LDFLAGS="-L/project/pyci" @@ -154,23 +154,29 @@ jobs: # macos-x86_64-accelerate wheels targeting macos-14 were renamed to 13 # so they could be tested. Shift wheel name back to targeting 14. if [[ ${{ matrix.buildplat[0] }} == 'macos-13' && ${{ matrix.buildplat[4] }} == '14.0' ]]; then - mv ./wheelhouse/*.whl $(find ./wheelhouse -type f -name '*.whl' | sed 's/13_0/14_0/') + mv ./dist/*.whl $(find ./dist -type f -name '*.whl' | sed 's/13_0/14_0/') fi - uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3 with: - path: ./wheelhouse/*.whl + path: ./dist/*.whl name: ${{ matrix.python[0] }}-${{ matrix.buildplat[1] }} ${{ matrix.buildplat[2] }} ${{ matrix.buildplat[3] }} ${{ matrix.buildplat[4] }} + merge-build-artifacts: + runs-on: ubuntu-latest + needs: build_wheels + steps: + - name: python-package-distributions + uses: actions/upload-artifact/merge@v4 + publish-to-pypi: name: Publish Python distribution to PyPI - # only publish to PyPI on tag pushes if: startsWith(github.ref, 'refs/tags/') needs: - - build_wheels + - merge-build-artifacts runs-on: ubuntu-latest environment: name: PyPI-Release @@ -182,7 +188,8 @@ jobs: - name: Download all the dists uses: actions/download-artifact@v4 with: - path: wheelhouse + name: python-package-distributions + path: dist/ - name: Publish distribution to PyPI uses: pypa/gh-action-pypi-publish@release/v1 env: From cebcbfa176ceda46a6a5827ae8e54bec9cd72296 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marco=20Mart=C3=ADnez=20Gonz=C3=A1lez?= Date: Thu, 6 Feb 2025 11:52:20 -0500 Subject: [PATCH 12/18] Add fix to actions to publish wheels --- .github/workflows/build_wheels.yml | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/.github/workflows/build_wheels.yml b/.github/workflows/build_wheels.yml index 962702e..b4aa489 100644 --- a/.github/workflows/build_wheels.yml +++ b/.github/workflows/build_wheels.yml @@ -164,19 +164,13 @@ jobs: ${{ matrix.buildplat[2] }} ${{ matrix.buildplat[3] }} ${{ matrix.buildplat[4] }} - merge-build-artifacts: - runs-on: ubuntu-latest - needs: build_wheels - steps: - - name: python-package-distributions - uses: actions/upload-artifact/merge@v4 publish-to-pypi: name: Publish Python distribution to PyPI # only publish to PyPI on tag pushes if: startsWith(github.ref, 'refs/tags/') needs: - - merge-build-artifacts + - build_wheels runs-on: ubuntu-latest environment: name: PyPI-Release @@ -185,11 +179,11 @@ jobs: id-token: write steps: - - name: Download all the dists - uses: actions/download-artifact@v4 - with: - name: python-package-distributions - path: dist/ + - name: Download all artifacts + run: | + for artifact in $(gh run list-artifacts --run-id ${{ github.run_id }}); do + gh run download-artifact "$artifact" -p ./dist + done - name: Publish distribution to PyPI uses: pypa/gh-action-pypi-publish@release/v1 env: From a7b4f28e376d5542b3fb025707a76b2c275ca53c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marco=20Mart=C3=ADnez=20Gonz=C3=A1lez?= Date: Thu, 6 Feb 2025 11:59:47 -0500 Subject: [PATCH 13/18] Simplify matrix (temporal) for speed and add fixes to pypi workflow --- .github/workflows/build_wheels.yml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build_wheels.yml b/.github/workflows/build_wheels.yml index b4aa489..5a33f3a 100644 --- a/.github/workflows/build_wheels.yml +++ b/.github/workflows/build_wheels.yml @@ -38,8 +38,8 @@ jobs: buildplat: # Different architectures are in different jobs because the need of different compiler configurations - [ubuntu-22.04, manylinux, x86_64, "", ""] - - [ubuntu-22.04, musllinux, x86_64, "", ""] - - [ubuntu-24.04-arm, manylinux, aarch64, "", ""] + # - [ubuntu-22.04, musllinux, x86_64, "", ""] + # - [ubuntu-24.04-arm, manylinux, aarch64, "", ""] # - [ubuntu-24.04-arm, musllinux, aarch64, "", ""] # - [macos-13, macosx, x86_64, openblas, "10.13"] # - [macos-13, macosx, x86_64, accelerate, "14.0"] @@ -47,7 +47,8 @@ jobs: # - [macos-14, macosx, arm64, accelerate, "14.0"] # - [windows-2019, win, AMD64, "", ""] # python[0] is the python version of the wheel and python[1] is the python version of the configuration - python: [["cp39", "3.9"],["cp310", "3.10"], ["cp311", "3.11"], ["cp312", "3.12"], ["cp313", "3.13"]] + # python: [["cp39", "3.9"],["cp310", "3.10"], ["cp311", "3.11"], ["cp312", "3.12"], ["cp313", "3.13"]] + python: [["cp39", "3.9"]] env: # set 32-bit flag accessable in the build script @@ -159,7 +160,7 @@ jobs: - uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3 with: - path: ./dist/*.whl + path: dist/ name: ${{ matrix.python[0] }}-${{ matrix.buildplat[1] }} ${{ matrix.buildplat[2] }} ${{ matrix.buildplat[3] }} ${{ matrix.buildplat[4] }} From e89cd1581755f6b2f12bce7951c69dea17503d60 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marco=20Mart=C3=ADnez=20Gonz=C3=A1lez?= Date: Thu, 6 Feb 2025 12:21:44 -0500 Subject: [PATCH 14/18] Simplify matrix (temporal) for speed and add fixes to pypi workflow --- .github/workflows/build_wheels.yml | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/.github/workflows/build_wheels.yml b/.github/workflows/build_wheels.yml index 5a33f3a..33f0623 100644 --- a/.github/workflows/build_wheels.yml +++ b/.github/workflows/build_wheels.yml @@ -145,7 +145,7 @@ jobs: CIBW_ARCHS: ${{ matrix.buildplat[2] }} CIBW_PRERELEASE_PYTHONS: True CIBW_FREE_THREADED_SUPPORT: True - CIBW_OUTPUT_DIR: ./dist + CIBW_OUTPUT_DIR: ./wheelhouse CIBW_BUILD_VERBOSITY: 2 CIBW_ENVIRONMENT: CFLAGS="-I/project/pyci/include" LDFLAGS="-L/project/pyci" @@ -155,17 +155,16 @@ jobs: # macos-x86_64-accelerate wheels targeting macos-14 were renamed to 13 # so they could be tested. Shift wheel name back to targeting 14. if [[ ${{ matrix.buildplat[0] }} == 'macos-13' && ${{ matrix.buildplat[4] }} == '14.0' ]]; then - mv ./dist/*.whl $(find ./dist -type f -name '*.whl' | sed 's/13_0/14_0/') + mv ./wheelhouse/*.whl $(find ./wheelhouse -type f -name '*.whl' | sed 's/13_0/14_0/') fi - uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3 with: - path: dist/ + path: wheelhouse name: ${{ matrix.python[0] }}-${{ matrix.buildplat[1] }} ${{ matrix.buildplat[2] }} ${{ matrix.buildplat[3] }} ${{ matrix.buildplat[4] }} - publish-to-pypi: name: Publish Python distribution to PyPI # only publish to PyPI on tag pushes @@ -189,4 +188,4 @@ jobs: uses: pypa/gh-action-pypi-publish@release/v1 env: TWINE_USERNAME: "__token__" - TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }} \ No newline at end of file + TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }} From fcc909fd39c57c42acc245b0e731f3b63752ba05 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marco=20Mart=C3=ADnez=20Gonz=C3=A1lez?= Date: Thu, 6 Feb 2025 12:27:35 -0500 Subject: [PATCH 15/18] Add fixes to pypi workflow --- .github/workflows/build_wheels.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build_wheels.yml b/.github/workflows/build_wheels.yml index 33f0623..f37df2c 100644 --- a/.github/workflows/build_wheels.yml +++ b/.github/workflows/build_wheels.yml @@ -182,8 +182,10 @@ jobs: - name: Download all artifacts run: | for artifact in $(gh run list-artifacts --run-id ${{ github.run_id }}); do - gh run download-artifact "$artifact" -p ./dist + gh run download-artifact "$artifact" -p ./wheelhouse done + mkdir -p dist + mv wheelhouse/*.whl dist/ - name: Publish distribution to PyPI uses: pypa/gh-action-pypi-publish@release/v1 env: From 8b43d24c72d87bc0987bdea6ac1e7bbab711fba0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marco=20Mart=C3=ADnez=20Gonz=C3=A1lez?= Date: Thu, 6 Feb 2025 17:21:02 -0500 Subject: [PATCH 16/18] Add fixes to pypi workflow --- .github/workflows/build_wheels.yml | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/.github/workflows/build_wheels.yml b/.github/workflows/build_wheels.yml index f37df2c..c28e5d0 100644 --- a/.github/workflows/build_wheels.yml +++ b/.github/workflows/build_wheels.yml @@ -179,15 +179,14 @@ jobs: id-token: write steps: - - name: Download all artifacts - run: | - for artifact in $(gh run list-artifacts --run-id ${{ github.run_id }}); do - gh run download-artifact "$artifact" -p ./wheelhouse - done - mkdir -p dist - mv wheelhouse/*.whl dist/ + - name: Download wheels + uses: actions/download-artifact@v4 + with: + path: dist + merge-multiple: true + - name: Publish distribution to PyPI uses: pypa/gh-action-pypi-publish@release/v1 env: TWINE_USERNAME: "__token__" - TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }} + TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }} \ No newline at end of file From 9b888a5856462ec03fc58a471e038d456f2ac1f4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marco=20Mart=C3=ADnez=20Gonz=C3=A1lez?= Date: Thu, 6 Feb 2025 17:27:46 -0500 Subject: [PATCH 17/18] Add matrix elements for other wheels --- .github/workflows/build_wheels.yml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build_wheels.yml b/.github/workflows/build_wheels.yml index c28e5d0..76f89cc 100644 --- a/.github/workflows/build_wheels.yml +++ b/.github/workflows/build_wheels.yml @@ -38,8 +38,8 @@ jobs: buildplat: # Different architectures are in different jobs because the need of different compiler configurations - [ubuntu-22.04, manylinux, x86_64, "", ""] - # - [ubuntu-22.04, musllinux, x86_64, "", ""] - # - [ubuntu-24.04-arm, manylinux, aarch64, "", ""] + - [ubuntu-22.04, musllinux, x86_64, "", ""] + - [ubuntu-24.04-arm, manylinux, aarch64, "", ""] # - [ubuntu-24.04-arm, musllinux, aarch64, "", ""] # - [macos-13, macosx, x86_64, openblas, "10.13"] # - [macos-13, macosx, x86_64, accelerate, "14.0"] @@ -47,8 +47,7 @@ jobs: # - [macos-14, macosx, arm64, accelerate, "14.0"] # - [windows-2019, win, AMD64, "", ""] # python[0] is the python version of the wheel and python[1] is the python version of the configuration - # python: [["cp39", "3.9"],["cp310", "3.10"], ["cp311", "3.11"], ["cp312", "3.12"], ["cp313", "3.13"]] - python: [["cp39", "3.9"]] + python: [["cp39", "3.9"],["cp310", "3.10"], ["cp311", "3.11"], ["cp312", "3.12"], ["cp313", "3.13"]] env: # set 32-bit flag accessable in the build script From f97496d41cb0e336880f63fef9382555991fc7e7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marco=20Mart=C3=ADnez=20Gonz=C3=A1lez?= Date: Thu, 6 Feb 2025 20:49:31 -0500 Subject: [PATCH 18/18] Remove duplicated statements in pyproject.toml --- pyproject.toml | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 4d109a1..0c426ab 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -103,15 +103,6 @@ build-frontend = "build" before-build = "bash {project}/tools/wheels/cibw_before_build_linux.sh" - -[tool.cibuildwheel] -# Switch to using build -build-frontend = "build" - -[tool.cibuildwheel.linux] -before-build = "bash {project}/tools/wheels/cibw_before_build_linux.sh" - - # Version management configuration [tool.setuptools_scm] -# Enable setuptools-scm for version management \ No newline at end of file +# Enable setuptools-scm for version management