Merge "Remove use of pkg_resources"
This commit is contained in:
@@ -273,8 +273,7 @@ function use_library_from_git {
|
||||
function lib_installed_from_git {
|
||||
local name=$1
|
||||
local safe_name
|
||||
safe_name=$(python -c "from pkg_resources import safe_name; \
|
||||
print(safe_name('${name}'))")
|
||||
safe_name=$(python -c "from packaging import canonicalize_name; print(canonicalize_name('${name}'))")
|
||||
# Note "pip freeze" doesn't always work here, because it tries to
|
||||
# be smart about finding the remote of the git repo the package
|
||||
# was installed from. This doesn't work with zuul which clones
|
||||
|
||||
@@ -84,7 +84,7 @@ EOF
|
||||
# python3-setuptools RPM are deleted, it breaks some tools such as semanage
|
||||
# (used in diskimage-builder) that use the -s flag of the python
|
||||
# interpreter, enforcing the use of the packages from /usr/lib.
|
||||
# Importing setuptools/pkg_resources in a such environment fails.
|
||||
# Importing setuptools in a such environment fails.
|
||||
# Enforce the package re-installation to fix those applications.
|
||||
if is_package_installed python3-setuptools; then
|
||||
sudo dnf reinstall -y python3-setuptools
|
||||
|
||||
Reference in New Issue
Block a user