Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit db387d5

Browse files
committed
Install version.py only when pre-built (build from sdist)
1 parent 77197d9 commit db387d5

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

numpy/meson.build

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -219,8 +219,7 @@ python_sources = [
219219
'dtypes.py',
220220
'dtypes.pyi',
221221
'matlib.py',
222-
'py.typed',
223-
'version.py'
222+
'py.typed'
224223
]
225224

226225
py.install_sources(
@@ -269,6 +268,12 @@ if not fs.exists('version.py')
269268
command: [py, '@INPUT@', '--write', '@OUTPUT@'],
270269
install_dir: np_dir
271270
)
271+
else
272+
# When building from sdist, version.py exists and should be included
273+
py.install_sources(
274+
['version.py'],
275+
subdir : 'numpy'
276+
)
272277
endif
273278

274279
foreach subdir: pure_subdirs

0 commit comments

Comments
 (0)