Merge pull request #296117 from SuperSandro2000/python-relax-deps-hook-no-pname
pythonRelaxDepsHook: don't rely on pname as that could be normalized already
This commit is contained in:
commit
b54e2bc7fd
|
@ -77,13 +77,12 @@ _pythonRemoveDeps() {
|
|||
pythonRelaxDepsHook() {
|
||||
pushd dist
|
||||
|
||||
# See https://peps.python.org/pep-0491/#escaping-and-unicode
|
||||
local -r pkg_name="${pname//[^[:alnum:].]/_}"
|
||||
local -r unpack_dir="unpacked"
|
||||
local -r metadata_file="$unpack_dir/$pkg_name*/$pkg_name*.dist-info/METADATA"
|
||||
local -r metadata_file="$unpack_dir/*/*.dist-info/METADATA"
|
||||
|
||||
# We generally shouldn't have multiple wheel files, but let's be safer here
|
||||
for wheel in "$pkg_name"*".whl"; do
|
||||
for wheel in *".whl"; do
|
||||
|
||||
PYTHONPATH="@wheel@/@pythonSitePackages@:$PYTHONPATH" \
|
||||
@pythonInterpreter@ -m wheel unpack --dest "$unpack_dir" "$wheel"
|
||||
rm -rf "$wheel"
|
||||
|
@ -98,7 +97,7 @@ pythonRelaxDepsHook() {
|
|||
fi
|
||||
|
||||
PYTHONPATH="@wheel@/@pythonSitePackages@:$PYTHONPATH" \
|
||||
@pythonInterpreter@ -m wheel pack "$unpack_dir/$pkg_name"*
|
||||
@pythonInterpreter@ -m wheel pack "$unpack_dir/"*
|
||||
done
|
||||
|
||||
# Remove the folder since it will otherwise be in the dist output.
|
||||
|
|
Loading…
Reference in New Issue