Skip to content

Commit e247c1a

Browse files
BLD: use meson's NumPy resolution mechanism for building
Instead of querying the include folder's location from NumPy during building, use Meson's built-in dependency resolution for NumPy. With this change during build-time Meson first tries to query the dependency details using numpy-config (which, in turn essentially uses the same method as the original code this commit replaces), and in case that fails for some reason, it tries to discover NumPy resources using pkg-config - which, beside being a good fail-over mechanism, has the added benefit of somewhat simpler cross-compiling, as querying the include folder location from NumPy module is only usable for cross-compiling only in some corner cases, while pkg-config is a bit more universal. Signed-off-by: Gyorgy Sarvari <[email protected]>
1 parent f1b00b8 commit e247c1a

20 files changed

+43
-51
lines changed

.github/actions/build_pandas/action.yml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,8 @@ runs:
2525
- name: Build Pandas
2626
run: |
2727
if [[ ${{ inputs.editable }} == "true" ]]; then
28-
pip install -e . --no-build-isolation -v --no-deps \
29-
-Csetup-args="--werror"
28+
pip install -e . --no-build-isolation -v --no-deps
3029
else
31-
pip install . --no-build-isolation -v --no-deps \
32-
-Csetup-args="--werror"
30+
pip install . --no-build-isolation -v --no-deps
3331
fi
3432
shell: bash -el {0}

.github/workflows/code-checks.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ on:
1313
env:
1414
ENV_FILE: environment.yml
1515
PANDAS_CI: 1
16+
PKG_CONFIG_PATH: "${{env.PYTHONHOME}}/numpy/_core/lib/pkgconfig"
1617

1718
permissions:
1819
contents: read

.github/workflows/docbuild-and-upload.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ env:
1616
ENV_FILE: environment.yml
1717
PANDAS_CI: 1
1818
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
19+
PKG_CONFIG_PATH: "${{env.PYTHONHOME}}/numpy/_core/lib/pkgconfig"
1920

2021
permissions:
2122
contents: read

.github/workflows/unit-tests.yml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -244,10 +244,10 @@ jobs:
244244
run: |
245245
/opt/python/cp313-cp313/bin/python -m venv ~/virtualenvs/pandas-dev
246246
. ~/virtualenvs/pandas-dev/bin/activate
247-
python -m pip install --no-cache-dir -U pip wheel setuptools meson[ninja]==1.2.1 meson-python==0.13.1
247+
python -m pip install --no-cache-dir -U pip wheel setuptools meson[ninja]==1.4.0 meson-python==0.13.1
248248
python -m pip install numpy -Csetup-args="-Dallow-noblas=true"
249249
python -m pip install --no-cache-dir versioneer[toml] cython python-dateutil pytest>=7.3.2 pytest-xdist>=3.4.0 hypothesis>=6.84.0
250-
python -m pip install --no-cache-dir --no-build-isolation -e . -Csetup-args="--werror"
250+
python -m pip install --no-cache-dir --no-build-isolation -e .
251251
python -m pip list --no-cache-dir
252252
PANDAS_CI=1 python -m pytest -m 'not slow and not network and not clipboard and not single_cpu' pandas --junitxml=test-data.xml
253253
concurrency:
@@ -282,9 +282,9 @@ jobs:
282282
run: |
283283
/opt/python/cp313-cp313/bin/python -m venv ~/virtualenvs/pandas-dev
284284
. ~/virtualenvs/pandas-dev/bin/activate
285-
python -m pip install --no-cache-dir -U pip wheel setuptools meson-python==0.13.1 meson[ninja]==1.2.1
285+
python -m pip install --no-cache-dir -U pip wheel setuptools meson-python==0.13.1 meson[ninja]==1.4.0
286286
python -m pip install --no-cache-dir versioneer[toml] cython numpy python-dateutil pytest>=7.3.2 pytest-xdist>=3.4.0 hypothesis>=6.84.0
287-
python -m pip install --no-cache-dir --no-build-isolation -e . -Csetup-args="--werror"
287+
python -m pip install --no-cache-dir --no-build-isolation -e .
288288
python -m pip list --no-cache-dir
289289
290290
- name: Run Tests
@@ -353,10 +353,10 @@ jobs:
353353
- name: Build Environment
354354
run: |
355355
python --version
356-
python -m pip install --upgrade pip setuptools wheel meson[ninja]==1.2.1 meson-python==0.13.1
356+
python -m pip install --upgrade pip setuptools wheel meson[ninja]==1.4.0 meson-python==0.13.1
357357
python -m pip install --pre --extra-index-url https://pypi.anaconda.org/scientific-python-nightly-wheels/simple numpy
358358
python -m pip install versioneer[toml] python-dateutil tzdata cython hypothesis>=6.84.0 pytest>=7.3.2 pytest-xdist>=3.4.0 pytest-cov
359-
python -m pip install -ve . --no-build-isolation --no-index --no-deps -Csetup-args="--werror"
359+
python -m pip install -ve . --no-build-isolation --no-index --no-deps
360360
python -m pip list
361361
362362
- name: Run Tests
@@ -395,10 +395,10 @@ jobs:
395395
- name: Build Environment
396396
run: |
397397
python --version
398-
python -m pip install --upgrade pip setuptools wheel numpy meson[ninja]==1.2.1 meson-python==0.13.1
398+
python -m pip install --upgrade pip setuptools wheel numpy meson[ninja]==1.4.0 meson-python==0.13.1
399399
python -m pip install --pre --extra-index-url https://pypi.anaconda.org/scientific-python-nightly-wheels/simple cython
400400
python -m pip install versioneer[toml] python-dateutil pytz tzdata hypothesis>=6.84.0 pytest>=7.3.2 pytest-xdist>=3.4.0 pytest-cov
401-
python -m pip install -ve . --no-build-isolation --no-index --no-deps -Csetup-args="--werror"
401+
python -m pip install -ve . --no-build-isolation --no-index --no-deps
402402
python -m pip list
403403
404404
- name: Run Tests

ci/deps/actions-310-minimum_versions.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ dependencies:
99
# build dependencies
1010
- versioneer
1111
- cython>=0.29.33
12-
- meson=1.2.1
12+
- meson=1.4.0
1313
- meson-python=0.13.1
1414

1515
# test dependencies

ci/deps/actions-310.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ dependencies:
77
# build dependencies
88
- versioneer
99
- cython>=0.29.33
10-
- meson=1.2.1
10+
- meson=1.4.0
1111
- meson-python=0.13.1
1212

1313
# test dependencies

ci/deps/actions-311-downstream_compat.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ dependencies:
88
# build dependencies
99
- versioneer
1010
- cython>=0.29.33
11-
- meson=1.2.1
11+
- meson=1.4.0
1212
- meson-python=0.13.1
1313

1414
# test dependencies

ci/deps/actions-311-numpydev.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ dependencies:
66

77
# build dependencies
88
- versioneer
9-
- meson=1.2.1
9+
- meson=1.4.0
1010
- meson-python=0.13.1
1111
- cython>=0.29.33
1212

ci/deps/actions-311-pyarrownightly.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ dependencies:
66

77
# build dependencies
88
- versioneer
9-
- meson=1.2.1
9+
- meson=1.4.0
1010
- cython>=0.29.33
1111
- meson-python=0.13.1
1212

ci/deps/actions-311.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ dependencies:
77
# build dependencies
88
- versioneer
99
- cython>=0.29.33
10-
- meson=1.2.1
10+
- meson=1.4.0
1111
- meson-python=0.13.1
1212

1313
# test dependencies

0 commit comments

Comments
 (0)