Skip to content

Commit 1131f4a

Browse files
committed
Fix wheel file order in dist-info directories on Linux
1 parent 47b51cf commit 1131f4a

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

patches/auditwheel.py

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,15 @@ def walk(topdir):
1414
dirpath.suffix == ".dist-info"
1515
and dirpath.parent == topdir
1616
):
17-
# list any dist-info/licenses/LICENSE* files
17+
# list any files in dist-info subdirs first
18+
# for example, dist-info/licenses/LICENSE*
19+
subfiles = []
1820
for dirname in dirnames:
19-
for dn, _, fns in walk(dirpath / dirname):
20-
for fn in fns:
21-
fn = (dn / fn).relative_to(dirpath)
22-
filenames.append(str(fn))
21+
for dpath, _, fnames in walk(dirpath / dirname):
22+
for fname in fnames:
23+
fpath = (dpath / fname).relative_to(dirpath)
24+
subfiles.append(str(fpath))
25+
filenames[:0] = subfiles
2326
del dirnames[:]
2427
# list any dist-info/RECORD file last
2528
if "RECORD" in filenames:

0 commit comments

Comments
 (0)