[SCM] polybori: Polynomials over Boolean Rings branch, master, updated. upstream/0.8.2-174-g5b14c47

Alexander Dreyer adreyer at gmx.de
Mon Jan 28 22:00:50 UTC 2013


The following commit has been merged in the master branch:
commit 910506fe4098de991ec68bf4bae14be4ac17bbb1
Author: Alexander Dreyer <adreyer at gmx.de>
Date:   Mon Jan 28 02:44:09 2013 +0100

    Don't store temp config as py module

diff --git a/SConstruct b/SConstruct
index ddf369b..4fde165 100644
--- a/SConstruct
+++ b/SConstruct
@@ -1322,9 +1322,9 @@ def _location():
     import os
     import sys
     from distutils.sysconfig import get_python_version
-    sys.path.append(os.path.dirname(os.path.realpath(__file__)))
-    _tmp = __import__("initpy" + get_python_version().replace('.', ''))
-    return _tmp.location
+    fname = os.path.join(os.path.dirname(os.path.realpath(__file__)),
+                         "initpy" + get_python_version().replace('.', ''))
+    return file(fname, "r").read()
 
 import imp
 imp.load_dynamic("polybori.dynamic.PyPolyBoRi", _location())
@@ -1334,11 +1334,7 @@ imp.load_dynamic("polybori.dynamic.PyPolyBoRi", _location())
                                    source = source[0].abspath))
         init_py.close()
         init_py = file(target[1].path, "w")
-        init_py_in = """# File: %(target)s
-# Automatically generated by PolyBoRi
-# This file is just for developing, it should not be installed.
-location = "%(source)s"
-"""
+        init_py_in = """%(source)s"""
         init_py.write(init_py_in % dict(target = target[1].path, 
                                         source = source[0].abspath))
         init_py.close()
@@ -1346,15 +1342,13 @@ location = "%(source)s"
         return target[0].path + " building..."
         
     dynamic_init_py = env.Command([PyRootPath('polybori/dynamic', elt) for elt\
-                                       in ['__init__.py', 
-                                           'initpy' + \
-                                               pyconf.version.replace('.','') +\
-                                               '.py']], 
+                                       in ['__init__.py', 'initpy' + \
+                                               pyconf.version.replace('.','')]],
                                   pypb, 
                                   action = env.Action(init_build, init_message))
 
     env.Alias(BuildPath(), dynamic_init_py) # Developers also need this
-
+    env.Clean(PyRootPath("polybori"), PyRootPath("polybori/dynamic"))
     pypb_init_py = env.Command(BuildPyPBPath('__init__.py'), pypb, 
                                [Touch("$TARGET")])
     env.Depends(pypb_init_py, dynamic_init_py)

-- 
polybori: Polynomials over Boolean Rings



More information about the debian-science-commits mailing list