Skip to content

Commit 9867106

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 9867106

18 files changed

+36
-43
lines changed

.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/unit-tests.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,7 @@ 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
250250
python -m pip install --no-cache-dir --no-build-isolation -e . -Csetup-args="--werror"
@@ -282,7 +282,7 @@ 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
287287
python -m pip install --no-cache-dir --no-build-isolation -e . -Csetup-args="--werror"
288288
python -m pip list --no-cache-dir
@@ -353,7 +353,7 @@ 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
359359
python -m pip install -ve . --no-build-isolation --no-index --no-deps -Csetup-args="--werror"
@@ -395,7 +395,7 @@ 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
401401
python -m pip install -ve . --no-build-isolation --no-index --no-deps -Csetup-args="--werror"

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

ci/deps/actions-312.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-pypy-39.yaml

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

1616
# test dependencies

0 commit comments

Comments
 (0)