Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 7311729

Browse files
committed
Fix builds with builddir != srcdir, introduced in r83988.
os.path.dirname(__file__) points to the scrdir, not the builddir. Use os.getcwd() instead.
1 parent 67e91ad commit 7311729

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,7 @@ def build_extensions(self):
234234
# will fail.
235235
with open(_BUILDDIR_COOKIE, "wb") as f:
236236
f.write(self.build_lib.encode('utf-8', 'surrogateescape'))
237-
abs_build_lib = os.path.join(os.path.dirname(__file__), self.build_lib)
237+
abs_build_lib = os.path.join(os.getcwd(), self.build_lib)
238238
if abs_build_lib not in sys.path:
239239
sys.path.append(abs_build_lib)
240240

0 commit comments

Comments
 (0)