]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Fix builds with builddir != srcdir, introduced in r83988.
authorMatthias Klose <doko@ubuntu.com>
Mon, 23 Aug 2010 16:47:09 +0000 (16:47 +0000)
committerMatthias Klose <doko@ubuntu.com>
Mon, 23 Aug 2010 16:47:09 +0000 (16:47 +0000)
os.path.dirname(__file__) points to the scrdir, not the builddir.
Use os.getcwd() instead.

setup.py

index c81358cbea9a6a1172160063d4a4afffa0b68111..8e51960d03213376ec0b1d77ad94256bb3b4f650 100644 (file)
--- a/setup.py
+++ b/setup.py
@@ -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)