Skip to content

Commit

Permalink
[wheel build] retire MacOS X86 and Python 3.6 builds
Browse files Browse the repository at this point in the history
  • Loading branch information
q-posev committed Oct 27, 2023
1 parent 1f29380 commit d9c7533
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 75 deletions.
73 changes: 0 additions & 73 deletions .github/workflows/build-wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 [email protected]

- 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
Expand Down
4 changes: 2 additions & 2 deletions python/build_manylinux_wheels.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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

0 comments on commit d9c7533

Please sign in to comment.