Skip to content

Commit

Permalink
Improvements to the build of wheels for Linux.
Browse files Browse the repository at this point in the history
- Set the flag `-fno-math-errno` so that the `errno` flag is not any longer being set when math functions are called.
- Exclude using Cython version `0.29.26` for building Python wheels as it fails building wheels for PyPy38.
  • Loading branch information
bcoconni committed Feb 13, 2022
1 parent 8794e42 commit 10e077b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions python/build-wheels.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ for PYBIN in /opt/python/*/bin; do
# Skip deprecated or unsupported versions
if "${PYBIN}/python" -c "import sys;sys.stdout.write(str(sys.version_info < (${PYTHON_MAX_VERSION})))" | grep -q 'True'; then
"${PYBIN}/pip" install cmake
"${PYBIN}/cmake" -DCMAKE_C_FLAGS_RELEASE="-g -O2 -DNDEBUG" -DCMAKE_CXX_FLAGS_RELEASE="-g -O2 -DNDEBUG" -DCMAKE_BUILD_TYPE=Release ..
"${PYBIN}/cmake" -DCMAKE_C_FLAGS_RELEASE="-g -O2 -DNDEBUG -fno-math-errno" -DCMAKE_CXX_FLAGS_RELEASE="-g -O2 -DNDEBUG -fno-math-errno" -DCMAKE_BUILD_TYPE=Release ..
# Only build libJSBSim because that's all we need for Python wheels.
"${PYBIN}/cmake" --build . --target libJSBSim -- -j2
break
Expand All @@ -23,7 +23,7 @@ cd python
for PYBIN in /opt/python/*/bin; do
# Skip deprecated or unsupported versions
if "${PYBIN}/python" -c "import sys;sys.stdout.write(str(sys.version_info < (${PYTHON_MAX_VERSION})))" | grep -q 'True'; then
"${PYBIN}/pip" install 'cython<=0.29.25' numpy
"${PYBIN}/pip" install 'cython!=0.29.26' numpy # Exclude Cython version 0.29.26 as it fails building for PyPy38
"${PYBIN}/cython" --cplus jsbsim.pyx -o jsbsim.cxx
"${PYBIN}/python" setup.py bdist_wheel --build-number=$GITHUB_RUN_NUMBER
fi
Expand Down

0 comments on commit 10e077b

Please sign in to comment.