summaryrefslogtreecommitdiff
path: root/scipy_distutils/command/build_src.py
diff options
context:
space:
mode:
authorPearu Peterson <pearu.peterson@gmail.com>2005-03-22 08:55:14 +0000
committerPearu Peterson <pearu.peterson@gmail.com>2005-03-22 08:55:14 +0000
commit64fb0eeb6af126e9757435c90c5d9165dc783881 (patch)
tree7712af740ba49888e41c2a5beacab13078cf4e9c /scipy_distutils/command/build_src.py
parentebf0bc4e3e0fd00d0fd0c86faf2744004d4c4346 (diff)
downloadnumpy-64fb0eeb6af126e9757435c90c5d9165dc783881.tar.gz
Fixed bug in build_ext --backend support, expose also ext. module private names to backend wrapper.
Diffstat (limited to 'scipy_distutils/command/build_src.py')
-rw-r--r--scipy_distutils/command/build_src.py11
1 files changed, 9 insertions, 2 deletions
diff --git a/scipy_distutils/command/build_src.py b/scipy_distutils/command/build_src.py
index c660d103b..8421cc945 100644
--- a/scipy_distutils/command/build_src.py
+++ b/scipy_distutils/command/build_src.py
@@ -41,7 +41,11 @@ if _which[0] is None:
if _which[0] is None:
_which = _backends[0], "defaulted"
-exec "from _" + _which[0] + ".%(name)s import *"
+exec "import _" + _which[0] + ".%(name)s as ___m"
+for ___a in dir(___m):
+ exec ___a + " = getattr(___m,___a)"
+else:
+ del ___a, ___m
'''
@@ -126,7 +130,10 @@ class build_src(build_ext.build_ext):
for ext in self.extensions:
name = ext.name.split('.')[-1]
fullname = self.get_ext_fullname(ext.name)
- def func(extension, src_dir):
+ def func(extension, src_dir,
+ name=name,
+ fullname=fullname,
+ backends=backends):
source = os.path.join(os.path.dirname(src_dir),name+'.py')
if newer(__file__, source):
f = open(source,'w')