From c397f4c164e0a6f49a1ac3a70f5c80fe05785ed6 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 2 Aug 2022 20:51:35 -0400 Subject: [PATCH] Add test compatibility on Windows. --- distutils/unixccompiler.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/distutils/unixccompiler.py b/distutils/unixccompiler.py index 67544b7c..4ab771a4 100644 --- a/distutils/unixccompiler.py +++ b/distutils/unixccompiler.py @@ -361,7 +361,7 @@ def _library_root(dir): return os.path.join(match.group(1), dir[1:]) if apply_root else dir def find_library_file(self, dirs, lib, debug=0): - """ + r""" Second-guess the linker with not much hard data to go on: GCC seems to prefer the shared library, so assume that *all* Unix C compilers do, @@ -372,15 +372,15 @@ def find_library_file(self, dirs, lib, debug=0): >>> monkeypatch = getfixture('monkeypatch') >>> monkeypatch.setattr(os.path, 'exists', lambda d: 'existing' in d) >>> dirs = ('/foo/bar/missing', '/foo/bar/existing') - >>> compiler.find_library_file(dirs, 'abc') + >>> compiler.find_library_file(dirs, 'abc').replace('\\', '/') '/foo/bar/existing/libabc.dylib' - >>> compiler.find_library_file(reversed(dirs), 'abc') + >>> compiler.find_library_file(reversed(dirs), 'abc').replace('\\', '/') '/foo/bar/existing/libabc.dylib' >>> monkeypatch.setattr(os.path, 'exists', ... lambda d: 'existing' in d and '.a' in d) - >>> compiler.find_library_file(dirs, 'abc') + >>> compiler.find_library_file(dirs, 'abc').replace('\\', '/') '/foo/bar/existing/libabc.a' - >>> compiler.find_library_file(reversed(dirs), 'abc') + >>> compiler.find_library_file(reversed(dirs), 'abc').replace('\\', '/') '/foo/bar/existing/libabc.a' """ lib_names = (