Commit 337dd835 authored by Amir Mohammadi's avatar Amir Mohammadi
Browse files

fixes a problem when python site.sys.path contains non-real paths. Also,...

fixes a problem when python site.sys.path contains non-real paths. Also, orders the paths correctly when they are inserted. (#12)
parent 68c1ad2e
......@@ -195,7 +195,8 @@ class Extension:
undo.append(lambda: os.close(fd))
os.write(fd, (runsetup_template % dict(
paths=os.pathsep.join(tools.get_pythonpath(working_set, self.buildout, self.installer.prefixes)),
# we reverse the order because we want the user paths to be inserted last ([::-1]).
paths=os.pathsep.join(tools.get_pythonpath(working_set, self.buildout, self.installer.prefixes)[::-1]),
setup=setup,
setupdir=directory,
__file__ = setup,
......
......@@ -242,7 +242,7 @@ def get_pythonpath(working_set, buildout, prefixes):
prepend_path(zc.buildout.easy_install.setuptools_loc, paths)
return [k for k in working_set.entries \
if k not in site_paths(buildout, prefixes)]
if os.path.realpath(k) not in site_paths(buildout, prefixes)]
def get_prefixes(buildout):
"""Returns a list of prefixes set on the buildout section"""
......
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