GeezerVison is showing github.com — Merge pull request #24521 from charris/backport-24515 · numpy/numpy@38aa2b7
File tree
Expand file treeCollapse file tree
Open diff view settings
Expand file treeCollapse file tree
Open diff view settings
Collapse file
Copy file name to clipboardExpand all lines: meson.build +1-1Lines changed: 1 addition & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
|
3 | 3 | 'c', 'cpp', 'cython', |
4 | 4 | version: run_command( |
5 | 5 | # This should become `numpy/_version.py` in NumPy 2.0 |
6 | | - ['python', 'numpy/_build_utils/gitversion.py'], |
| 6 | + ['numpy/_build_utils/gitversion.py'], |
7 | 7 | check: true).stdout().strip(), |
8 | 8 | license: 'BSD-3', |
9 | 9 | meson_version: '>=1.2.99', # version in vendored-meson is 1.2.99 |
|
Collapse file
Copy file name to clipboardExpand all lines: numpy/_build_utils/gitversion.py +1Lines changed: 1 addition & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
|
| 1 | +#!/usr/bin/env python3 |
1 | 2 | import os |
2 | 3 | import textwrap |
3 | 4 |
|
|
Collapse file
Copy file name to clipboardExpand all lines: numpy/meson.build +5-8Lines changed: 5 additions & 8 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -188,14 +188,6 @@ if not have_lapack and not allow_noblas |
188 | 188 | 'for some linear algebra operations).') |
189 | 189 | endif |
190 | 190 |
|
191 | | -# Generate version.py for sdist |
192 | | -gitversion = files('_build_utils/gitversion.py')[0] |
193 | | -python_bin = py.full_path() |
194 | | -meson.add_dist_script( |
195 | | - py, |
196 | | - [gitversion, '--meson-dist', '--write', 'numpy/version.py'] |
197 | | -) |
198 | | - |
199 | 191 | # Copy the main __init__.py|pxd files to the build dir (needed for Cython) |
200 | 192 | __init__py = fs.copyfile('__init__.py') |
201 | 193 | __init__pxd = fs.copyfile('__init__.pxd') |
@@ -257,6 +249,11 @@ endif |
257 | 249 |
|
258 | 250 | np_dir = py.get_install_dir() / 'numpy' |
259 | 251 |
|
| 252 | +# Generate version.py for sdist |
| 253 | +meson.add_dist_script( |
| 254 | + ['_build_utils/gitversion.py', '--meson-dist', '--write', |
| 255 | + 'numpy/version.py'] |
| 256 | +) |
260 | 257 | if not fs.exists('version.py') |
261 | 258 | generate_version = custom_target( |
262 | 259 | 'generate-version', |
|