GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Merge pull request #23838 from rgommers/default-to-meson · numpy/numpy@00f8acb

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • .circleci
    • config.yml
  • .github/workflows
    • build_test.yml
    • emscripten.yml
    • wheels.yml
  • azure-pipelines.yml
  • azure-steps-windows.yml
  • meson.build
  • numpy
    • core/tests
      • test_arrayprint.py
      • test_einsum.py
      • test_longdouble.py
      • test_mem_policy.py
      • test_print.py
      • test_scalarprint.py
      • test_strings.py
      • test_umath.py
    • f2py/tests
      • test_return_integer.py
      • test_return_real.py
    • meson.build
    • random/tests
      • test_extending.py
    • tests
      • test_public_api.py
  • pyproject.toml.setuppy
  • pyproject.toml
  • tools
    • ci
      • cirrus_wheels.yml
    • openblas_support.py
    • wheels
      • check_license.py
      • cibw_before_build.sh
      • cibw_test_command.sh
      • repair_windows.sh
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎.circleci/config.yml‎

Copy file name to clipboardExpand all lines: .circleci/config.yml
-1Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,6 @@ jobs:
6161
name: build numpy
6262
command: |
6363
. venv/bin/activate
64-
pip install --progress-bar=off --upgrade pip 'setuptools<49.2.0'
6564
pip install --progress-bar=off -r test_requirements.txt
6665
pip install --progress-bar=off -r doc_requirements.txt
6766
pip install .
Collapse file

‎.github/workflows/build_test.yml‎

Copy file name to clipboardExpand all lines: .github/workflows/build_test.yml
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -436,7 +436,7 @@ jobs:
436436
run: |
437437
export CC=/usr/bin/gcc-12
438438
export CXX=/usr/bin/g++-12
439-
python -m pip install -e .
439+
python setup.py develop
440440
- name: Show config
441441
run: |
442442
python -c "import numpy as np; np.show_config()"
Collapse file

‎.github/workflows/emscripten.yml‎

Copy file name to clipboardExpand all lines: .github/workflows/emscripten.yml
+5-1Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,11 @@ jobs:
5555
run: pip install pyodide-build==$PYODIDE_VERSION
5656

5757
- name: Build
58-
run: CFLAGS=-g2 LDFLAGS=-g2 pyodide build
58+
run: |
59+
# Pyodide is still in the process of adding better/easier support for
60+
# non-setup.py based builds.
61+
cp pyproject.toml.setuppy pyproject.toml
62+
CFLAGS=-g2 LDFLAGS=-g2 pyodide build
5963
6064
- name: set up node
6165
uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3.6.0
Collapse file

‎.github/workflows/wheels.yml‎

Copy file name to clipboardExpand all lines: .github/workflows/wheels.yml
+7-13Lines changed: 7 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -78,8 +78,8 @@ jobs:
7878
- [ubuntu-20.04, musllinux_x86_64]
7979
- [macos-12, macosx_x86_64]
8080
- [windows-2019, win_amd64]
81-
- [windows-2019, win32]
82-
python: ["cp39", "cp310", "cp311", "pp39"]
81+
python: ["cp39", "cp310", "cp311"]
82+
# python: ["cp39", "cp310", "cp311", "pp39"]
8383
exclude:
8484
# Don't build PyPy 32-bit windows
8585
- buildplat: [windows-2019, win32]
@@ -101,22 +101,16 @@ jobs:
101101
# https://github.com/actions/checkout/issues/338
102102
fetch-depth: 0
103103

104+
- name: pkg-config-for-win
105+
run: |
106+
choco install -y --checksum 6004DF17818F5A6DBF19CB335CC92702 pkgconfiglite
107+
if: runner.os == 'windows'
108+
104109
# Used to push the built wheels
105110
- uses: actions/setup-python@bd6b4b6205c4dbad673328db7b31b7fab9e241c0 # v4.6.1
106111
with:
107112
python-version: "3.x"
108113

