Skip to content

Commit

Permalink
Merge pull request #131 from benjeffery/oldest-numpy
Browse files Browse the repository at this point in the history
Use oldest-supported-numpy in wheel building
  • Loading branch information
jeromekelleher authored Jun 20, 2020
2 parents 7fb05b4 + 9f0ae24 commit df4e6ed
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 df4e6ed

Please sign in to comment.