[yt-svn] commit/yt: ngoldbaum: setup: fix when __builtins__ is a dict that does not allow setting attributes
commits-noreply at bitbucket.org
commits-noreply at bitbucket.org
Thu Dec 15 09:44:13 PST 2016
1 new commit in yt:
https://bitbucket.org/yt_analysis/yt/commits/4a26ce98d99a/
Changeset: 4a26ce98d99a
Branch: yt
User: ngoldbaum
Date: 2016-12-14 03:52:36+00:00
Summary: setup: fix when __builtins__ is a dict that does not allow setting attributes
Affected #: 1 file
diff -r 011cd19563215cefb3facfd5d6f575b6b38de0db -r 4a26ce98d99a266da2367d78eff17cafd7cb80b1 setup.py
--- a/setup.py
+++ b/setup.py
@@ -317,7 +317,12 @@
_build_ext.finalize_options(self)
# Prevent numpy from thinking it is still in its setup process
# see http://stackoverflow.com/a/21621493/1382869
- __builtins__.__NUMPY_SETUP__ = False
+ if isinstance(__builtins__, dict):
+ # sometimes this is a dict so we need to check for that
+ # https://docs.python.org/3/library/builtins.html
+ __builtins__["__NUMPY_SETUP__"] = False
+ else:
+ __builtins__.__NUMPY_SETUP__ = False
import numpy
self.include_dirs.append(numpy.get_include())
Repository URL: https://bitbucket.org/yt_analysis/yt/
--
This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.
More information about the yt-svn
mailing list