109-
# We need rtools 4.0 to have 32 bit support on windows
110-
- if: runner.os == 'windows'
111-
uses: r-windows/install-rtools@ca1090c210479e995c03019a22b9798cdf57073a # main
112-
113-
- name: setup rtools for 32-bit
114-
run: |
115-
echo "PLAT=i686" >> $env:GITHUB_ENV
116-
echo "PATH=c:\rtools40\mingw32\bin;$env:PATH" >> $env:GITHUB_ENV
117-
gfortran --version
118-
if: ${{ matrix.buildplat[1] == 'win32' }}
119-
120114
- name: Build wheels
121115
uses: pypa/cibuildwheel@0ecddd92b62987d7a2ae8911f4bb8ec9e2e4496a # v2.13.1
122116
env:
Collapse file

‎azure-pipelines.yml‎

Copy file name to clipboardExpand all lines: azure-pipelines.yml
+12-28Lines changed: 12 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -114,16 +114,9 @@ stages:
114114
python3 -m pip install -r test_requirements.txt && \
115115
echo CFLAGS \$CFLAGS && \
116116
python3 -m pip install -v . && \
117-
python3 runtests.py -n --debug-info --mode=full -- -rsx --junitxml=junit/test-results.xml && \
118-
python3 -m pip install threadpoolctl && \
119-
python3 tools/openblas_support.py --check_version"
117+
cd tools && \
118+
python3 -m pytest --pyargs numpy"
120119
displayName: 'Run 32-bit manylinux2014 Docker Build / Tests'
121-
- task: PublishTestResults@2
122-
condition: succeededOrFailed()
123-
inputs:
124-
testResultsFiles: '**/test-*.xml'
125-
failTaskOnFailedTests: true
126-
testRunTitle: 'Publish test results for Python 3.9-32 bit full Linux'
127120
128121
129122
- job: macOS
@@ -249,36 +242,27 @@ stages:
249242
pool:
250243
vmImage: 'windows-2019'
251244
strategy:
252-
maxParallel: 5
245+
maxParallel: 3
253246
matrix:
254-
Python39-32bit-full:
255-
PYTHON_VERSION: '3.9'
256-
PYTHON_ARCH: 'x86'
257-
TEST_MODE: full
258-
BITS: 32
259247
Python310-64bit-fast:
260248
PYTHON_VERSION: '3.10'
261249
PYTHON_ARCH: 'x64'
262250
TEST_MODE: fast
263251
BITS: 64
264-
Python311-32bit-fast:
265-
PYTHON_VERSION: '3.11'
266-
PYTHON_ARCH: 'x86'
267-
TEST_MODE: fast
268-
BITS: 32
269252
Python311-64bit-full:
270253
PYTHON_VERSION: '3.11'
271254
PYTHON_ARCH: 'x64'
272255
TEST_MODE: full
273256
BITS: 64
274-
NPY_USE_BLAS_ILP64: '1'
275-
276-
PyPy39-64bit-fast:
277-
PYTHON_VERSION: 'pypy3.9'
278-
PYTHON_ARCH: 'x64'
279-
TEST_MODE: fast
280-
BITS: 64
281-
NPY_USE_BLAS_ILP64: '1'
257+
# NPY_USE_BLAS_ILP64: '1'
258+
# TODO: failing because of an issue with ILP64 BLAS being downloaded,
259+
# and that not being handled automatically yet
260+
# PyPy39-64bit-fast:
261+
# PYTHON_VERSION: 'pypy3.9'
262+
# PYTHON_ARCH: 'x64'
263+
# TEST_MODE: fast
264+
# BITS: 64
265+
# NPY_USE_BLAS_ILP64: '1'
282266

283267
steps:
284268
- template: azure-steps-windows.yml
Collapse file

‎azure-steps-windows.yml‎

Copy file name to clipboardExpand all lines: azure-steps-windows.yml
+31-41Lines changed: 31 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -14,49 +14,41 @@ steps:
1414
displayName: 'Install dependencies; some are optional to avoid test skips'
1515

