Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
fengzch-das
multibuild
Commits
484eefb1
Commit
484eefb1
authored
Aug 20, 2020
by
Andrew Murray
Browse files
Do not modify original wheel if name is not changed
parent
f46e683b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
3 deletions
+14
-3
manylinux_utils.sh
manylinux_utils.sh
+14
-3
No files found.
manylinux_utils.sh
View file @
484eefb1
...
@@ -10,18 +10,29 @@ function get_platform {
...
@@ -10,18 +10,29 @@ function get_platform {
}
}
function
repair_wheelhouse
{
function
repair_wheelhouse
{
# Runs 'auditwheel repair' over all wheels in a directory
# If the wheel is not renamed by the repair process,
# then the original wheel will be left unmodified
local
in_dir
=
$1
local
in_dir
=
$1
local
out_dir
=
${
2
:-
$in_dir
}
local
out_dir
=
${
2
:-
$in_dir
}
for
whl
in
$in_dir
/
*
.whl
;
do
for
whl
in
$in_dir
/
*
.whl
;
do
if
[[
$whl
==
*
none-any.whl
]]
;
then
# Pure Python wheel
if
[[
$whl
==
*
none-any.whl
]]
;
then
# Pure Python wheel
if
[
"
$in_dir
"
!=
"
$out_dir
"
]
;
then
cp
$whl
$out_dir
;
fi
if
[
"
$in_dir
"
!=
"
$out_dir
"
]
;
then
cp
$whl
$out_dir
;
fi
else
else
wheel_count
=
$(
find
$out_dir
-name
*
.whl |
wc
-l
)
local
tmpdir
=
$(
mktemp
-d
-t
)
auditwheel repair
$whl
-w
$out_dir
/
if
[[
$(
find
$out_dir
-name
*
.whl |
wc
-l
)
-gt
$wheel_count
]]
;
then
auditwheel repair
$whl
-w
$tmpdir
/
local
built
=
$(
find
$tmpdir
-name
*
.whl
)
if
[
$(
basename
$built
)
==
$(
basename
$whl
)
]
;
then
if
[
"
$in_dir
"
!=
"
$out_dir
"
]
;
then
cp
$whl
$out_dir
;
fi
else
cp
$built
$out_dir
# Remove unfixed if writing into same directory
# Remove unfixed if writing into same directory
if
[
"
$in_dir
"
==
"
$out_dir
"
]
;
then
rm
$whl
;
fi
if
[
"
$in_dir
"
==
"
$out_dir
"
]
;
then
rm
$whl
;
fi
fi
fi
rm
-rf
$tmpdir
fi
fi
done
done
chmod
-R
a+rwX
$out_dir
chmod
-R
a+rwX
$out_dir
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment