summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Cournapeau <cournape@gmail.com>2008-01-08 13:46:46 +0000
committerDavid Cournapeau <cournape@gmail.com>2008-01-08 13:46:46 +0000
commite8e32687533260b7b93fbef864212fac2d5a51f3 (patch)
treea462eaec31b64e813eae48d65260cfb24c5eaae2
parent4904ae7f18b760a1ac0738ab252c1e3be8220cb4 (diff)
downloadnumpy-e8e32687533260b7b93fbef864212fac2d5a51f3.tar.gz
Now we use automatically generated config header instead of old kludge taken
from setup.py.
-rw-r--r--numpy/core/SConstruct16
-rw-r--r--numpy/core/scons_support.py8
2 files changed, 16 insertions, 8 deletions
diff --git a/numpy/core/SConstruct b/numpy/core/SConstruct
index 70305e2ea..e3208957d 100644
--- a/numpy/core/SConstruct
+++ b/numpy/core/SConstruct
@@ -12,7 +12,7 @@ from numscons import write_info
from scons_support import CheckBrokenMathlib, define_no_smp, \
generate_config_header, generate_config_header_emitter, \
- check_mlib, check_mlibs
+ check_mlib, check_mlibs, is_npy_no_signal
env = GetNumpyEnvironment(ARGUMENTS)
env.Append(CPPPATH = [get_python_inc()])
@@ -27,7 +27,7 @@ if os.name == 'nt':
#=======================
# XXX: separate env for configuration
config = env.NumpyConfigure(custom_tests = {'CheckBrokenMathlib' : CheckBrokenMathlib,
- 'CheckCBLAS' : CheckCBLAS}, config_h = 'scons_config.h')
+ 'CheckCBLAS' : CheckCBLAS}, config_h = pjoin(env['build_dir'], 'config.h'))
# Convention: list of tuples (definition, value). value:
# - 0: #undef definition
@@ -64,7 +64,9 @@ check_type('PY_LONG_LONG', include = "#include <Python.h>\n")
#----------------------
# Checking signal stuff
#----------------------
-# TODO
+if is_npy_no_signal():
+ config_sym.append(('NPY_NOSMP', '1'))
+ config.Define('NPY_NOSMP', 1, "define to 1 to disable SMP support ")
#------------------------------------------
# Checking the mathlib and its capabilities
@@ -157,9 +159,9 @@ if sys.platform=='win32' or os.name=='nt':
if a == 'AMD64':
distutils_use_sdk = 1
if distutils_use_sdk:
- moredefs.append(('DISTUTILS_USE_SDK', 1))
-config.Define('DISTUTILS_USE_SDK', distutils_use_sdk,
- "define to 1 to disable SMP support ")
+ moredefs.append('DISTUTILS_USE_SDK')
+ config.Define('DISTUTILS_USE_SDK', distutils_use_sdk,
+ "define to 1 to disable SMP support ")
#--------------
# Checking Blas
@@ -228,7 +230,7 @@ env.Append(BUILDERS = {'GenerateMultiarrayApi' : array_api_gen_bld,
# option ?)
from os.path import join as pjoin
-config_header = env.GenerateConfigHeader(pjoin(env['build_dir'], 'config.h'), [])
+#config_header = env.GenerateConfigHeader(pjoin(env['build_dir'], 'config.h'), [])
scalartypes_src = env.GenerateFromTemplate(
pjoin(env['build_dir'], 'src', 'scalartypes'),
diff --git a/numpy/core/scons_support.py b/numpy/core/scons_support.py
index 2b0fadc3a..f682e644a 100644
--- a/numpy/core/scons_support.py
+++ b/numpy/core/scons_support.py
@@ -1,4 +1,4 @@
-#! Last Change: Tue Jan 08 08:00 PM 2008 J
+#! Last Change: Tue Jan 08 10:00 PM 2008 J
__docstring__ = """Code to support special facilities to scons which are only
useful for numpy.core, hence not put into numpy.distutils.scons"""
@@ -186,6 +186,12 @@ def check_mlibs(config, mlibs):
"one using the MATHLIB env variable, eg "\
"'MATHLIB=m python setup.py build'")
+
+def is_npy_no_signal():
+ """Return True if the NPY_NO_SIGNAL symbol must be defined in configuration
+ header."""
+ return sys.platform == 'win32'
+
def define_no_smp():
"""Returns True if we should define NPY_NOSMP, False otherwise."""
#--------------------------------