1616
- powershell: |
17-
# rtools 42+ does not support 32 bits builds.
18-
choco install --confirm --no-progress --allow-downgrade rtools --version=4.0.0.20220206
19-
echo "##vso[task.setvariable variable=RTOOLS40_HOME]c:\rtools40"
20-
displayName: 'Install rtools'
17+
# Note that rtools 42+ does not support 32 bits builds. We dropped testing
18+
# those, but if there's a need to go back on that, use version 4.0.0.20220206
19+
choco install --confirm --no-progress --side-by-side rtools --version=4.3.5550
20+
choco install unzip -y
21+
choco install -y --checksum 6004DF17818F5A6DBF19CB335CC92702 pkgconfiglite
22+
echo "##vso[task.setvariable variable=RTOOLS43_HOME]c:\rtools43"
23+
displayName: 'Install utilities'
2124

2225
- powershell: |
2326
$ErrorActionPreference = "Stop"
24-
# Download and get the path to "openblas". We cannot copy it
25-
# to $PYTHON_EXE's directory since that is on a different drive which
26-
# mingw does not like. Instead copy it to a directory and set OPENBLAS,
27-
# since OPENBLAS will be picked up by the openblas discovery
28-
$target = $(python tools/openblas_support.py)
29-
mkdir openblas
30-
echo "Copying $target to openblas/"
31-
cp -r $target/* openblas/
32-
$env:OPENBLAS = $target
27+
mkdir C:/opt/openblas/openblas_dll
28+
mkdir C:/opt/32/lib/pkgconfig
29+
mkdir C:/opt/64/lib/pkgconfig
30+
# TBD: support 32 bit testing
31+
$target=$(python -c "import tools.openblas_support as obs; plat=obs.get_plat(); ilp64=obs.get_ilp64(); target=f'openblas_{plat}.zip'; obs.download_openblas(target, plat, ilp64);print(target)")
32+
unzip -o -d c:/opt/ $target
33+
echo "##vso[task.setvariable variable=PKG_CONFIG_PATH]c:/opt/64/lib/pkgconfig"
34+
copy C:/opt/64/bin/*.dll C:/opt/openblas/openblas_dll
3335
displayName: 'Download / Install OpenBLAS'
3436

35-
# NOTE: for Windows builds it seems much more tractable to use runtests.py
36-
# vs. manual setup.py and then runtests.py for testing only
37-
3837
- powershell: |
39-
ls openblas
40-
If ($(BITS) -eq 32) {
41-
$env:CFLAGS = "-m32"
42-
$env:LDFLAGS = "-m32"
43-
$env:PATH = "$env:RTOOLS40_HOME\\mingw32\\bin;$env:PATH"
44-
}
45-
Else
46-
{
47-
$env:PATH = "$env:RTOOLS40_HOME\\mingw64\\bin;$env:PATH"
48-
}
4938
If ( Test-Path env:NPY_USE_BLAS_ILP64 ) {
50-
$env:OPENBLAS64_ = "openblas"
39+
$env:OPENBLAS64_="openblas"
40+
# This does not work, the flags are passed together and not separately
41+
$env:CFLAGS="-DBLAS_SYMBOL_SUFFIX=64_ -DHAVE_BLAS_ILP64"
42+
$env:CXXFLAGS="-DBLAS_SYMBOL_SUFFIX=64_ -DHAVE_BLAS_ILP64"
5143
} else {
5244
$env:OPENBLAS = "openblas"
5345
}
5446
python -c "from tools import openblas_support; openblas_support.make_init('numpy')"
55-
python -m pip wheel -v -v -v --no-build-isolation --no-use-pep517 --wheel-dir=dist .
56-
57-
ls dist -r | Foreach-Object {
58-
python -m pip install $_.FullName
59-
}
47+
python -m pip install . --config-settings=setup-args="--vsenv"
48+
# copy from c:/opt/openblas/openblas_dll to numpy/.libs
49+
$target = $(python -c "import sysconfig; print(sysconfig.get_path('platlib'))")
50+
mkdir $target/numpy/.libs
51+
copy C:/opt/openblas/openblas_dll/*.dll $target/numpy/.libs
6052
displayName: 'Build NumPy'
6153

6254
- script: |
@@ -65,16 +57,14 @@ steps:
6557
displayName: 'Check OpenBLAS version'
6658

6759
- powershell: |
68-
If ($(BITS) -eq 32) {
69-
$env:CFLAGS = "-m32"
70-
$env:LDFLAGS = "-m32"
71-
$env:PATH = "$env:RTOOLS40_HOME\\mingw32\\bin;$env:PATH"
72-
}
73-
Else
74-
{
75-
$env:PATH = "$env:RTOOLS40_HOME\\mingw64\\bin;$env:PATH"
60+
cd tools # avoid root dir to not pick up source tree
61+
# Get a gfortran onto the path for f2py tests
62+
$env:PATH = "$env:RTOOLS43_HOME\\x86_64-w64-mingw32.static.posix\\bin;$env:PATH"
63+
If ( $env:TEST_MODE -eq "full" ) {
64+
pytest --pyargs numpy -rsx --junitxml=junit/test-results.xml
65+
} else {
66+
pytest --pyargs numpy -m "not slow" -rsx --junitxml=junit/test-results.xml
7667
}
77-
python runtests.py -n --show-build-log --mode=$(TEST_MODE) -- -rsx --junitxml=junit/test-results.xml
7868
displayName: 'Run NumPy Test Suite'
7969

8070
- task: PublishTestResults@2
Collapse file

‎meson.build‎

Copy file name to clipboardExpand all lines: meson.build
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ project(
44
# Note that the git commit hash cannot be added dynamically here
55
# It is dynamically added upon import by versioneer
66
# See `numpy/__init__.py`
7-
version: '1.24.0.dev0',
7+
version: '2.0.0.dev0',
88
license: 'BSD-3',
99
meson_version: '>= 1.1.0',
1010
default_options: [
Collapse file

‎numpy/core/tests/test_arrayprint.py‎

Copy file name to clipboardExpand all lines: numpy/core/tests/test_arrayprint.py
+3Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import platform
12
import sys
23
import gc
34
from hypothesis import given
@@ -161,6 +162,8 @@ def test_fieldless_structured(self):
161162

162163

163164
class TestComplexArray:
165+
@pytest.mark.xfail(platform.machine() == 'aarch64',
166+
reason="Failing on Meson build, see gh-23974")
164167
def test_str(self):
165168
rvals = [0, 1, -1, np.inf, -np.inf, np.nan]
166169
cvals = [complex(rp, ip) for rp in rvals for ip in rvals]
Collapse file

‎numpy/core/tests/test_einsum.py‎

Copy file name to clipboardExpand all lines: numpy/core/tests/test_einsum.py
+6Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
import itertools
2+
import sys
3+
import platform
24

35
import pytest
46

@@ -609,9 +611,13 @@ def check_einsum_sums(self, dtype, do_opt=False):
609611
[2.]) # contig_stride0_outstride0_two
610612

611613
def test_einsum_sums_int8(self):
614+
if sys.platform == 'darwin' and platform.machine() == 'x86_64':
615+
pytest.xfail('Fails on macOS x86-64 with Meson, see gh-23838')
612616
self.check_einsum_sums('i1')
613617

614618
def test_einsum_sums_uint8(self):
619+
if sys.platform == 'darwin' and platform.machine() == 'x86_64':
620+
pytest.xfail('Fails on macOS x86-64 with Meson, see gh-23838')
615621
self.check_einsum_sums('u1')
616622

617623
def test_einsum_sums_int16(self):
Collapse file

‎numpy/core/tests/test_longdouble.py‎

Copy file name to clipboardExpand all lines: numpy/core/tests/test_longdouble.py
+2Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,8 @@ def test_scalar_extraction():
3333
# +2 from macro block starting around line 842 in scalartypes.c.src.
3434

3535

36+
@pytest.mark.xfail(platform.machine() == 'aarch64',
37+
reason="Failing on Meson build, see gh-23974")
3638
@pytest.mark.skipif(IS_MUSL,
3739
reason="test flaky on musllinux")
3840
@pytest.mark.skipif(LD_INFO.precision + 2 >= repr_precision,

0 commit comments

Comments
0 (0)
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.