summaryrefslogtreecommitdiff
path: root/lang/python/numpy
diff options
context:
space:
mode:
authorJeffery To <jeffery.to@gmail.com>2023-05-10 23:49:46 +0800
committerJeffery To <jeffery.to@gmail.com>2023-05-11 02:46:57 +0800
commit3cee44d88837b5679a96f0155205ec15883d5aef (patch)
tree8ae37b8c85a84cbb2666b12914dadd0137df4a7c /lang/python/numpy
parent5cafab68ff5bddf5470e7674bb0bf8d0415e8804 (diff)
numpy: Avoid build user config files
This stops numpy from reading .numpy-site.cfg in the build user's home directory. The code actually tries to find both .numpy-site.cfg and site.cfg in the user's home directory; this patch prevents both. Signed-off-by: Jeffery To <jeffery.to@gmail.com>
Diffstat (limited to 'lang/python/numpy')
-rw-r--r--lang/python/numpy/Makefile2
-rw-r--r--lang/python/numpy/patches/002-avoid-build-user-config-files.patch11
2 files changed, 12 insertions, 1 deletions
diff --git a/lang/python/numpy/Makefile b/lang/python/numpy/Makefile
index 10a954da9..d7e485d79 100644
--- a/lang/python/numpy/Makefile
+++ b/lang/python/numpy/Makefile
@@ -7,7 +7,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=numpy
PKG_VERSION:=1.23.3
-PKG_RELEASE:=4
+PKG_RELEASE:=5
PYPI_NAME:=$(PKG_NAME)
PKG_HASH:=51bf49c0cd1d52be0a240aa66f3458afc4b95d8993d2d04f0d91fa60c10af6cd
diff --git a/lang/python/numpy/patches/002-avoid-build-user-config-files.patch b/lang/python/numpy/patches/002-avoid-build-user-config-files.patch
new file mode 100644
index 000000000..15c76e3dc
--- /dev/null
+++ b/lang/python/numpy/patches/002-avoid-build-user-config-files.patch
@@ -0,0 +1,11 @@
+--- a/numpy/distutils/system_info.py
++++ b/numpy/distutils/system_info.py
+@@ -400,7 +400,7 @@ def get_standard_file(fname):
+ pass
+ else:
+ user_file = os.path.join(f, fname)
+- if os.path.isfile(user_file):
++ if "_PYTHON_HOST_PLATFORM" not in os.environ and os.path.isfile(user_file):
+ filenames.append(user_file)
+
+ # Local file