Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(3)

Unified Diff: Lib/distutils/tests/support.py

Issue 3871: cross and native build of python for mingw32 with distutils
Patch Set: Created 7 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Lib/distutils/sysconfig.py ('k') | Lib/distutils/tests/test_bdist_msi.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
--- a/Lib/distutils/tests/support.py Thu Dec 27 23:52:36 2012 +0200
+++ b/Lib/distutils/tests/support.py Thu Dec 27 17:35:12 2012 -0500
@@ -6,6 +6,7 @@
import unittest
import sysconfig
from copy import deepcopy
+from test.support import SAVEDCWD as _test_SAVEDCWD
from distutils import log
from distutils.log import DEBUG, INFO, WARN, ERROR, FATAL
@@ -175,9 +176,9 @@
def fixup_build_ext(cmd):
"""Function needed to make build_ext tests pass.
- When Python was built with --enable-shared on Unix, -L. is not enough to
+ When Python was built with --enable-shared on Posix, -L. is not enough to
find libpython<blah>.so, because regrtest runs in a tempdir, not in the
- source directory where the .so lives.
+ build directory where the .so lives.
When Python was built with in debug mode on Windows, build_ext commands
need their debug attribute set, and it is not done automatically for
@@ -194,6 +195,11 @@
"""
if os.name == 'nt':
cmd.debug = sys.executable.endswith('_d.exe')
+ if (sys.version.find("GCC") >= 0 and
+ sysconfig.get_config_var('Py_ENABLE_SHARED')):
+ if cmd.library_dirs is None:
+ cmd.library_dirs = []
+ cmd.library_dirs.insert(0, _test_SAVEDCWD)
elif sysconfig.get_config_var('Py_ENABLE_SHARED'):
# To further add to the shared builds fun on Unix, we can't just add
# library_dirs to the Extension() instance because that doesn't get
« no previous file with comments | « Lib/distutils/sysconfig.py ('k') | Lib/distutils/tests/test_bdist_msi.py » ('j') | no next file with comments »

RSS Feeds Recent Issues | This issue
This is Rietveld 894c83f36cb7+