[Numpy-svn] r4199 - in branches/numpy.scons: . numpy/core numpy/random

numpy-svn@scip... numpy-svn@scip...
Mon Oct 15 04:40:18 CDT 2007


Author: cdavid
Date: 2007-10-15 04:40:03 -0500 (Mon, 15 Oct 2007)
New Revision: 4199

Modified:
   branches/numpy.scons/
   branches/numpy.scons/numpy/core/SConstruct
   branches/numpy.scons/numpy/core/setupscons.py
   branches/numpy.scons/numpy/random/setupscons.py
   branches/numpy.scons/test.sh
Log:
All numpy.core now built with scons, pass all tests on linux


Property changes on: branches/numpy.scons
___________________________________________________________________
Name: bzr:revision-info
   - timestamp: 2007-10-15 17:03:15.628000021 +0900
committer: David Cournapeau <david@ar.media.kyoto-u.ac.jp>
properties: 
	branch-nick: numpy.scons

   + timestamp: 2007-10-15 18:00:09.984999895 +0900
committer: David Cournapeau <david@ar.media.kyoto-u.ac.jp>
properties: 
	branch-nick: numpy.scons

Name: bzr:file-ids
   - numpy/scons_fake/hook	hook-20071015073443-rtv8bjyd3wprxf89-1
numpy/scons_fake/hook/SConstruct	sconstruct-20071015073443-rtv8bjyd3wprxf89-2
numpy/scons_fake/hook/setup.py	setup.py-20071015073443-rtv8bjyd3wprxf89-3

   + 
Name: bzr:revision-id:v3-trunk0
   - 3737 david@david-laptop-20070920080908-n8pj8vmszdir3zoa
