Commit 73117297 authored by Matthias Klose's avatar Matthias Klose

Fix builds with builddir != srcdir, introduced in r83988.

os.path.dirname(__file__) points to the scrdir, not the builddir.
Use os.getcwd() instead.
parent 67e91ad9
...@@ -234,7 +234,7 @@ class PyBuildExt(build_ext): ...@@ -234,7 +234,7 @@ class PyBuildExt(build_ext):
# will fail. # will fail.
with open(_BUILDDIR_COOKIE, "wb") as f: with open(_BUILDDIR_COOKIE, "wb") as f:
f.write(self.build_lib.encode('utf-8', 'surrogateescape')) f.write(self.build_lib.encode('utf-8', 'surrogateescape'))
abs_build_lib = os.path.join(os.path.dirname(__file__), self.build_lib) abs_build_lib = os.path.join(os.getcwd(), self.build_lib)
if abs_build_lib not in sys.path: if abs_build_lib not in sys.path:
sys.path.append(abs_build_lib) sys.path.append(abs_build_lib)
......
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