Skip to content

Commit

Permalink
👹 Feed the hobgoblins (delint).
Browse files Browse the repository at this point in the history
  • Loading branch information
jaraco committed Sep 11, 2024
1 parent 0a7fb2c commit c009de8
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
1 change: 1 addition & 0 deletions distutils/compat/py38.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ def removeprefix(self, prefix):
return self[len(prefix) :]
else:
return self[:]

else:

def removesuffix(self, suffix):
Expand Down
8 changes: 6 additions & 2 deletions distutils/tests/test_build_ext.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,9 @@ def test_build_ext(self, copy_so):
runtime_library_dirs=['/usr/lib'],
)
elif sys.platform == 'linux':
libz_so = {os.path.realpath(name) for name in glob.iglob('/usr/lib*/libz.so*')}
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))
shutil.copyfile(libz_so[-1], '/tmp/libxx_z.so')

Expand Down Expand Up @@ -167,10 +169,12 @@ def _test_xx(copy_so):
["readelf", "-d", xx.__file__], universal_newlines=True
)
import pprint

pprint.pprint(so_headers)
rpaths = [
rpath
for line in so_headers.split("\n") if "RPATH" in line or "RUNPATH" in line
for line in so_headers.split("\n")
if "RPATH" in line or "RUNPATH" in line
for rpath in line.split()[2][1:-1].split(":")
]
if not copy_so:
Expand Down

0 comments on commit c009de8

Please sign in to comment.