3738 david@david-laptop-20070920081509-58kkojgmml3t7jxs
3739 david@david-laptop-20070920081910-phlk1ujthksgpm0z
3740 david@david-laptop-20070920082641-bdhrt6eafeoli50i
3741 david@ar.media.kyoto-u.ac.jp-20070920130730-satdeppbh1k0bq2p
3743 david@ar.media.kyoto-u.ac.jp-20070921073742-vpv8pwv0j8fbd93m
3744 david@david-laptop-20070922101656-61kfi2faucemr2rl
3745 david@david-laptop-20070922113708-ror18thshang1cpu
3747 david@david-laptop-20070922140534-n9xsl096tjrzmct1
3749 david@david-laptop-20070922154007-usit009fr6vp377j
3750 david@david-laptop-20070923070011-leu2ozc2fy1q5cht
3751 david@david-laptop-20070924015925-dhsiao40jp7zsfp9
3752 david@ar.media.kyoto-u.ac.jp-20070924070657-nbw23j0ayan30cli
3753 david@ar.media.kyoto-u.ac.jp-20070924082918-i1lc1zikywi8czj4
3754 david@ar.media.kyoto-u.ac.jp-20070924083008-c0edtt8zs31yeh1q
3755 david@ar.media.kyoto-u.ac.jp-20070924112351-pnnho638cohz6lj1
3756 david@david-laptop-20070924153247-yftud00bynilxv69
3757 david@david-laptop-20070924163545-pish34x9fq2h66aj
3758 david@david-laptop-20070924164633-iiyygcaw81ji3n34
3759 david@david-laptop-20070924170201-y14v2yzikdpvamfp
3760 david@david-laptop-20070924171208-5bmitorzf49d1aa2
3761 david@david-laptop-20070925014444-ns9v90gotnxt39mq
3769 david@david-laptop-20070925145952-4osi81tvch7v6luj
3773 david@ar.media.kyoto-u.ac.jp-20070926073429-2kdc6yf1o210aer0
3774 david@ar.media.kyoto-u.ac.jp-20070926084356-938djoytjap90rmo
3775 david@ar.media.kyoto-u.ac.jp-20070926085329-3gquq3gu2k8rgzb0
3776 david@ar.media.kyoto-u.ac.jp-20071009084906-9kradhwpu7su633x
3777 david@ar.media.kyoto-u.ac.jp-20071009093339-q5nf5me6ikdi48k6
3778 david@david-laptop-20071009152108-xh5cltii0h6zjk9b
3779 david@david-laptop-20071009154954-v5se05gbq60opo1z
3780 david@david-laptop-20071009223102-vz2sgf5i6pncxsd8
3781 david@david-laptop-20071009225259-13m6enwqk4w9uihe
3782 david@ar.media.kyoto-u.ac.jp-20071010021710-liz2jvw0ggbxrtgi
3783 david@ar.media.kyoto-u.ac.jp-20071010032218-8qzxvdmith85a056
3784 david@ar.media.kyoto-u.ac.jp-20071010032323-lgbxfd788h402kn0
3792 david@ar.media.kyoto-u.ac.jp-20071011033223-s14976refgeaw00h
3793 david@ar.media.kyoto-u.ac.jp-20071011033241-rrzlo2vu6w0tkdwf
3794 david@ar.media.kyoto-u.ac.jp-20071011071251-c5pxigyynpck262d
3795 david@ar.media.kyoto-u.ac.jp-20071012040323-8ka0mgkx1t8r9fcl
3796 david@ar.media.kyoto-u.ac.jp-20071012042801-44pmvc5o1u6p6wi7
3797 david@ar.media.kyoto-u.ac.jp-20071012071207-nfpsuyfoq0ooy7xf
3798 david@ar.media.kyoto-u.ac.jp-20071012073426-8o9tejzovgk7qzi4
3799 david@ar.media.kyoto-u.ac.jp-20071012074103-1fzviuk1sunv0b9n
3800 david@ar.media.kyoto-u.ac.jp-20071012074129-t5nu6f96wie8fd1y
3801 david@ar.media.kyoto-u.ac.jp-20071012100715-sq8hhctu5tynlx4m
3802 david@david-laptop-20071013043839-hc3yfsbn0t7gsuhe
3803 david@david-laptop-20071013123319-vf4b7yhadz9nxasc
3804 david@david-laptop-20071014063148-0bsktlh609c3rpv7
3805 david@david-laptop-20071014064841-liamaqiv3af71r3g
3806 david@david-laptop-20071014064900-j4yzxzuveukuyj2l
3807 david@david-laptop-20071014124401-n3a37y67u5imyo83
3808 david@david-laptop-20071014161201-hdljwkhh4ep0f9k2
3809 david@david-laptop-20071014164521-c6i415hcz6hfrxxp
3810 david@david-laptop-20071015032315-g9fsm9zqk6fanyjz
3811 david@ar.media.kyoto-u.ac.jp-20071015043352-a24r1whpwiwiso80
3812 david@ar.media.kyoto-u.ac.jp-20071015054624-f8ecd3xiq5t64bjx
3813 david@ar.media.kyoto-u.ac.jp-20071015054650-q6t9itvdz8b36wmi
3814 david@ar.media.kyoto-u.ac.jp-20071015055114-4grsf3r93py358pq
3815 david@ar.media.kyoto-u.ac.jp-20071015063542-mharc6rxpnads86x
3816 david@ar.media.kyoto-u.ac.jp-20071015080315-u087sw2qmfa6a237

   + 3737 david@david-laptop-20070920080908-n8pj8vmszdir3zoa
