summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJason R. Coombs <jaraco@jaraco.com>2022-07-31 13:38:17 -0400
committerGitHub <noreply@github.com>2022-07-31 13:38:17 -0400
commit28875ac8d2512cc65c1a5255bd97dfd738cb81e5 (patch)
tree4eb8c9b5e2a3843cd048c3ea5f8000e3fc5c390b
parent6547d1cdc882d0e0a9b430f22b24838b1771d6ce (diff)
parent3f783d7cd7348c156e21644fa3c9f1ddbcd4985c (diff)
downloadpython-setuptools-git-28875ac8d2512cc65c1a5255bd97dfd738cb81e5.tar.gz
Merge pull request #161 from DWesl/patch-3
DOC: Extend Windows rpath error message with likely cause
-rw-r--r--distutils/cygwinccompiler.py17
1 files changed, 9 insertions, 8 deletions
diff --git a/distutils/cygwinccompiler.py b/distutils/cygwinccompiler.py
index 5c23e988..50b8bbe5 100644
--- a/distutils/cygwinccompiler.py
+++ b/distutils/cygwinccompiler.py
@@ -101,6 +101,12 @@ def get_msvcr():
raise ValueError("Unknown MS Compiler version %s " % msc_ver)
+_runtime_library_dirs_msg = (
+ "Unable to set runtime library search path on Windows, "
+ "usually indicated by `runtime_library_dirs` parameter to Extension"
+ )
+
+
class CygwinCCompiler(UnixCCompiler):
"""Handles the Cygwin port of the GNU C compiler to Windows."""
@@ -199,10 +205,7 @@ class CygwinCCompiler(UnixCCompiler):
objects = copy.copy(objects or [])
if runtime_library_dirs:
- self.warn(
- "I don't know what to do with 'runtime_library_dirs': "
- + str(runtime_library_dirs)
- )
+ self.warn(_runtime_library_dirs_msg)
# Additional libraries
libraries.extend(self.dll_libraries)
@@ -273,7 +276,7 @@ class CygwinCCompiler(UnixCCompiler):
# cygwin doesn't support rpath. While in theory we could error
# out like MSVC does, code might expect it to work like on Unix, so
# just warn and hope for the best.
- self.warn("don't know how to set runtime library search path on Windows")
+ self.warn(_runtime_library_dirs_msg)
return []
# -- Miscellaneous methods -----------------------------------------
@@ -337,9 +340,7 @@ class Mingw32CCompiler(CygwinCCompiler):
self.dll_libraries = get_msvcr()
def runtime_library_dir_option(self, dir):
- raise DistutilsPlatformError(
- "don't know how to set runtime library search path on Windows"
- )
+ raise DistutilsPlatformError(_runtime_library_dirs_msg)
# Because these compilers aren't configured in Python's pyconfig.h file by