diff --git a/.github/workflows/build-wheels.yml b/.github/workflows/build-wheels.yml index adddb7c..399f362 100644 --- a/.github/workflows/build-wheels.yml +++ b/.github/workflows/build-wheels.yml @@ -94,79 +94,6 @@ jobs: name: pytrexio-manylinux-${{ matrix.manylinux_tag }} path: ./python/wheelhouse/*.whl - build_macos_wheels: - name: Build MacOS wheels for different versions of CPython - needs: get_commit_message - if: >- - contains(needs.get_commit_message.outputs.message, '[wheel build]') || - (github.repository == 'TREX-CoE/trexio' && startsWith(github.ref, 'refs/tags/v')) - runs-on: ${{ matrix.os }} - strategy: - matrix: - os: [macos-12] - python-version: ['3.7', '3.8', '3.9', '3.10', '3.11'] - - steps: - - uses: actions/checkout@v3 - - - name: Set up Python - uses: actions/setup-python@v4 - with: - python-version: ${{ matrix.python-version }} - - - name: Display Python version - run: python --version - - - name: Install HDF5 - run: brew install hdf5@1.12 - - - name: Compute the PYTREXIO_VERSION environment variable - run: echo "PYTREXIO_VERSION=$(grep __version__ python/pytrexio/_version.py | cut -d\ -f3 | tr -d '"')" >> $GITHUB_ENV - - - name: Print the PYTREXIO_VERSION - run: echo ${{ env.PYTREXIO_VERSION }} - - - name: Download the Python API distribution tarball - uses: dawidd6/action-download-artifact@v2 - with: - workflow: actions.yml - workflow_conclusion: success - name: pytrexio-source - path: python - - - name: Extract the Python distribution - run: gzip -cd trexio-${{ env.PYTREXIO_VERSION }}.tar.gz | tar xvf - - working-directory: python - - - name: Install Python dependencies - run: pip install --upgrade pip setuptools build delocate pytest - - - name: Build wheel for a given version of CPython - run: | - mkdir wheelhouse/ - cd trexio-${{ env.PYTREXIO_VERSION }}/ - export H5_CFLAGS="-I$(brew --prefix hdf5)/include" - export H5_LDFLAGS="-L$(brew --prefix hdf5)/lib" - python -m build --wheel --outdir=./ - delocate-wheel trexio-*.whl - mv trexio-*.whl ../wheelhouse/ - working-directory: python - - # Some issues with Python 3.10 wheels on MacOS-11 - - name: Install the wheel - run: python -m pip install wheelhouse/trexio-*.whl - working-directory: python - - - name: Test the wheel - run: pytest -v test_api.py - working-directory: python/test - - - name: Upload produced wheels as artifacts - uses: actions/upload-artifact@v2 - with: - name: pytrexio-${{ matrix.os }} - path: ./python/wheelhouse/*.whl - publish_wheels: name: Publish all wheels on PyPI diff --git a/python/build_manylinux_wheels.sh b/python/build_manylinux_wheels.sh index d6fc96f..1da66ea 100755 --- a/python/build_manylinux_wheels.sh +++ b/python/build_manylinux_wheels.sh @@ -89,7 +89,7 @@ function build_wheel_for_py() # cleaning rm -rf -- dist/ build/ trexio.egg-info/ - rm -- test_file_py.h5 unsafe_test_file_py.h5 + #rm -- test_file_py.h5 unsafe_test_file_py.h5 # deactivate the current environment deactivate @@ -103,7 +103,7 @@ function build_wheel_for_py() # build wheels for all versions of CPython in this container -for CPYVERSION in 36 37 38 39 310 +for CPYVERSION in 37 38 39 310 do build_wheel_for_py ${CPYVERSION} done