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

os.path.dirname(__file__) points to the scrdir, not the builddir.
Use os.getcwd() instead.
This commit is contained in:
Matthias Klose 2010-08-23 16:47:09 +00:00
parent 67e91ad9cf
commit 7311729790
1 changed files with 1 additions and 1 deletions

View File

@ -234,7 +234,7 @@ class PyBuildExt(build_ext):
# will fail.
with open(_BUILDDIR_COOKIE, "wb") as f:
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:
sys.path.append(abs_build_lib)