Commit f84b2a99 authored by Stefan Behnel's avatar Stefan Behnel

cleanup

parent 05d0a375
...@@ -140,12 +140,11 @@ def load_module(name, pyxfilename): ...@@ -140,12 +140,11 @@ def load_module(name, pyxfilename):
# import hooks # import hooks
class PyxImporter(object): class PyxImporter(object):
def __init__(self, so_cache_dir): def __init__(self):
self.so_cache_dir = so_cache_dir pass
self.so_name_cache = {}
def find_module(self, fullname, package_path=None): def find_module(self, fullname, package_path=None):
print "SEARCHING", fullname, package_path #print "SEARCHING", fullname, package_path
if '.' in fullname: if '.' in fullname:
mod_parts = fullname.split('.') mod_parts = fullname.split('.')
package = '.'.join(mod_parts[:-1]) package = '.'.join(mod_parts[:-1])
...@@ -186,11 +185,11 @@ class PyxLoader(object): ...@@ -186,11 +185,11 @@ class PyxLoader(object):
self.fullname, fullname)) self.fullname, fullname))
if self.init_path: if self.init_path:
# package # package
print "PACKAGE", fullname #print "PACKAGE", fullname
module = load_module(fullname, self.init_path) module = load_module(fullname, self.init_path)
module.__path__ = [self.path] module.__path__ = [self.path]
else: else:
print "MODULE", fullname #print "MODULE", fullname
module = load_module(fullname, self.path) module = load_module(fullname, self.path)
return module return module
...@@ -204,7 +203,7 @@ def install(): ...@@ -204,7 +203,7 @@ def install():
for importer in sys.meta_path: for importer in sys.meta_path:
if isinstance(importer, PyxImporter): if isinstance(importer, PyxImporter):
return return
importer = PyxImporter('~/.pyxbuild') importer = PyxImporter() # ('~/.pyxbuild')
sys.meta_path.append(importer) sys.meta_path.append(importer)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment