[cgkit-commits] SF.net SVN: cgkit:[322] cgkit/trunk
Brought to you by:
mbaas
From: <mb...@us...> - 2009-06-24 09:21:10
|
Revision: 322 http://cgkit.svn.sourceforge.net/cgkit/?rev=322&view=rev Author: mbaas Date: 2009-06-24 09:20:36 +0000 (Wed, 24 Jun 2009) Log Message: ----------- Read a version-specific config file in addition to the general config file. Modified Paths: -------------- cgkit/trunk/changelog.txt cgkit/trunk/setup.py Modified: cgkit/trunk/changelog.txt =================================================================== --- cgkit/trunk/changelog.txt 2009-06-21 07:42:06 UTC (rev 321) +++ cgkit/trunk/changelog.txt 2009-06-24 09:20:36 UTC (rev 322) @@ -10,6 +10,8 @@ Bug fixes/enhancements: +- setup script: In addition to the general config file config.cfg the setup + script also reads a version-specific config_pyXY.cfg script. - mat4: Wrapped the mat4 constructor that takes 16 floats as input. Because this one was missing, calling copy.copy() on a mat4 that was returned by the library (instead of being created by the user) did not work. Modified: cgkit/trunk/setup.py =================================================================== --- cgkit/trunk/setup.py 2009-06-21 07:42:06 UTC (rev 321) +++ cgkit/trunk/setup.py 2009-06-24 09:20:36 UTC (rev 322) @@ -241,14 +241,23 @@ vars = get_config_vars() vars["OPT"] = vars["OPT"].replace("-g", "") -# Read the config file -if os.path.exists("config.cfg"): - exec(open("config.cfg").read()) +# Read the general config file +configName = "config.cfg" +if os.path.exists(configName): + print ("Reading %s..."%configName) + exec(open(configName).read()) else: - print (70*"-") - print ("Warning: No config file available (config.cfg)") - print (70*"-") + print ("Config file (%s) not available"%configName) +# Read the version-specific config file +vi = sys.version_info +configName = "config_py%s%s.cfg"%vi[:2] +if os.path.exists(configName): + print ("Reading %s..."%configName) + exec(open(configName).read()) +else: + print ("Version-specific config file (%s) not available"%configName) + # Disable all optional libs, STL and Boost for the light version... if INSTALL_CGKIT_LIGHT: LIB3DS_AVAILABLE = False This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |