Skip to content

Commit e46055a

Browse files
committed
Add cibw_before_test to install nightly NumPy
1 parent 812527e commit e46055a

File tree

5 files changed

+12
-1
lines changed

5 files changed

+12
-1
lines changed

.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,3 +85,4 @@ pandas/tests/io/parser/data export-ignore
8585

8686
# Include cibw script in sdist since it's needed for building wheels
8787
scripts/cibw_before_build.sh -export-ignore
88+
scripts/cibw_before_test.sh -export-ignore

.github/workflows/wheels.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,6 @@ jobs:
155155
package-dir: ./dist/${{ startsWith(matrix.buildplat[1], 'macosx') && env.sdist_name || needs.build_sdist.outputs.sdist_file }}
156156
env:
157157
CIBW_PRERELEASE_PYTHONS: True
158-
CIBW_FREE_THREADED_SUPPORT: True
159158
CIBW_BUILD: ${{ matrix.python[0] }}-${{ matrix.buildplat[1] }}
160159
CIBW_BUILD_FRONTEND: ${{ matrix.cibw_build_frontend }}
161160

MANIFEST.in

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,3 +65,4 @@ graft pandas/_libs/include
6565

6666
# Include cibw script in sdist since it's needed for building wheels
6767
include scripts/cibw_before_build.sh
68+
include scripts/cibw_before_test.sh

pyproject.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,9 @@ test-command = """
154154
pd.test(extra_args=["-m not clipboard and not single_cpu and not slow and not network and not db", "-n 2", "--no-strict-data-files"]); \
155155
pd.test(extra_args=["-m not clipboard and single_cpu and not slow and not network and not db", "--no-strict-data-files"]);' \
156156
"""
157+
free-threaded-support = true
157158
before-build = "bash {package}/scripts/cibw_before_build.sh"
159+
before-test = "bash {package}/scripts/cibw_before_test.sh"
158160

159161
[tool.cibuildwheel.windows]
160162
before-build = "pip install delvewheel"

scripts/cibw_before_test.sh

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# TODO: delete along with enabling build isolation by unsetting
2+
# CIBW_BUILD_FRONTEND when scipy is buildable under free-threaded
3+
# python with a released version of cython
4+
FREE_THREADED_BUILD="$(python -c "import sysconfig; print(bool(sysconfig.get_config_var('Py_GIL_DISABLED')))")"
5+
if [[ $FREE_THREADED_BUILD == "True" ]]; then
6+
python -m pip install -U pip
7+
python -m pip install -i https://pypi.anaconda.org/scientific-python-nightly-wheels/simple numpy
8+
fi

0 commit comments

Comments
 (0)