From 3e09a12843750a076ca84cbf351b529d4158037d Mon Sep 17 00:00:00 2001 From: Fanwang Meng Date: Thu, 12 Dec 2024 15:14:25 -0500 Subject: [PATCH 01/19] Add more Python versions --- .github/workflows/pypi_release.yaml | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/.github/workflows/pypi_release.yaml b/.github/workflows/pypi_release.yaml index fc3d7e0..e26dc6e 100644 --- a/.github/workflows/pypi_release.yaml +++ b/.github/workflows/pypi_release.yaml @@ -25,20 +25,9 @@ jobs: # os: [ubuntu-latest, macos-latest] # python-version: ["3.9", "3.10", "3.11", "3.12"] os: [ubuntu-latest] - python-version: ["3.12"] + python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"] steps: - # # TODO: Add C++ compliers - # # Fetch CUDA toolkit using Jimver/cuda-toolkit - # - name: Fetch CUDA toolkit - # uses: Jimver/cuda-toolkit@v0.2.18 - # id: cuda-toolkit - # with: - # cuda: "12.1.0" - - # - name: Check nvcc version - # run: nvcc -V - - uses: actions/checkout@v4 with: fetch-depth: 0 From 70dead24ff47f733ce48a87a728d1155d0a5ba0c Mon Sep 17 00:00:00 2001 From: Fanwang Meng Date: Thu, 12 Dec 2024 15:23:21 -0500 Subject: [PATCH 02/19] Fix wheels name including Python version information --- .github/workflows/pypi_release.yaml | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/.github/workflows/pypi_release.yaml b/.github/workflows/pypi_release.yaml index e26dc6e..416dc0e 100644 --- a/.github/workflows/pypi_release.yaml +++ b/.github/workflows/pypi_release.yaml @@ -65,8 +65,8 @@ jobs: - name: Store the distribution packages uses: actions/upload-artifact@v4 with: - name: python-package-distributions - path: dist/ + name: pyci-${{ matrix.os }}-py${{ matrix.python-version }}-v${{ github.ref_name }} + path: dist/ publish-to-pypi: name: Publish Python distribution to PyPI @@ -85,7 +85,8 @@ jobs: - name: Download all the dists uses: actions/download-artifact@v4 with: - name: python-package-distributions + # name: python-package-distributions + name: pyci-${{ matrix.os }}-*-v${{ github.ref_name }} path: dist/ - name: Publish distribution to PyPI uses: pypa/gh-action-pypi-publish@release/v1 @@ -107,7 +108,8 @@ jobs: - name: Download all the dists uses: actions/download-artifact@v4 with: - name: python-package-distributions + # name: python-package-distributions + name: pyci-${{ matrix.os }}-*-v${{ github.ref_name }} path: dist/ - name: Sign the dists with Sigstore uses: sigstore/gh-action-sigstore-python@v3.0.0 @@ -149,7 +151,8 @@ jobs: - name: Download all the dists uses: actions/download-artifact@v4 with: - name: python-package-distributions + # name: python-package-distributions + name: pyci-${{ matrix.os }}-*-v${{ github.ref_name }} path: dist/ - name: Publish distribution to TestPyPI uses: pypa/gh-action-pypi-publish@release/v1 From f7cc2f0b59755a021b148ddf2ffe47c5ab139284 Mon Sep 17 00:00:00 2001 From: Fanwang Meng Date: Thu, 12 Dec 2024 15:36:21 -0500 Subject: [PATCH 03/19] Fix wheel names --- .github/workflows/pypi_release.yaml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/pypi_release.yaml b/.github/workflows/pypi_release.yaml index 416dc0e..b96567b 100644 --- a/.github/workflows/pypi_release.yaml +++ b/.github/workflows/pypi_release.yaml @@ -60,12 +60,12 @@ jobs: run: | make make test - python -m build --sdist + python -m build --sdist --wheel - name: Store the distribution packages uses: actions/upload-artifact@v4 with: - name: pyci-${{ matrix.os }}-py${{ matrix.python-version }}-v${{ github.ref_name }} + name: pyci-${{ matrix.os }}-py${{ matrix.python-version }}-${{ github.ref_name }} path: dist/ publish-to-pypi: @@ -86,7 +86,7 @@ jobs: uses: actions/download-artifact@v4 with: # name: python-package-distributions - name: pyci-${{ matrix.os }}-*-v${{ github.ref_name }} + name: pyci-${{ matrix.os }}-*-${{ github.ref_name }} path: dist/ - name: Publish distribution to PyPI uses: pypa/gh-action-pypi-publish@release/v1 @@ -109,7 +109,7 @@ jobs: uses: actions/download-artifact@v4 with: # name: python-package-distributions - name: pyci-${{ matrix.os }}-*-v${{ github.ref_name }} + name: pyci-${{ matrix.os }}-*-${{ github.ref_name }} path: dist/ - name: Sign the dists with Sigstore uses: sigstore/gh-action-sigstore-python@v3.0.0 @@ -152,7 +152,7 @@ jobs: uses: actions/download-artifact@v4 with: # name: python-package-distributions - name: pyci-${{ matrix.os }}-*-v${{ github.ref_name }} + name: pyci-${{ matrix.os }}-*-${{ github.ref_name }} path: dist/ - name: Publish distribution to TestPyPI uses: pypa/gh-action-pypi-publish@release/v1 From 0f9b45e73d034a5d13f97c9879ab861ee2e4cedb Mon Sep 17 00:00:00 2001 From: Fanwang Meng Date: Thu, 12 Dec 2024 15:43:37 -0500 Subject: [PATCH 04/19] Fix wheel names in download artifacts --- .github/workflows/pypi_release.yaml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/pypi_release.yaml b/.github/workflows/pypi_release.yaml index b96567b..702a34a 100644 --- a/.github/workflows/pypi_release.yaml +++ b/.github/workflows/pypi_release.yaml @@ -86,7 +86,8 @@ jobs: uses: actions/download-artifact@v4 with: # name: python-package-distributions - name: pyci-${{ matrix.os }}-*-${{ github.ref_name }} + # pyci-${{ matrix.os }}-py${{ matrix.python-version }}-${{ github.ref_name }} + pattern: pyci-*-*-* path: dist/ - name: Publish distribution to PyPI uses: pypa/gh-action-pypi-publish@release/v1 @@ -109,7 +110,8 @@ jobs: uses: actions/download-artifact@v4 with: # name: python-package-distributions - name: pyci-${{ matrix.os }}-*-${{ github.ref_name }} + # name: pyci-${{ matrix.os }}-*-${{ github.ref_name }} + pattern: pyci-*-*-* path: dist/ - name: Sign the dists with Sigstore uses: sigstore/gh-action-sigstore-python@v3.0.0 @@ -152,7 +154,7 @@ jobs: uses: actions/download-artifact@v4 with: # name: python-package-distributions - name: pyci-${{ matrix.os }}-*-${{ github.ref_name }} + pattern: pyci-*-*-* path: dist/ - name: Publish distribution to TestPyPI uses: pypa/gh-action-pypi-publish@release/v1 From 3b6409f77227993bae1977a493ef27199058c8e3 Mon Sep 17 00:00:00 2001 From: Fanwang Meng Date: Thu, 12 Dec 2024 16:04:14 -0500 Subject: [PATCH 05/19] Fix naming of artifact files --- .github/workflows/pypi_release.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/pypi_release.yaml b/.github/workflows/pypi_release.yaml index 702a34a..06b834f 100644 --- a/.github/workflows/pypi_release.yaml +++ b/.github/workflows/pypi_release.yaml @@ -87,7 +87,7 @@ jobs: with: # name: python-package-distributions # pyci-${{ matrix.os }}-py${{ matrix.python-version }}-${{ github.ref_name }} - pattern: pyci-*-*-* + pattern: *pyci* path: dist/ - name: Publish distribution to PyPI uses: pypa/gh-action-pypi-publish@release/v1 @@ -111,7 +111,7 @@ jobs: with: # name: python-package-distributions # name: pyci-${{ matrix.os }}-*-${{ github.ref_name }} - pattern: pyci-*-*-* + pattern: *pyci* path: dist/ - name: Sign the dists with Sigstore uses: sigstore/gh-action-sigstore-python@v3.0.0 @@ -154,7 +154,7 @@ jobs: uses: actions/download-artifact@v4 with: # name: python-package-distributions - pattern: pyci-*-*-* + pattern: *pyci* path: dist/ - name: Publish distribution to TestPyPI uses: pypa/gh-action-pypi-publish@release/v1 From 60259627d0a7e60c431c85f62f680c94ff3a29ec Mon Sep 17 00:00:00 2001 From: Fanwang Meng Date: Thu, 12 Dec 2024 16:24:03 -0500 Subject: [PATCH 06/19] Use PYPI_NAME --- .github/workflows/pypi_release.yaml | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/.github/workflows/pypi_release.yaml b/.github/workflows/pypi_release.yaml index 06b834f..379a4df 100644 --- a/.github/workflows/pypi_release.yaml +++ b/.github/workflows/pypi_release.yaml @@ -65,7 +65,7 @@ jobs: - name: Store the distribution packages uses: actions/upload-artifact@v4 with: - name: pyci-${{ matrix.os }}-py${{ matrix.python-version }}-${{ github.ref_name }} + name: ${{ PYPI_NAME }}-${{ matrix.os }}-py${{ matrix.python-version }}-${{ github.ref_name }} path: dist/ publish-to-pypi: @@ -86,9 +86,11 @@ jobs: uses: actions/download-artifact@v4 with: # name: python-package-distributions - # pyci-${{ matrix.os }}-py${{ matrix.python-version }}-${{ github.ref_name }} - pattern: *pyci* + # ${{ PYPI_NAME }}-${{ matrix.os }}-py${{ matrix.python-version }}-${{ github.ref_name }} + pattern: ${{ PYPI_NAME }}* path: dist/ + - name: List the files in dist directory + run: ls -l dist/ - name: Publish distribution to PyPI uses: pypa/gh-action-pypi-publish@release/v1 env: @@ -110,8 +112,8 @@ jobs: uses: actions/download-artifact@v4 with: # name: python-package-distributions - # name: pyci-${{ matrix.os }}-*-${{ github.ref_name }} - pattern: *pyci* + # name: ${{ PYPI_NAME }}-${{ matrix.os }}-*-${{ github.ref_name }} + pattern: ${{ PYPI_NAME }}* path: dist/ - name: Sign the dists with Sigstore uses: sigstore/gh-action-sigstore-python@v3.0.0 @@ -154,7 +156,7 @@ jobs: uses: actions/download-artifact@v4 with: # name: python-package-distributions - pattern: *pyci* + pattern: ${{ PYPI_NAME }}* path: dist/ - name: Publish distribution to TestPyPI uses: pypa/gh-action-pypi-publish@release/v1 From b01af5b5e7658e66ffa78b99b30955a44946c46c Mon Sep 17 00:00:00 2001 From: Fanwang Meng Date: Thu, 12 Dec 2024 16:30:30 -0500 Subject: [PATCH 07/19] Fix failed name --- .github/workflows/pypi_release.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/pypi_release.yaml b/.github/workflows/pypi_release.yaml index 379a4df..47688be 100644 --- a/.github/workflows/pypi_release.yaml +++ b/.github/workflows/pypi_release.yaml @@ -65,7 +65,7 @@ jobs: - name: Store the distribution packages uses: actions/upload-artifact@v4 with: - name: ${{ PYPI_NAME }}-${{ matrix.os }}-py${{ matrix.python-version }}-${{ github.ref_name }} + name: qc-pyci-${{ matrix.os }}-py${{ matrix.python-version }}-${{ github.ref_name }} path: dist/ publish-to-pypi: @@ -87,7 +87,7 @@ jobs: with: # name: python-package-distributions # ${{ PYPI_NAME }}-${{ matrix.os }}-py${{ matrix.python-version }}-${{ github.ref_name }} - pattern: ${{ PYPI_NAME }}* + pattern: qc-pyci* path: dist/ - name: List the files in dist directory run: ls -l dist/ @@ -113,7 +113,7 @@ jobs: with: # name: python-package-distributions # name: ${{ PYPI_NAME }}-${{ matrix.os }}-*-${{ github.ref_name }} - pattern: ${{ PYPI_NAME }}* + pattern: qc-pyci* path: dist/ - name: Sign the dists with Sigstore uses: sigstore/gh-action-sigstore-python@v3.0.0 @@ -156,7 +156,7 @@ jobs: uses: actions/download-artifact@v4 with: # name: python-package-distributions - pattern: ${{ PYPI_NAME }}* + pattern: qc-pyci* path: dist/ - name: Publish distribution to TestPyPI uses: pypa/gh-action-pypi-publish@release/v1 From 3a5e7298787b7aa37dd50b6063a0815b97f4e6d1 Mon Sep 17 00:00:00 2001 From: Fanwang Meng Date: Thu, 12 Dec 2024 16:47:41 -0500 Subject: [PATCH 08/19] Uncompress the downloaded artifacts --- .github/workflows/pypi_release.yaml | 29 ++++++++++++++++------------- 1 file changed, 16 insertions(+), 13 deletions(-) diff --git a/.github/workflows/pypi_release.yaml b/.github/workflows/pypi_release.yaml index 47688be..c34d2d8 100644 --- a/.github/workflows/pypi_release.yaml +++ b/.github/workflows/pypi_release.yaml @@ -22,8 +22,6 @@ jobs: runs-on: ${{ matrix.os }} strategy: matrix: - # os: [ubuntu-latest, macos-latest] - # python-version: ["3.9", "3.10", "3.11", "3.12"] os: [ubuntu-latest] python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"] @@ -34,8 +32,6 @@ jobs: - name: Set up Python uses: actions/setup-python@v5 - # with: - # python-version: "3.12" with: python-version: ${{ matrix.python-version }} @@ -70,7 +66,6 @@ jobs: publish-to-pypi: name: Publish Python distribution to PyPI - # only publish to PyPI on tag pushes if: startsWith(github.ref, 'refs/tags/') needs: - build @@ -85,12 +80,14 @@ jobs: - name: Download all the dists uses: actions/download-artifact@v4 with: - # name: python-package-distributions - # ${{ PYPI_NAME }}-${{ matrix.os }}-py${{ matrix.python-version }}-${{ github.ref_name }} pattern: qc-pyci* path: dist/ - - name: List the files in dist directory - run: ls -l dist/ + merge-multiple: true + - name: List and uncompress the files in dist directory + run: | + ls -l dist/ + tar -xvf dist/*.tar.gz -C dist/ + - name: Publish distribution to PyPI uses: pypa/gh-action-pypi-publish@release/v1 env: @@ -111,10 +108,13 @@ jobs: - name: Download all the dists uses: actions/download-artifact@v4 with: - # name: python-package-distributions - # name: ${{ PYPI_NAME }}-${{ matrix.os }}-*-${{ github.ref_name }} pattern: qc-pyci* path: dist/ + merge-multiple: true + - name: List and uncompress the files in dist directory + run: | + ls -l dist/ + tar -xvf dist/*.tar.gz -C dist/ - name: Sign the dists with Sigstore uses: sigstore/gh-action-sigstore-python@v3.0.0 with: @@ -139,7 +139,6 @@ jobs: publish-to-testpypi: name: Publish Python distribution to TestPyPI - # if: ${{ github.ref == "refs/heads/master" && github.repository_owner == "theochem" }} needs: - build runs-on: ubuntu-latest @@ -155,9 +154,13 @@ jobs: - name: Download all the dists uses: actions/download-artifact@v4 with: - # name: python-package-distributions pattern: qc-pyci* path: dist/ + merge-multiple: true + - name: List and uncompress the files in dist directory + run: | + ls -l dist/ + tar -xvf dist/*.tar.gz -C dist/ - name: Publish distribution to TestPyPI uses: pypa/gh-action-pypi-publish@release/v1 with: From ed4203c6a490839311e70b47c521cdb466323508 Mon Sep 17 00:00:00 2001 From: Fanwang Meng Date: Thu, 12 Dec 2024 16:50:18 -0500 Subject: [PATCH 09/19] Fix syntax error --- .github/workflows/pypi_release.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/pypi_release.yaml b/.github/workflows/pypi_release.yaml index c34d2d8..2b279d6 100644 --- a/.github/workflows/pypi_release.yaml +++ b/.github/workflows/pypi_release.yaml @@ -65,7 +65,7 @@ jobs: path: dist/ publish-to-pypi: - name: Publish Python distribution to PyPI + - name: Publish Python distribution to PyPI if: startsWith(github.ref, 'refs/tags/') needs: - build @@ -95,7 +95,7 @@ jobs: TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }} github-release: - name: Sign the Python distribution with Sigstore and upload them to GitHub Release + - name: Sign the Python distribution with Sigstore and upload them to GitHub Release needs: - publish-to-pypi runs-on: ubuntu-latest @@ -138,7 +138,7 @@ jobs: --repo "${{ github.repository }}" publish-to-testpypi: - name: Publish Python distribution to TestPyPI + - name: Publish Python distribution to TestPyPI needs: - build runs-on: ubuntu-latest From 92b887f3e45f0318e54962b0b970b64d27df45ab Mon Sep 17 00:00:00 2001 From: Fanwang Meng Date: Thu, 12 Dec 2024 16:53:18 -0500 Subject: [PATCH 10/19] Fix syntax error --- .github/workflows/pypi_release.yaml | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/.github/workflows/pypi_release.yaml b/.github/workflows/pypi_release.yaml index 2b279d6..34d5f94 100644 --- a/.github/workflows/pypi_release.yaml +++ b/.github/workflows/pypi_release.yaml @@ -61,11 +61,11 @@ jobs: - name: Store the distribution packages uses: actions/upload-artifact@v4 with: - name: qc-pyci-${{ matrix.os }}-py${{ matrix.python-version }}-${{ github.ref_name }} - path: dist/ + name: qc-pyci-${{ matrix.os }}-py${{ matrix.python-version }}-${{ github.ref_name }} + path: dist/ publish-to-pypi: - - name: Publish Python distribution to PyPI + name: Publish Python distribution to PyPI if: startsWith(github.ref, 'refs/tags/') needs: - build @@ -85,8 +85,8 @@ jobs: merge-multiple: true - name: List and uncompress the files in dist directory run: | - ls -l dist/ - tar -xvf dist/*.tar.gz -C dist/ + ls -l dist/ + tar -xvf dist/*.tar.gz -C dist/ - name: Publish distribution to PyPI uses: pypa/gh-action-pypi-publish@release/v1 @@ -95,7 +95,7 @@ jobs: TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }} github-release: - - name: Sign the Python distribution with Sigstore and upload them to GitHub Release + name: Sign the Python distribution with Sigstore and upload them to GitHub Release needs: - publish-to-pypi runs-on: ubuntu-latest @@ -113,8 +113,8 @@ jobs: merge-multiple: true - name: List and uncompress the files in dist directory run: | - ls -l dist/ - tar -xvf dist/*.tar.gz -C dist/ + ls -l dist/ + tar -xvf dist/*.tar.gz -C dist/ - name: Sign the dists with Sigstore uses: sigstore/gh-action-sigstore-python@v3.0.0 with: @@ -138,7 +138,7 @@ jobs: --repo "${{ github.repository }}" publish-to-testpypi: - - name: Publish Python distribution to TestPyPI + name: Publish Python distribution to TestPyPI needs: - build runs-on: ubuntu-latest @@ -159,8 +159,8 @@ jobs: merge-multiple: true - name: List and uncompress the files in dist directory run: | - ls -l dist/ - tar -xvf dist/*.tar.gz -C dist/ + ls -l dist/ + tar -xvf dist/*.tar.gz -C dist/ - name: Publish distribution to TestPyPI uses: pypa/gh-action-pypi-publish@release/v1 with: From 8d7fc4777beb0ee41b8ea41b06e2cd221be5fc5b Mon Sep 17 00:00:00 2001 From: Fanwang Meng Date: Thu, 12 Dec 2024 17:06:32 -0500 Subject: [PATCH 11/19] Use for loop to uncompress the artifacts --- .github/workflows/pypi_release.yaml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/.github/workflows/pypi_release.yaml b/.github/workflows/pypi_release.yaml index 34d5f94..7d45fee 100644 --- a/.github/workflows/pypi_release.yaml +++ b/.github/workflows/pypi_release.yaml @@ -157,10 +157,15 @@ jobs: pattern: qc-pyci* path: dist/ merge-multiple: true - - name: List and uncompress the files in dist directory + - name: List the files in dist directory + run: | + ls -l dist/ + - name: Uncompress the files in dist directory with for loop + run: | + for file in dist/*.tar.gz; do tar -xvf $file -C dist/; done + - name: List the files in dist directory after uncompressing run: | ls -l dist/ - tar -xvf dist/*.tar.gz -C dist/ - name: Publish distribution to TestPyPI uses: pypa/gh-action-pypi-publish@release/v1 with: From f6c142db1837ed3261c61a9addf64fc546e7e275 Mon Sep 17 00:00:00 2001 From: Fanwang Meng Date: Thu, 12 Dec 2024 17:13:45 -0500 Subject: [PATCH 12/19] Update Python version in pyproject.toml --- .github/workflows/pypi_release.yaml | 2 +- pyproject.toml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/pypi_release.yaml b/.github/workflows/pypi_release.yaml index 7d45fee..1fbe130 100644 --- a/.github/workflows/pypi_release.yaml +++ b/.github/workflows/pypi_release.yaml @@ -162,7 +162,7 @@ jobs: ls -l dist/ - name: Uncompress the files in dist directory with for loop run: | - for file in dist/*.tar.gz; do tar -xvf $file -C dist/; done + for file in dist/*.zip; do unzip -d dist/ $file; done - name: List the files in dist directory after uncompressing run: | ls -l dist/ diff --git a/pyproject.toml b/pyproject.toml index 342bd77..491b0fc 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -38,7 +38,7 @@ classifiers = [ "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", - "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.13", "Programming Language :: C++", ] requires-python = ">=3.9" From 9f84459ebfa5ff45020d13bbc5090a0982cff91c Mon Sep 17 00:00:00 2001 From: Fanwang Meng Date: Thu, 12 Dec 2024 17:26:11 -0500 Subject: [PATCH 13/19] Fix naming issue --- .github/workflows/pypi_release.yaml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/.github/workflows/pypi_release.yaml b/.github/workflows/pypi_release.yaml index 1fbe130..cdfe615 100644 --- a/.github/workflows/pypi_release.yaml +++ b/.github/workflows/pypi_release.yaml @@ -111,10 +111,15 @@ jobs: pattern: qc-pyci* path: dist/ merge-multiple: true - - name: List and uncompress the files in dist directory + - name: List the files in dist directory + run: | + ls -l dist/ + - name: Uncompress the files in dist directory with for loop + run: | + for file in dist/*.zip; do unzip -d dist/ $file; done + - name: List the files in dist directory after uncompressing run: | ls -l dist/ - tar -xvf dist/*.tar.gz -C dist/ - name: Sign the dists with Sigstore uses: sigstore/gh-action-sigstore-python@v3.0.0 with: From 5bb62529f66bd85d6e36765c81e184995fadaef1 Mon Sep 17 00:00:00 2001 From: Fanwang Meng Date: Thu, 12 Dec 2024 20:26:37 -0500 Subject: [PATCH 14/19] Rename the wheels and tar.gz src files for each Python --- .github/workflows/pypi_release.yaml | 37 ++++++++++++++++++----------- 1 file changed, 23 insertions(+), 14 deletions(-) diff --git a/.github/workflows/pypi_release.yaml b/.github/workflows/pypi_release.yaml index cdfe615..402bd3f 100644 --- a/.github/workflows/pypi_release.yaml +++ b/.github/workflows/pypi_release.yaml @@ -57,6 +57,10 @@ jobs: make make test python -m build --sdist --wheel + for file in dist/*; do \ + mv "$file" "${file%.tar.gz}-py${{ matrix.python-version }}.tar.gz"; \ + mv "$file" "${file%.whl}-py${{ matrix.python-version }}.whl"; \ + done - name: Store the distribution packages uses: actions/upload-artifact@v4 @@ -83,10 +87,15 @@ jobs: pattern: qc-pyci* path: dist/ merge-multiple: true - - name: List and uncompress the files in dist directory + - name: List the files in dist directory run: | ls -l dist/ - tar -xvf dist/*.tar.gz -C dist/ + # - name: Uncompress the files in dist directory with for loop + # run: | + # for file in dist/*.zip; do unzip -d dist/ $file; done + # - name: List the files in dist directory after uncompressing + # run: | + # ls -l dist/ - name: Publish distribution to PyPI uses: pypa/gh-action-pypi-publish@release/v1 @@ -114,12 +123,12 @@ jobs: - name: List the files in dist directory run: | ls -l dist/ - - name: Uncompress the files in dist directory with for loop - run: | - for file in dist/*.zip; do unzip -d dist/ $file; done - - name: List the files in dist directory after uncompressing - run: | - ls -l dist/ + # - name: Uncompress the files in dist directory with for loop + # run: | + # for file in dist/*.zip; do unzip -d dist/ $file; done + # - name: List the files in dist directory after uncompressing + # run: | + # ls -l dist/ - name: Sign the dists with Sigstore uses: sigstore/gh-action-sigstore-python@v3.0.0 with: @@ -165,12 +174,12 @@ jobs: - name: List the files in dist directory run: | ls -l dist/ - - name: Uncompress the files in dist directory with for loop - run: | - for file in dist/*.zip; do unzip -d dist/ $file; done - - name: List the files in dist directory after uncompressing - run: | - ls -l dist/ + # - name: Uncompress the files in dist directory with for loop + # run: | + # for file in dist/*.zip; do unzip -d dist/ $file; done + # - name: List the files in dist directory after uncompressing + # run: | + # ls -l dist/ - name: Publish distribution to TestPyPI uses: pypa/gh-action-pypi-publish@release/v1 with: From 1b4970b21807d8dd51f4bd68f0419d2cec17cde0 Mon Sep 17 00:00:00 2001 From: Fanwang Meng Date: Thu, 12 Dec 2024 20:34:13 -0500 Subject: [PATCH 15/19] Fix directory --- .github/workflows/pypi_release.yaml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/pypi_release.yaml b/.github/workflows/pypi_release.yaml index 402bd3f..abd9a57 100644 --- a/.github/workflows/pypi_release.yaml +++ b/.github/workflows/pypi_release.yaml @@ -57,10 +57,12 @@ jobs: make make test python -m build --sdist --wheel - for file in dist/*; do \ + cd dist + for file in *; do \ mv "$file" "${file%.tar.gz}-py${{ matrix.python-version }}.tar.gz"; \ mv "$file" "${file%.whl}-py${{ matrix.python-version }}.whl"; \ done + cd .. - name: Store the distribution packages uses: actions/upload-artifact@v4 From 517cf44f1dc46474dae4cdb7ceb3030fb741a155 Mon Sep 17 00:00:00 2001 From: Fanwang Meng Date: Thu, 12 Dec 2024 21:00:53 -0500 Subject: [PATCH 16/19] Fix wheel names --- .github/workflows/pypi_release.yaml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/pypi_release.yaml b/.github/workflows/pypi_release.yaml index abd9a57..51fdc4c 100644 --- a/.github/workflows/pypi_release.yaml +++ b/.github/workflows/pypi_release.yaml @@ -58,9 +58,10 @@ jobs: make test python -m build --sdist --wheel cd dist - for file in *; do \ - mv "$file" "${file%.tar.gz}-py${{ matrix.python-version }}.tar.gz"; \ - mv "$file" "${file%.whl}-py${{ matrix.python-version }}.whl"; \ + # numpy-2.2.0-pp310-pypy310_pp73-macosx_14_0_x86_64.whl + for file in *.whl; do \ + newname=$(echo "$file" | sed -E 's/-py3-none-any//'); \ + mv "$file" "${newname%.whl}-${{ matrix.os }}-py${{ matrix.python-version }}.whl"; \ done cd .. From 6e14236c97ae1b4c7ecb23fead1406ce7df29683 Mon Sep 17 00:00:00 2001 From: Fanwang Meng Date: Thu, 12 Dec 2024 21:25:27 -0500 Subject: [PATCH 17/19] Try fix PyPI naming conventions --- .github/workflows/pypi_release.yaml | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/.github/workflows/pypi_release.yaml b/.github/workflows/pypi_release.yaml index 51fdc4c..82423b5 100644 --- a/.github/workflows/pypi_release.yaml +++ b/.github/workflows/pypi_release.yaml @@ -59,12 +59,17 @@ jobs: python -m build --sdist --wheel cd dist # numpy-2.2.0-pp310-pypy310_pp73-macosx_14_0_x86_64.whl - for file in *.whl; do \ + for file in *.whl; do \ newname=$(echo "$file" | sed -E 's/-py3-none-any//'); \ mv "$file" "${newname%.whl}-${{ matrix.os }}-py${{ matrix.python-version }}.whl"; \ - done + if [ "${{ matrix.os }}" = "ubuntu-latest" ]; then \ + mv "${newname%.whl}-${{ matrix.os }}-py${{ matrix.python-version }}.whl" "${newname%.whl}-manylinux1_x86_64.whl"; \ + fi; \ + done cd .. - + - name: List the files in dist directory + run: | + ls -l dist/ - name: Store the distribution packages uses: actions/upload-artifact@v4 with: From 9668af990789cd80d5986f3348d0ee6e0cb73e88 Mon Sep 17 00:00:00 2001 From: Fanwang Meng Date: Thu, 12 Dec 2024 22:32:05 -0500 Subject: [PATCH 18/19] Fix problematic naming --- .github/workflows/pypi_release.yaml | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/.github/workflows/pypi_release.yaml b/.github/workflows/pypi_release.yaml index 82423b5..c86b68d 100644 --- a/.github/workflows/pypi_release.yaml +++ b/.github/workflows/pypi_release.yaml @@ -57,16 +57,16 @@ jobs: make make test python -m build --sdist --wheel - cd dist - # numpy-2.2.0-pp310-pypy310_pp73-macosx_14_0_x86_64.whl - for file in *.whl; do \ - newname=$(echo "$file" | sed -E 's/-py3-none-any//'); \ - mv "$file" "${newname%.whl}-${{ matrix.os }}-py${{ matrix.python-version }}.whl"; \ - if [ "${{ matrix.os }}" = "ubuntu-latest" ]; then \ - mv "${newname%.whl}-${{ matrix.os }}-py${{ matrix.python-version }}.whl" "${newname%.whl}-manylinux1_x86_64.whl"; \ - fi; \ - done - cd .. + # cd dist + # # numpy-2.2.0-pp310-pypy310_pp73-macosx_14_0_x86_64.whl + # for file in *.whl; do \ + # newname=$(echo "$file" | sed -E 's/-py3-none-any//'); \ + # mv "$file" "${newname%.whl}-${{ matrix.os }}-py${{ matrix.python-version }}.whl"; \ + # if [ "${{ matrix.os }}" = "ubuntu-latest" ]; then \ + # mv "${newname%.whl}-${{ matrix.os }}-py${{ matrix.python-version }}.whl" "${newname%.whl}-manylinux1_x86_64.whl"; \ + # fi; \ + # done + # cd .. - name: List the files in dist directory run: | ls -l dist/ From 6095367fcdf7438a8573cd06b8b3d5217476f882 Mon Sep 17 00:00:00 2001 From: Fanwang Meng Date: Thu, 12 Dec 2024 23:36:21 -0500 Subject: [PATCH 19/19] Only support Linux --- .github/workflows/pypi_release.yaml | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/.github/workflows/pypi_release.yaml b/.github/workflows/pypi_release.yaml index c86b68d..0e7e205 100644 --- a/.github/workflows/pypi_release.yaml +++ b/.github/workflows/pypi_release.yaml @@ -57,16 +57,16 @@ jobs: make make test python -m build --sdist --wheel - # cd dist - # # numpy-2.2.0-pp310-pypy310_pp73-macosx_14_0_x86_64.whl - # for file in *.whl; do \ - # newname=$(echo "$file" | sed -E 's/-py3-none-any//'); \ - # mv "$file" "${newname%.whl}-${{ matrix.os }}-py${{ matrix.python-version }}.whl"; \ - # if [ "${{ matrix.os }}" = "ubuntu-latest" ]; then \ - # mv "${newname%.whl}-${{ matrix.os }}-py${{ matrix.python-version }}.whl" "${newname%.whl}-manylinux1_x86_64.whl"; \ - # fi; \ - # done - # cd .. + cd dist + # numpy-2.2.0-pp310-pypy310_pp73-macosx_14_0_x86_64.whl + for file in *.whl; do \ + newname=$(echo "$file" | sed -E 's/-py3-none-any//'); \ + mv "$file" "${newname%.whl}-${{ matrix.os }}-py${{ matrix.python-version }}.whl"; \ + if [ "${{ matrix.os }}" = "ubuntu-latest" ]; then \ + mv "${newname%.whl}-${{ matrix.os }}-py${{ matrix.python-version }}.whl" "${newname%.whl}-manylinux_x86_64.whl"; \ + fi; \ + done + cd .. - name: List the files in dist directory run: | ls -l dist/