3738 david@david-laptop-20070920081509-58kkojgmml3t7jxs
3739 david@david-laptop-20070920081910-phlk1ujthksgpm0z
3740 david@david-laptop-20070920082641-bdhrt6eafeoli50i
3741 david@ar.media.kyoto-u.ac.jp-20070920130730-satdeppbh1k0bq2p
3743 david@ar.media.kyoto-u.ac.jp-20070921073742-vpv8pwv0j8fbd93m
3744 david@david-laptop-20070922101656-61kfi2faucemr2rl
3745 david@david-laptop-20070922113708-ror18thshang1cpu
3747 david@david-laptop-20070922140534-n9xsl096tjrzmct1
3749 david@david-laptop-20070922154007-usit009fr6vp377j
3750 david@david-laptop-20070923070011-leu2ozc2fy1q5cht
3751 david@david-laptop-20070924015925-dhsiao40jp7zsfp9
3752 david@ar.media.kyoto-u.ac.jp-20070924070657-nbw23j0ayan30cli
3753 david@ar.media.kyoto-u.ac.jp-20070924082918-i1lc1zikywi8czj4
3754 david@ar.media.kyoto-u.ac.jp-20070924083008-c0edtt8zs31yeh1q
3755 david@ar.media.kyoto-u.ac.jp-20070924112351-pnnho638cohz6lj1
3756 david@david-laptop-20070924153247-yftud00bynilxv69
3757 david@david-laptop-20070924163545-pish34x9fq2h66aj
3758 david@david-laptop-20070924164633-iiyygcaw81ji3n34
3759 david@david-laptop-20070924170201-y14v2yzikdpvamfp
3760 david@david-laptop-20070924171208-5bmitorzf49d1aa2
3761 david@david-laptop-20070925014444-ns9v90gotnxt39mq
3769 david@david-laptop-20070925145952-4osi81tvch7v6luj
3773 david@ar.media.kyoto-u.ac.jp-20070926073429-2kdc6yf1o210aer0
3774 david@ar.media.kyoto-u.ac.jp-20070926084356-938djoytjap90rmo
3775 david@ar.media.kyoto-u.ac.jp-20070926085329-3gquq3gu2k8rgzb0
3776 david@ar.media.kyoto-u.ac.jp-20071009084906-9kradhwpu7su633x
3777 david@ar.media.kyoto-u.ac.jp-20071009093339-q5nf5me6ikdi48k6
3778 david@david-laptop-20071009152108-xh5cltii0h6zjk9b
3779 david@david-laptop-20071009154954-v5se05gbq60opo1z
3780 david@david-laptop-20071009223102-vz2sgf5i6pncxsd8
3781 david@david-laptop-20071009225259-13m6enwqk4w9uihe
3782 david@ar.media.kyoto-u.ac.jp-20071010021710-liz2jvw0ggbxrtgi
3783 david@ar.media.kyoto-u.ac.jp-20071010032218-8qzxvdmith85a056
3784 david@ar.media.kyoto-u.ac.jp-20071010032323-lgbxfd788h402kn0
3792 david@ar.media.kyoto-u.ac.jp-20071011033223-s14976refgeaw00h
3793 david@ar.media.kyoto-u.ac.jp-20071011033241-rrzlo2vu6w0tkdwf
3794 david@ar.media.kyoto-u.ac.jp-20071011071251-c5pxigyynpck262d
3795 david@ar.media.kyoto-u.ac.jp-20071012040323-8ka0mgkx1t8r9fcl
3796 david@ar.media.kyoto-u.ac.jp-20071012042801-44pmvc5o1u6p6wi7
3797 david@ar.media.kyoto-u.ac.jp-20071012071207-nfpsuyfoq0ooy7xf
3798 david@ar.media.kyoto-u.ac.jp-20071012073426-8o9tejzovgk7qzi4
3799 david@ar.media.kyoto-u.ac.jp-20071012074103-1fzviuk1sunv0b9n
3800 david@ar.media.kyoto-u.ac.jp-20071012074129-t5nu6f96wie8fd1y
3801 david@ar.media.kyoto-u.ac.jp-20071012100715-sq8hhctu5tynlx4m
3802 david@david-laptop-20071013043839-hc3yfsbn0t7gsuhe
3803 david@david-laptop-20071013123319-vf4b7yhadz9nxasc
3804 david@david-laptop-20071014063148-0bsktlh609c3rpv7
3805 david@david-laptop-20071014064841-liamaqiv3af71r3g
3806 david@david-laptop-20071014064900-j4yzxzuveukuyj2l
3807 david@david-laptop-20071014124401-n3a37y67u5imyo83
3808 david@david-laptop-20071014161201-hdljwkhh4ep0f9k2
3809 david@david-laptop-20071014164521-c6i415hcz6hfrxxp
3810 david@david-laptop-20071015032315-g9fsm9zqk6fanyjz
3811 david@ar.media.kyoto-u.ac.jp-20071015043352-a24r1whpwiwiso80
3812 david@ar.media.kyoto-u.ac.jp-20071015054624-f8ecd3xiq5t64bjx
3813 david@ar.media.kyoto-u.ac.jp-20071015054650-q6t9itvdz8b36wmi
3814 david@ar.media.kyoto-u.ac.jp-20071015055114-4grsf3r93py358pq
3815 david@ar.media.kyoto-u.ac.jp-20071015063542-mharc6rxpnads86x
3816 david@ar.media.kyoto-u.ac.jp-20071015080315-u087sw2qmfa6a237
3817 david@ar.media.kyoto-u.ac.jp-20071015090009-545f5h9rwg4g8tyr


