summaryrefslogtreecommitdiff
path: root/numpy/core/setup.py
diff options
context:
space:
mode:
authorJeremy Volkman <jeremy@jvolkman.com>2022-05-20 10:57:43 -0700
committerJeremy Volkman <jeremy@jvolkman.com>2022-05-20 11:01:39 -0700
commitd40359f5de11c3885de66a5e5e7f3f3544e3ac9e (patch)
treee008d0d74c859477cdc6703f16ec66eaee8776a8 /numpy/core/setup.py
parentae8b9ce90dc2d5922def5db8cf7d4410c60b3e13 (diff)
downloadnumpy-d40359f5de11c3885de66a5e5e7f3f3544e3ac9e.tar.gz
BLD: Sort svml objects to keep builds reproducible
The output ordering of glob.glob() is not guaranteed to be deterministic. In scenarios where it is not, the _multiarray_umath library is not reproducible. This change simply sorts the svml objects returned by glob.glob() to make sure order is deterministic.
Diffstat (limited to 'numpy/core/setup.py')
-rw-r--r--numpy/core/setup.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/numpy/core/setup.py b/numpy/core/setup.py
index dd60a00db..fe9020111 100644
--- a/numpy/core/setup.py
+++ b/numpy/core/setup.py
@@ -1113,6 +1113,10 @@ def configuration(parent_package='',top_path=None):
svml_objs = glob.glob(svml_path + '/**/*.s', recursive=True)
svml_objs = [o for o in svml_objs if not o.endswith(svml_filter)]
+ # The ordering of names returned by glob is undefined, so we sort
+ # to make builds reproducible.
+ svml_objs.sort()
+
config.add_extension('_multiarray_umath',
# Forcing C language even though we have C++ sources.
# It forces the C linker and don't link C++ runtime.