[Numpy-svn] r4113 - in branches: . numpy.scons numpy.scons/numpy/distutils/scons numpy.scons/numpy/scons_fake

numpy-svn@scip... numpy-svn@scip...
Mon Sep 24 06:36:39 CDT 2007


Author: cdavid
Date: 2007-09-24 06:36:30 -0500 (Mon, 24 Sep 2007)
New Revision: 4113

Added:
   branches/numpy.scons/
Removed:
   branches/numpy.scons/
Modified:
   branches/numpy.scons/numpy/distutils/scons/__init__.py
   branches/numpy.scons/numpy/scons_fake/SConstruct
Log:
Start playing with configuration from site.cfg

Copied: branches/numpy.scons (from rev 4111, branches/numpy.scons)


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

Name: bzr:file-ids
   + 
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

Name: svn:ignore
   + dist
build
numpy.egg-info


Name: svnmerge-integrated
   + /branches/distutils-revamp:1-2752 /branches/multicore:1-3687 /trunk:1-2871
Name: svk:merge
   + 0cecc865-f901-0410-ba8f-b2c75a717db0:/local/scipy_core:1600
0cecc865-f901-0410-ba8f-b2c75a717db0:/local/scipy_core/branches/newcore:723
ad311012-0000-0410-80c7-f29fd8fc08ef:/local/newcore:3539

Modified: branches/numpy.scons/numpy/distutils/scons/__init__.py
===================================================================
--- branches/numpy.scons/numpy/distutils/scons/__init__.py	2007-09-24 07:16:44 UTC (rev 4111)
+++ branches/numpy.scons/numpy/distutils/scons/__init__.py	2007-09-24 11:36:30 UTC (rev 4113)
@@ -92,8 +92,35 @@
     Help(opts.GenerateHelpText(env))
 
     #print "setup.cfg abspath is %s" % pjoin(env['src_dir'], 'setup.cfg')
+    find_config_file()
     return env
 
 def find_config_file(name = 'site.cfg'):
-    # According to system_info in 
-    pass
+    import ConfigParser
+
+    from numpy.distutils.system_info import default_lib_dirs
+    from numpy.distutils.system_info import default_include_dirs
+    from numpy.distutils.system_info import default_src_dirs
+    from numpy.distutils.system_info import get_standard_file
+
+    section = 'DEFAULT'
+    defaults = {}
+    defaults['libraries'] = ''
+    defaults['library_dirs'] = os.pathsep.join(default_lib_dirs)
+    defaults['include_dirs'] = os.pathsep.join(default_include_dirs)
+    defaults['src_dirs'] = os.pathsep.join(default_src_dirs)
+    cp = ConfigParser.ConfigParser(defaults)
+    files = []
+    files.extend(get_standard_file('.numpy-site.cfg'))
+    files.extend(get_standard_file('site.cfg'))
+
+    def parse_config_files():
+        cp.read(files)
+        if not cp.has_section(section):
+            cp.add_section(section)
+
+    parse_config_files()
+    #print cp.sections()
+    #print dir(cp)
+    #print cp.get.__doc__
+    print cp.get('sndfile', 'include_dirs')

Modified: branches/numpy.scons/numpy/scons_fake/SConstruct
===================================================================
--- branches/numpy.scons/numpy/scons_fake/SConstruct	2007-09-24 07:16:44 UTC (rev 4111)
+++ branches/numpy.scons/numpy/scons_fake/SConstruct	2007-09-24 11:36:30 UTC (rev 4113)
@@ -6,6 +6,7 @@
 config = env.Configure()
 config.CheckHeader('stdio.h')
 config.CheckLib('c', 'printf')
+config.CheckLib('sndfile', 'sf_open')
 config.Finish()
 
 source = ['foo.c']



More information about the Numpy-svn mailing list