Modified: branches/numpy.scons/numpy/core/SConstruct
===================================================================
--- branches/numpy.scons/numpy/core/SConstruct	2007-10-15 09:39:33 UTC (rev 4198)
+++ branches/numpy.scons/numpy/core/SConstruct	2007-10-15 09:40:03 UTC (rev 4199)
@@ -1,4 +1,4 @@
-# Last Change: Mon Oct 15 03:00 PM 2007 J
+# Last Change: Mon Oct 15 05:00 PM 2007 J
 # vim:syntax=python
 import os
 from os.path import join as pjoin, basename as pbasename, dirname as pdirname
@@ -243,7 +243,7 @@
     pjoin(env['src_dir'], 'code_generators', 'ufunc_api_order.txt'))
 
 # XXX
-#env.Append(CCFLAGS = "-W -Wall")
+#env.Append(CCFLAGS = "-Wall -O2")
 
 #-----------------
 # Build multiarray

Modified: branches/numpy.scons/numpy/core/setupscons.py
===================================================================
--- branches/numpy.scons/numpy/core/setupscons.py	2007-10-15 09:39:33 UTC (rev 4198)
+++ branches/numpy.scons/numpy/core/setupscons.py	2007-10-15 09:40:03 UTC (rev 4199)
@@ -5,190 +5,54 @@
 from numpy.distutils import log
 from distutils.dep_util import newer
 
-FUNCTIONS_TO_CHECK = [
-    ('expl', 'HAVE_LONGDOUBLE_FUNCS'),
-    ('expf', 'HAVE_FLOAT_FUNCS'),
-    ('log1p', 'HAVE_LOG1P'),
-    ('expm1', 'HAVE_EXPM1'),
-    ('asinh', 'HAVE_INVERSE_HYPERBOLIC'),
-    ('atanhf', 'HAVE_INVERSE_HYPERBOLIC_FLOAT'),
-    ('atanhl', 'HAVE_INVERSE_HYPERBOLIC_LONGDOUBLE'),
-    ('isnan', 'HAVE_ISNAN'),
-    ('isinf', 'HAVE_ISINF'),
-    ('rint', 'HAVE_RINT'),
-    ]
-
 def configuration(parent_package='',top_path=None):
     from numpy.distutils.misc_util import Configuration,dot_join
     from numpy.distutils.system_info import get_info, default_lib_dirs
 
     config = Configuration('core',parent_package,top_path)
     local_dir = config.local_path
-    #codegen_dir = join(local_dir,'code_generators')
 
-    #generate_umath_py = join(codegen_dir,'generate_umath.py')
-    #n = dot_join(config.name,'generate_umath')
-    #generate_umath = imp.load_module('_'.join(n.split('.')),
-    #                                 open(generate_umath_py,'U'),generate_umath_py,
-    #                                 ('.py','U',1))
-
     header_dir = 'include/numpy' # this is relative to config.path_in_package
-    config.add_sconscript('SConstruct')
 
-    #def generate_config_h(ext, build_dir):
-    #    target = join(build_dir,'config.h')
-    #    if newer(__file__,target):
-    #        config_cmd = config.get_config_cmd()
-    #        log.info('Generating %s',target)
-    #        tc = generate_testcode(target)
-    #        from distutils import sysconfig
-    #        python_include = sysconfig.get_python_inc()
-    #        python_h = join(python_include, 'Python.h')
-    #        if not os.path.isfile(python_h):
-    #            raise SystemError,\
-    #                  "Non-existing %s. Perhaps you need to install"\
-    #                  " python-dev|python-devel." % (python_h)
-    #        result = config_cmd.try_run(tc,include_dirs=[python_include],
-    #                                    library_dirs = default_lib_dirs)
-    #        if not result:
-    #            raise SystemError,"Failed to test configuration. "\
-    #                  "See previous error messages for more information."
+    # Add generated files to distutils...
+    def add_config_header():
+        scons_build_dir = config.get_scons_build_dir()
+        # XXX: I really have to think about how to communicate path info
+        # between scons and distutils, and set the options at one single
+        # location.
+        target = join(scons_build_dir, local_dir, 'config.h')
+        incl_dir = os.path.dirname(target)
+        if incl_dir not in config.numpy_include_dirs:
+            config.numpy_include_dirs.append(incl_dir)
+        config.add_data_files((header_dir, target)) 
 
