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

Skip to content

Commit 9816619

Browse files
committed
- Issue #17219: Add library build dir for Python extension cross-builds.
2 parents 6b6bcc3 + cef3bdc commit 9816619

2 files changed

Lines changed: 3 additions & 1 deletion

File tree

Lib/distutils/command/build_ext.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,7 @@ def finalize_options(self):
244244
# Python's library directory must be appended to library_dirs
245245
# See Issues: #1600860, #4366
246246
if (sysconfig.get_config_var('Py_ENABLE_SHARED')):
247-
if sys.executable.startswith(os.path.join(sys.exec_prefix, "bin")):
247+
if not sysconfig.python_build:
248248
# building third party extensions
249249
self.library_dirs.append(sysconfig.get_config_var('LIBDIR'))
250250
else:

Misc/NEWS

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1060,6 +1060,8 @@ Build
10601060

10611061
- Issue #18096: Fix library order returned by python-config.
10621062

1063+
- Issue #17219: Add library build dir for Python extension cross-builds.
1064+
10631065
C API
10641066
-----
10651067

0 commit comments

Comments
 (0)