We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent bd5b614 commit c9c550fCopy full SHA for c9c550f
distutils/tests/test_build_ext.py
@@ -1,7 +1,7 @@
1
import contextlib
2
import glob
3
import importlib
4
-import os
+import os.path
5
import platform
6
import re
7
import shutil
@@ -112,8 +112,8 @@ def test_build_ext(self, copy_so):
112
runtime_library_dirs=['/usr/lib'],
113
)
114
elif sys.platform == 'linux':
115
- libz_so = glob.glob('/usr/lib*/libz.so*')
116
- libz_so.sort(key=lambda lib_path: len(lib_path))
+ libz_so = {os.path.realpath(name) for name in glob.iglob('/usr/lib*/libz.so*')}
+ libz_so = sorted(libz_so, key=lambda lib_path: len(lib_path))
117
shutil.copyfile(libz_so[-1], '/tmp/libxx_z.so')
118
119
xx_ext = Extension(
0 commit comments