-    #            # Python 2.3 causes a segfault when
-    #            #  trying to re-acquire the thread-state
-    #            #  which is done in error-handling
-    #            #  ufunc code.  NPY_ALLOW_C_API and friends
-    #            #  cause the segfault. So, we disable threading
-    #            #  for now.
-    #        if sys.version[:5] < '2.4.2':
-    #            nosmp = 1
-    #        else:
-    #            # Perhaps a fancier check is in order here.
-    #            #  so that threads are only enabled if there
-    #            #  are actually multiple CPUS? -- but
-    #            #  threaded code can be nice even on a single
-    #            #  CPU so that long-calculating code doesn't
-    #            #  block.
-    #            try:
-    #                nosmp = os.environ['NPY_NOSMP']
-    #                nosmp = 1
-    #            except KeyError:
-    #                nosmp = 0
-    #        if nosmp: moredefs = [('NPY_ALLOW_THREADS', '0')]
-    #        else: moredefs = []
-    #        #
-    #        mathlibs = []
-    #        tc = testcode_mathlib()
-    #        mathlibs_choices = [[],['m'],['cpml']]
-    #        mathlib = os.environ.get('MATHLIB')
-    #        if mathlib:
-    #            mathlibs_choices.insert(0,mathlib.split(','))
-    #        for libs in mathlibs_choices:
-    #            if config_cmd.try_run(tc,libraries=libs):
-    #                mathlibs = libs
-    #                break
-    #        else:
-    #            raise EnvironmentError("math library missing; rerun "
-    #                                   "setup.py after setting the "
-    #                                   "MATHLIB env variable")
-    #        ext.libraries.extend(mathlibs)
-    #        moredefs.append(('MATHLIB',','.join(mathlibs)))
+    def add_array_api():
+        scons_build_dir = config.get_scons_build_dir()
+        # XXX: I really have to think about how to communicate path info
+        # between scons and distutils, and set the options at one single
+        # location.
+        h_file = join(scons_build_dir, local_dir, '__multiarray_api.h')
+        t_file = join(scons_build_dir, local_dir, '__multiarray_api.txt')
+        config.add_data_files((header_dir, h_file),
+                              (header_dir, t_file))
 
-    #        def check_func(func_name):
-    #            return config_cmd.check_func(func_name,
-    #                                         libraries=mathlibs, decl=False,
-    #                                         headers=['math.h'])
+    def add_ufunc_api():
+        scons_build_dir = config.get_scons_build_dir()
+        # XXX: I really have to think about how to communicate path info
+        # between scons and distutils, and set the options at one single
+        # location.
+        h_file = join(scons_build_dir, local_dir, '__ufunc_api.h')
+        t_file = join(scons_build_dir, local_dir, '__ufunc_api.txt')
+        config.add_data_files((header_dir, h_file),
+                              (header_dir, t_file))
 
-    #        for func_name, defsymbol in FUNCTIONS_TO_CHECK:
-    #            if check_func(func_name):
-    #                moredefs.append(defsymbol)
+    def add_generated_files():
+        add_config_header()
+        add_array_api()
+        add_ufunc_api()
 
-    #        if sys.platform == 'win32':
-    #            moredefs.append('NPY_NO_SIGNAL')
+    config.add_sconscript('SConstruct', post_hook = add_generated_files)
 
