Skip to content

Commit 8194e4c

Browse files
committed
Trim down dependencies, make new paths work
1 parent de8bc1f commit 8194e4c

File tree

5 files changed

+25
-15
lines changed

5 files changed

+25
-15
lines changed

cibuildwheel.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
build-frontend = "build"
66
skip = ["*_i686", "*_ppc64le", "*_s390x", "*_universal2"]
77
before-build = "bash {project}/tools/wheels/cibw_before_build.sh {project}"
8-
before-test = "pip install -r {project}/requirements/test_requirements.txt"
8+
before-test = "pip install -r {project}/requirements/wheel_test_requirements.txt"
99
test-command = "bash {project}/tools/wheels/cibw_test_command.sh {project}"
1010
enable = ["cpython-freethreading", "pypy", "cpython-prerelease"]
1111

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
scipy-openblas32==0.3.29.265.0 ; sys_platform == 'win32' and platform_machine == 'ARM64'
2+
# Note there is not yet a win-arm64 wheel, so we currently only exclude win-arm64
3+
scipy-openblas64==0.3.29.0.0 ; sys_platform != 'win32' or platform_machine != 'ARM64'
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
Cython
2+
setuptools==65.5.1 ; python_version < '3.12'
3+
setuptools ; python_version >= '3.12'
4+
hypothesis==6.104.1
5+
pytest==7.4.0
6+
meson
7+
ninja; sys_platform != "emscripten"
8+
pytest-xdist
9+
threadpoolctl

tools/wheels/cibw_before_build.sh

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,23 @@
11
set -xe
22

33
PROJECT_DIR="${1:-$PWD}"
4+
NUMPY_SRC_DIR="${1:-$PWD}/numpy-src"
45

56

67
# remove any cruft from a previous run
78
rm -rf build
89

910
# Update license
10-
echo "" >> $PROJECT_DIR/LICENSE.txt
11-
echo "----" >> $PROJECT_DIR/LICENSE.txt
12-
echo "" >> $PROJECT_DIR/LICENSE.txt
13-
cat $PROJECT_DIR/LICENSES_bundled.txt >> $PROJECT_DIR/LICENSE.txt
11+
echo "" >> $NUMPY_SRC_DIR/LICENSE.txt
12+
echo "----" >> $NUMPY_SRC_DIR/LICENSE.txt
13+
echo "" >> $NUMPY_SRC_DIR/LICENSE.txt
14+
cat $NUMPY_SRC_DIR/LICENSES_bundled.txt >> $NUMPY_SRC_DIR/LICENSE.txt
1415
if [[ $RUNNER_OS == "Linux" ]] ; then
15-
cat $PROJECT_DIR/tools/wheels/LICENSE_linux.txt >> $PROJECT_DIR/LICENSE.txt
16+
cat $PROJECT_DIR/tools/wheels/LICENSE_linux.txt >> $NUMPY_SRC_DIR/LICENSE.txt
1617
elif [[ $RUNNER_OS == "macOS" ]]; then
17-
cat $PROJECT_DIR/tools/wheels/LICENSE_osx.txt >> $PROJECT_DIR/LICENSE.txt
18+
cat $PROJECT_DIR/tools/wheels/LICENSE_osx.txt >> $NUMPY_SRC_DIR/LICENSE.txt
1819
elif [[ $RUNNER_OS == "Windows" ]]; then
19-
cat $PROJECT_DIR/tools/wheels/LICENSE_win32.txt >> $PROJECT_DIR/LICENSE.txt
20+
cat $PROJECT_DIR/tools/wheels/LICENSE_win32.txt >> $NUMPY_SRC_DIR/LICENSE.txt
2021
fi
2122

2223
if [[ $(python -c"import sys; print(sys.maxsize)") < $(python -c"import sys; print(2**33)") ]]; then
@@ -46,7 +47,7 @@ if [[ "$INSTALL_OPENBLAS" = "true" ]] ; then
4647
PKG_CONFIG_PATH=$PROJECT_DIR/.openblas
4748
rm -rf $PKG_CONFIG_PATH
4849
mkdir -p $PKG_CONFIG_PATH
49-
python -m pip install -r requirements/ci_requirements.txt
50+
python -m pip install -r $PROJECT_DIR/requirements/openblas_requirements.txt
5051
python -c "import scipy_${OPENBLAS}; print(scipy_${OPENBLAS}.get_pkg_config())" > $PKG_CONFIG_PATH/scipy-openblas.pc
5152
# Copy the shared objects to a path under $PKG_CONFIG_PATH, the build
5253
# will point $LD_LIBRARY_PATH there and then auditwheel/delocate-wheel will

tools/wheels/cibw_test_command.sh

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ set -xe
44

55
PROJECT_DIR="$1"
66

7-
python -m pip install threadpoolctl
87
python -c "import numpy; numpy.show_config()"
98

109
if [[ $RUNNER_OS == "Windows" ]]; then
@@ -40,9 +39,7 @@ if [[ $FREE_THREADED_BUILD == "True" ]]; then
4039
fi
4140

4241
# Run full tests with -n=auto. This makes pytest-xdist distribute tests across
43-
# the available N CPU cores: 2 by default for Linux instances and 4 for macOS arm64
44-
# Also set a 30 minute timeout in case of test hangs and on success, print the
45-
# durations for the 10 slowests tests to help with debugging slow or hanging
46-
# tests
47-
python -c "import sys; import numpy; sys.exit(not numpy.test(label='full', extra_argv=['-n=auto', '--timeout=1800', '--durations=10']))"
42+
# the available N CPU cores. Also print the durations for the 10 slowest tests
43+
# to help with debugging slow or hanging tests
44+
python -c "import sys; import numpy; sys.exit(not numpy.test(label='full', extra_argv=['-n=auto', '--durations=10']))"
4845
python $PROJECT_DIR/tools/wheels/check_license.py

0 commit comments

Comments
 (0)