Skip to content

Commit 39f25f0

Browse files
committed
Handle modules named lib.
1 parent a68c296 commit 39f25f0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Lib/rebuildpython.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -195,8 +195,6 @@ def run_rebuild():
195195
if "site-packages" in relativePath:
196196
continue
197197
dirpath, filename = os.path.split(relativePath)
198-
if platform.system() != "Windows" and filename.startswith("lib"):
199-
filename = filename[3:]
200198
if filename.endswith(".a.a"):
201199
filename = filename[:-2]
202200
if ext_suffix and filename.endswith(ext_suffix):
@@ -205,6 +203,8 @@ def run_rebuild():
205203
filename = filename[:-2]
206204
if filename.endswith(".lib"):
207205
filename = filename[:-4]
206+
if platform.system() != "Windows" and filename.startswith("lib") and len(filename) > 5:
207+
filename = filename[3:]
208208
relative_path = filename
209209
if dirpath:
210210
relative_path = dirpath.replace("\\", ".").replace("/", ".") + "." + relative_path

0 commit comments

Comments
 (0)