[Numpy-svn] r5464 - in branches/1.1.x/numpy: core distutils random
numpy-svn at scipy.org
numpy-svn at scipy.org
Sun Jul 20 03:07:55 EDT 2008
Author: charris
Date: 2008-07-20 02:07:51 -0500 (Sun, 20 Jul 2008)
New Revision: 5464
Modified:
branches/1.1.x/numpy/core/setup.py
branches/1.1.x/numpy/distutils/misc_util.py
branches/1.1.x/numpy/random/setup.py
Log:
Revert r5461, it seems to cause obscure problems
Modified: branches/1.1.x/numpy/core/setup.py
===================================================================
--- branches/1.1.x/numpy/core/setup.py 2008-07-20 06:40:59 UTC (rev 5463)
+++ branches/1.1.x/numpy/core/setup.py 2008-07-20 07:07:51 UTC (rev 5464)
@@ -65,10 +65,7 @@
header_dir = 'include/numpy' # this is relative to config.path_in_package
def generate_config_h(ext, build_dir):
- target = join(build_dir,header_dir,'config.h')
- dir = os.path.dirname(target)
- if not os.path.exists(dir):
- os.makedirs(dir)
+ target = join(build_dir,'config.h')
if newer(__file__,target):
config_cmd = config.get_config_cmd()
log.info('Generating %s',target)
@@ -162,10 +159,7 @@
def generate_numpyconfig_h(ext, build_dir):
"""Depends on config.h: generate_config_h has to be called before !"""
- target = join(build_dir,header_dir,'numpyconfig.h')
- dir = os.path.dirname(target)
- if not os.path.exists(dir):
- os.makedirs(dir)
+ target = join(build_dir,'numpyconfig.h')
if newer(__file__,target):
config_cmd = config.get_config_cmd()
log.info('Generating %s',target)
@@ -204,7 +198,7 @@
try:
m = __import__(module_name)
log.info('executing %s', script)
- h_file, c_file, doc_file = m.generate_api(os.path.join(build_dir, header_dir))
+ h_file, c_file, doc_file = m.generate_api(build_dir)
finally:
del sys.path[0]
config.add_data_files((header_dir, h_file),
@@ -216,10 +210,7 @@
generate_ufunc_api = generate_api_func('generate_ufunc_api')
def generate_umath_c(ext,build_dir):
- target = join(build_dir,header_dir,'__umath_generated.c')
- dir = os.path.dirname(target)
- if not os.path.exists(dir):
- os.makedirs(dir)
+ target = join(build_dir,'__umath_generated.c')
script = generate_umath_py
if newer(script,target):
f = open(target,'w')
Modified: branches/1.1.x/numpy/distutils/misc_util.py
===================================================================
--- branches/1.1.x/numpy/distutils/misc_util.py 2008-07-20 06:40:59 UTC (rev 5463)
+++ branches/1.1.x/numpy/distutils/misc_util.py 2008-07-20 07:07:51 UTC (rev 5464)
@@ -114,20 +114,9 @@
def get_mathlibs(path=None):
"""Return the MATHLIB line from numpyconfig.h
"""
- if path is not None:
- config_file = os.path.join(path,'numpyconfig.h')
- else:
- # Look for the file in each of the numpy include directories.
- dirs = get_numpy_include_dirs()
- for path in dirs:
- fn = os.path.join(path,'numpyconfig.h')
- if os.path.exists(fn):
- config_file = fn
- break
- else:
- raise DistutilsError('numpyconfig.h not found in numpy include '
- 'dirs %r' % (dirs,))
-
+ if path is None:
+ path = os.path.join(get_numpy_include_dirs()[0], 'numpy')
+ config_file = os.path.join(path,'numpyconfig.h')
fid = open(config_file)
mathlibs = []
s = '#define MATHLIB'
Modified: branches/1.1.x/numpy/random/setup.py
===================================================================
--- branches/1.1.x/numpy/random/setup.py 2008-07-20 06:40:59 UTC (rev 5463)
+++ branches/1.1.x/numpy/random/setup.py 2008-07-20 07:07:51 UTC (rev 5464)
@@ -6,7 +6,11 @@
def generate_libraries(ext, build_dir):
config_cmd = config.get_config_cmd()
- libs = get_mathlibs()
+ if top_path is None:
+ libs = get_mathlibs()
+ else:
+ path = join(split(build_dir)[0],'core')
+ libs = get_mathlibs(path)
tc = testcode_wincrypt()
if config_cmd.try_run(tc):
libs.append('Advapi32')
More information about the Numpy-svn
mailing list