summaryrefslogtreecommitdiff
path: root/numpy
diff options
context:
space:
mode:
authorDavid Cournapeau <cournape@gmail.com>2013-01-21 19:33:11 +0000
committerCharles Harris <charlesr.harris@gmail.com>2013-01-24 09:52:12 -0700
commit63cf49de635ec1d64967ed746ea4839935d80bcd (patch)
tree3ece385b45be065174de31af0f9ae10de1792ff4 /numpy
parent2b4c9a66c8485973291076a6a1d3a3e9a3ffa5cc (diff)
downloadnumpy-63cf49de635ec1d64967ed746ea4839935d80bcd.tar.gz
REF: make the separate compilation env handling a tad simpler.
Diffstat (limited to 'numpy')
-rw-r--r--numpy/core/bscript6
-rw-r--r--numpy/core/setup.py6
2 files changed, 2 insertions, 10 deletions
diff --git a/numpy/core/bscript b/numpy/core/bscript
index 5c5c6e4c1..83c0b4b6f 100644
--- a/numpy/core/bscript
+++ b/numpy/core/bscript
@@ -30,11 +30,7 @@ from setup_common \
C99_FUNCS_SINGLE, C99_COMPLEX_TYPES, C99_COMPLEX_FUNCS, \
MANDATORY_FUNCS, C_ABI_VERSION, C_API_VERSION
-try:
- val = os.environ['NPY_SEPARATE_COMPILATION']
- ENABLE_SEPARATE_COMPILATION = (val != "0")
-except KeyError:
- ENABLE_SEPARATE_COMPILATION = False
+ENABLE_SEPARATE_COMPILATION = (os.environ.get('NPY_SEPARATE_COMPILATION', "0") != "0")
NUMPYCONFIG_SYM = []
diff --git a/numpy/core/setup.py b/numpy/core/setup.py
index a1000ae0b..e0a114483 100644
--- a/numpy/core/setup.py
+++ b/numpy/core/setup.py
@@ -12,11 +12,7 @@ import re
from setup_common import *
# Set to True to enable multiple file compilations (experimental)
-try:
- val = os.environ['NPY_SEPARATE_COMPILATION']
- ENABLE_SEPARATE_COMPILATION = (val != "0")
-except KeyError:
- ENABLE_SEPARATE_COMPILATION = False
+ENABLE_SEPARATE_COMPILATION = (os.environ.get('NPY_SEPARATE_COMPILATION', "0") != "0")
# XXX: ugly, we use a class to avoid calling twice some expensive functions in
# config.h/numpyconfig.h. I don't see a better way because distutils force