-    #        if sys.platform=='win32' or os.name=='nt':
-    #            from distutils.msvccompiler import get_build_architecture
-    #            a = get_build_architecture()
-    #            print 'BUILD_ARCHITECTURE: %r, os.name=%r, sys.platform=%r' % (a, os.name, sys.platform)
-    #            if a == 'AMD64':
-    #                moredefs.append('DISTUTILS_USE_SDK')
-
-    #        if sys.version[:3] < '2.4':
-    #            if config_cmd.check_func('strtod', decl=False,
-    #                                     headers=['stdlib.h']):
-    #                moredefs.append(('PyOS_ascii_strtod', 'strtod'))
-
-    #        target_f = open(target,'a')
-    #        for d in moredefs:
-    #            if isinstance(d,str):
-    #                target_f.write('#define %s\n' % (d))
-    #            else:
-    #                target_f.write('#define %s %s\n' % (d[0],d[1]))
-    #        if not nosmp:  # default is to use WITH_THREAD
-    #            target_f.write('#ifdef WITH_THREAD\n#define NPY_ALLOW_THREADS 1\n#else\n#define NPY_ALLOW_THREADS 0\n#endif\n')
-    #        target_f.close()
-    #        print 'File:',target
-    #        target_f = open(target)
-    #        print target_f.read()
-    #        target_f.close()
-    #        print 'EOF'
-    #    else:
-    #        mathlibs = []
-    #        target_f = open(target)
-    #        for line in target_f.readlines():
-    #            s = '#define MATHLIB'
-    #            if line.startswith(s):
-    #                value = line[len(s):].strip()
-    #                if value:
-    #                    mathlibs.extend(value.split(','))
-    #        target_f.close()
-
-    #    ext.libraries.extend(mathlibs)
-
-    #    incl_dir = os.path.dirname(target)
-    #    if incl_dir not in config.numpy_include_dirs:
-    #        config.numpy_include_dirs.append(incl_dir)
-
-    #    config.add_data_files((header_dir,target))
-    #    return target
-
-    #def generate_api_func(module_name):
-    #    def generate_api(ext, build_dir):
-    #        script = join(codegen_dir, module_name + '.py')
-    #        sys.path.insert(0, codegen_dir)
-    #        try:
-    #            m = __import__(module_name)
-    #            log.info('executing %s', script)
-    #            h_file, c_file, doc_file = m.generate_api(build_dir)
-    #        finally:
-    #            del sys.path[0]
-    #        config.add_data_files((header_dir, h_file),
-    #                              (header_dir, doc_file))
-    #        return (h_file,)
-    #    return generate_api
-
-    #generate_array_api = generate_api_func('generate_array_api')
-    #generate_ufunc_api = generate_api_func('generate_ufunc_api')
-
-    #def generate_umath_c(ext,build_dir):
-    #    target = join(build_dir,'__umath_generated.c')
-    #    script = generate_umath_py
-    #    if newer(script,target):
-    #        f = open(target,'w')
-    #        f.write(generate_umath.make_code(generate_umath.defdict,
-    #                                         generate_umath.__file__))
-    #        f.close()
-    #    return []
-
-    # Add generated files to distutils...
-    #print dir(config)
-    #print config.get_build_temp_dir()
-    #config_header = os.path.dirname(
-    #    incl_dir = os.path.dirname(target)
-    #    if incl_dir not in config.numpy_include_dirs:
-    #        config.numpy_include_dirs.append(incl_dir)
-
-    #    config.add_data_files((header_dir,target))
     config.add_data_files('include/numpy/*.h')
     config.add_include_dirs('src')
 
@@ -198,15 +62,15 @@
     if sys.platform == 'cygwin':
         config.add_data_dir('include/numpy/fenv')
 
-    # Configure blasdot
-    blas_info = get_info('blas_opt',0)
-    #blas_info = {}
-    def get_dotblas_sources(ext, build_dir):
-        if blas_info:
-            if ('NO_ATLAS_INFO',1) in blas_info.get('define_macros',[]):
-                return None # dotblas needs ATLAS, Fortran compiled blas will not be sufficient.
-            return ext.depends[:1]
-        return None # no extension module will be built
+    # # Configure blasdot
+    # blas_info = get_info('blas_opt',0)
+    # #blas_info = {}
+    # def get_dotblas_sources(ext, build_dir):
+    #     if blas_info:
+    #         if ('NO_ATLAS_INFO',1) in blas_info.get('define_macros',[]):
+    #             return None # dotblas needs ATLAS, Fortran compiled blas will not be sufficient.
+    #         return ext.depends[:1]
+    #     return None # no extension module will be built
 
     config.add_data_dir('tests')
     config.make_svn_version_py()
