diff --git a/.github/workflows/build_wheels.yml b/.github/workflows/build_wheels.yml index a77ab8d..76f89cc 100644 --- a/.github/workflows/build_wheels.yml +++ b/.github/workflows/build_wheels.yml @@ -157,27 +157,12 @@ 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 + path: wheelhouse 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 @@ -193,79 +178,14 @@ jobs: id-token: write steps: - - name: Download all the dists - uses: actions/download-artifact@v4 - with: - name: python-package-distributions - path: ./wheelhouse/*.whl - - 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 + - name: Download wheels uses: actions/download-artifact@v4 with: - name: python-package-distributions - path: ./wheelhouse - - name: Sign the dists with Sigstore - uses: sigstore/gh-action-sigstore-python@v3.0.0 - with: - inputs: >- - ./wheelhouse/*.whl - - - 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 }} + path: dist + merge-multiple: true - permissions: - id-token: write - - steps: - - name: Download all the dists - uses: actions/download-artifact@v4 - with: - name: python-package-distributions - path: wheelhouse/ - - name: Publish distribution to TestPyPI + - name: Publish distribution to PyPI 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 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/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)