File tree Expand file tree Collapse file tree 1 file changed +5
-22
lines changed Expand file tree Collapse file tree 1 file changed +5
-22
lines changed Original file line number Diff line number Diff line change @@ -109,38 +109,21 @@ jobs:
109109 apt-get update
110110 apt-get install -y gcc g++ make
111111 -
112- name : Install unzip
113- run : |
114- apt-get update
115- apt-get install -y unzip
116- -
117- name : Generate NumPy headers
112+ name : Build old numpy from source
118113 run : |
119114 case "${{ matrix.python-version }}" in
120115 2.6|3.[23]) pkgvers=1.11.3;;
121116 2.7|3.[456789]) pkgvers=1.16.6;;
122117 *) pkgvers=1.21.4;;
123118 esac
124- pkgname=numpy
125- pkgcode=numpy-${pkgvers}
126- python -m pip install cython
127- python -m pip download --no-binary=numpy "numpy == ${pkgvers}"
128- unzip ${pkgcode}.zip
129- rm -f ${pkgcode}.zip
130- cd ${pkgcode}
131- python setup.py build
132- cp build/src*/numpy/core/include/numpy/*.h numpy/core/include/numpy/
133- cd ..
134- cp -R ${pkgcode}/numpy/core/include ${{ env.PKGDIR }}/extern
135- rm -rf ${pkgcode}
119+ pip install "numpy == ${pkgvers}"
136120 -
137121 name : Build wheel
138122 run : |
139- cd ${{ env.PKGDIR }}
123+ sitepkgdir=$(pip show numpy 2>/dev/null | grep Location: | cut -d' ' -f2)
140124 export GEOS_DIR="${GITHUB_WORKSPACE}/${{ env.PKGDIR }}/extern"
141- export NUMPY_INCLUDE_PATH="${GITHUB_WORKSPACE}/${{ env.PKGDIR }}/extern/include"
142- export CFLAGS="-std=c99"
143- pip install -r requirements-setup.txt
125+ export NUMPY_INCLUDE_PATH=${sitepkgdir}/numpy/core/include
126+ cd ${{ env.PKGDIR }}
144127 python setup.py sdist
145128 pip wheel -w dist --no-deps dist/*.zip
146129 -
You can’t perform that action at this time.
0 commit comments