Skip to content

Commit

Permalink
Use oldest-supported-numpy in wheel building
Browse files Browse the repository at this point in the history
  • Loading branch information
benjeffery committed Jun 19, 2020
1 parent 7fb05b4 commit 9f0ae24
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
8 changes: 7 additions & 1 deletion .github/workflows/wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,13 @@ jobs:
env:
PYTHON: "py -${{ matrix.python }}-${{ matrix.wordsize }}"
shell: bash
# Instead of letting setup.py install a newer numpy we install it here
# using the oldest supported version for ABI compatibility
run: |
set -ex
${PYTHON} -m pip install --upgrade pip
${PYTHON} -m pip install setuptools wheel cython
${PYTHON} -m pip install setuptools wheel
${PYTHON} -m pip install oldest-supported-numpy
- name: Build C extension
env:
PYTHON: "py -${{ matrix.python }}-${{ matrix.wordsize }}"
Expand Down Expand Up @@ -81,9 +84,12 @@ jobs:
with:
python-version: ${{ matrix.python }}
- name: Install deps
# Instead of letting setup.py install a newer numpy we install it here
# using the oldest supported version for ABI compatibility
run: |
pip install --upgrade pip
pip install setuptools wheel
pip install oldest-supported-numpy
- name: Build C extension
run: |
cd python
Expand Down
3 changes: 3 additions & 0 deletions docker/buildwheel.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ cd python
for V in "${PYTHON_VERSIONS[@]}"; do
PYBIN=/opt/python/$V/bin
rm -rf build/ # Avoid lib build by narrow Python is used by wide python
# Instead of letting setup.py install a newer numpy we install it here
# using the oldest supported version for ABI compatibility
$PYBIN/pip install oldest-supported-numpy
$PYBIN/python setup.py build_ext --inplace
$PYBIN/python setup.py bdist_wheel
done
Expand Down

0 comments on commit 9f0ae24

Please sign in to comment.