summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRalf Gommers <ralf.gommers@gmail.com>2016-08-21 17:23:35 +1200
committerRalf Gommers <ralf.gommers@gmail.com>2016-09-03 16:55:26 +1200
commitbbee747c4d53232e5e12a56cc22d7e2365a9d162 (patch)
tree89b58dade18404ef00e4c7b42885f9795cafdcff
parent276423aa7f4f7d39189ee5ccf7b167ad2c9c25a7 (diff)
downloadnumpy-bbee747c4d53232e5e12a56cc22d7e2365a9d162.tar.gz
BLD: remove __NUMPY_SETUP__ from builtins at end of setup.py
May help reduce the occurrence of gh-2434.
-rwxr-xr-xsetup.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/setup.py b/setup.py
index 8b8863255..3f4ccfb14 100755
--- a/setup.py
+++ b/setup.py
@@ -388,3 +388,8 @@ def setup_package():
if __name__ == '__main__':
setup_package()
+ # This may avoid problems where numpy is installed via ``*_requires`` by
+ # setuptools, the global namespace isn't reset properly, and then numpy is
+ # imported later (which will then fail to load numpy extension modules).
+ # See gh-7956 for details
+ del builtins.__NUMPY_SETUP__