-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
63 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
#!/bin/bash | ||
set -euo pipefail | ||
|
||
case "$(uname)" in | ||
Linux) toolname=auditwheel;; | ||
Darwin) toolname=delocate-wheel;; | ||
esac | ||
|
||
topdir=$(cd "$(dirname -- "$0")" && pwd -P) | ||
toolpatch="$topdir/patches/$toolname.py" | ||
test -f "$toolpatch" || exit 0 | ||
|
||
filename=$(command -v "$toolname") | ||
shebang=$(head -n 1 "$filename") | ||
sed "1 s|^.*$|$shebang|" "$toolpatch" > "$filename" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
#!/usr/bin/env python | ||
|
||
# | ||
# https://github.com/pypa/auditwheel/pull/517 | ||
# | ||
|
||
import os | ||
import sys | ||
from auditwheel.main import main | ||
|
||
def walk(topdir, *args, **kwargs): | ||
topdir = os.path.normpath(topdir) | ||
for dirpath, dirnames, filenames in os_walk(topdir, *args, **kwargs): | ||
# sort list of dirnames in-place such that `os.walk` | ||
# will recurse into subdirectories in reproducible order | ||
dirnames.sort() | ||
# recurse into any top-level .dist-info subdirectory last | ||
if dirpath == topdir: | ||
subdirs = [] | ||
dist_info = [] | ||
for dir in dirnames: | ||
if dir.endswith(".dist-info"): | ||
dist_info.append(dir) | ||
else: | ||
subdirs.append(dir) | ||
dirnames[:] = subdirs | ||
dirnames.extend(dist_info) | ||
del dist_info | ||
# sort list of filenames for iteration in reproducible order | ||
filenames.sort() | ||
# list any dist-info/RECORD file last | ||
if dirpath.endswith(".dist-info") and os.path.dirname(dirpath) == topdir: | ||
if "RECORD" in filenames: | ||
filenames.remove("RECORD") | ||
filenames.append("RECORD") | ||
yield dirpath, dirnames, filenames | ||
|
||
|
||
os_walk = os.walk | ||
os.walk = walk | ||
|
||
|
||
if __name__ == "__main__": | ||
sys.exit(main()) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters