Make procpool compatible with windows and OS X.

This commit is contained in:
lagos 2012-09-27 01:26:04 -07:00
parent b28d67534b
commit bc4783efac
2 changed files with 5 additions and 4 deletions

View file

@ -278,7 +278,8 @@ def spawnProcess(processProtocol, bootstrap, args=(), env={},
pythonpath = []
for pkg in packages:
p = os.path.split(imp.find_module(pkg)[1])[0]
path, name = os.path.split(pkg)
p = os.path.split(imp.find_module(name, [path] if path else None)[1])[0]
if p.startswith(os.path.join(sys.prefix, 'lib')):
continue
pythonpath.append(p)