@@ -223,72 +87,6 @@
 }
 """
 
-# import sys
-# def generate_testcode(target):
-#     if sys.platform == 'win32':
-#         target = target.replace('\\','\\\\')
-#     testcode = [r'''
-# #include <Python.h>
-# #include <limits.h>
-# #include <stdio.h>
-# 
-# int main(int argc, char **argv)
-# {
-# 
-#         FILE *fp;
-# 
-#         fp = fopen("'''+target+'''","w");
-#         ''']
-# 
-#     c_size_test = r'''
-# #ifndef %(sz)s
-#           fprintf(fp,"#define %(sz)s %%d\n", sizeof(%(type)s));
-# #else
-#           fprintf(fp,"/* #define %(sz)s %%d */\n", %(sz)s);
-# #endif
-# '''
-#     for sz, t in [('SIZEOF_SHORT', 'short'),
-#                   ('SIZEOF_INT', 'int'),
-#                   ('SIZEOF_LONG', 'long'),
-#                   ('SIZEOF_FLOAT', 'float'),
-#                   ('SIZEOF_DOUBLE', 'double'),
-#                   ('SIZEOF_LONG_DOUBLE', 'long double'),
-#                   ('SIZEOF_PY_INTPTR_T', 'Py_intptr_t'),
-#                   ]:
-#         testcode.append(c_size_test % {'sz' : sz, 'type' : t})
-# 
-#     testcode.append('#ifdef PY_LONG_LONG')
-#     testcode.append(c_size_test % {'sz' : 'SIZEOF_LONG_LONG',
-#                                    'type' : 'PY_LONG_LONG'})
-#     testcode.append(c_size_test % {'sz' : 'SIZEOF_PY_LONG_LONG',
-#                                    'type' : 'PY_LONG_LONG'})
-# 
-# 
-#     testcode.append(r'''
-# #else
-#         fprintf(fp, "/* PY_LONG_LONG not defined */\n");
-# #endif
-# #ifndef CHAR_BIT
-#           {
-#              unsigned char var = 2;
-#              int i=0;
-#              while (var >= 2) {
-#                      var = var << 1;
-#                      i++;
-#              }
-#              fprintf(fp,"#define CHAR_BIT %d\n", i+1);
-#           }
-# #else
-#           fprintf(fp, "/* #define CHAR_BIT %d */\n", CHAR_BIT);
-# #endif
-#           fclose(fp);
-#           return 0;
-# }
-# ''')
-#     testcode = '\n'.join(testcode)
-#     return testcode
-
 if __name__=='__main__':
     from numpy.distutils.core import setup
     setup(configuration=configuration)
-

Modified: branches/numpy.scons/numpy/random/setupscons.py
===================================================================
--- branches/numpy.scons/numpy/random/setupscons.py	2007-10-15 09:39:33 UTC (rev 4198)
+++ branches/numpy.scons/numpy/random/setupscons.py	2007-10-15 09:40:03 UTC (rev 4199)
@@ -9,7 +9,9 @@
         if top_path is None:
             libs = get_mathlibs()
         else:
-            path = join(split(build_dir)[0],'core')
+            #path = join(split(build_dir)[0],'core')
+            # XXX
+            path = join(config.get_scons_build_dir(), 'numpy','core')
             libs = get_mathlibs(path)
         tc = testcode_wincrypt()
         if config_cmd.try_run(tc):

Modified: branches/numpy.scons/test.sh
===================================================================
--- branches/numpy.scons/test.sh	2007-10-15 09:39:33 UTC (rev 4198)
+++ branches/numpy.scons/test.sh	2007-10-15 09:40:03 UTC (rev 4199)
@@ -3,6 +3,5 @@
 rm -rf $PREFIX
 python setupscons.py scons
 python setupscons.py build
-#--prefix=$PREFIX
-##python setup.py install --prefix=$PREFIX
-#(cd $PREFIX && PYTHONPATH=$PREFIX/lib/python2.5/site-packages python -c "import numpy; print numpy; numpy.test(level = 9999)")
+python setupscons.py install --prefix=$PREFIX
+(cd $PREFIX && PYTHONPATH=$PREFIX/lib/python2.5/site-packages python -c "import numpy; print numpy; numpy.test(level = 9999)")



More information about the Numpy-svn mailing list