Skip to content

Commit 5093711

Browse files
committed
MAINT: add a 'tests' install tag to the numpy._core._simd extension module
This avoids installing `_simd.so` when the 'tests' install tag is omitted in order to strip the whole test suite. This is a significant saving in binary size especially on x86-64 (see issue 25737, about 10% of the installed size). Tested on macOS arm64 too, there `_simd.so` is 363 kb for a release build, or ~12% of the size of the main extension module (`_multiarray_umath.so`).
1 parent be20220 commit 5093711

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

numpy/_core/meson.build

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1278,6 +1278,7 @@ py.extension_module('_simd',
12781278
link_with: [npymath_lib, _simd_mtargets.static_lib('_simd_mtargets')],
12791279
install: true,
12801280
subdir: 'numpy/_core',
1281+
install_tag: 'tests',
12811282
)
12821283

12831284
python_sources = [

0 commit comments

Comments
 (0)