ansible-test - Remove generation of egg-info (#83786)

Also remove egg-info generation from hacking/env-setup scripts.
This commit is contained in:
Matt Clay
2024-08-14 09:03:51 -07:00
committed by GitHub
parent 26375e7f12
commit ab624ad031
4 changed files with 5 additions and 64 deletions
-14
View File
@@ -64,25 +64,11 @@ if not set -q PYTHON_BIN
end
end
# Generate egg_info so that pkg_resources works
function gen_egg_info
# Check if ansible*.egg-info directory exists and remove if found
if test -d $PREFIX_PYTHONPATH/ansible*.egg-info
rm -rf $PREFIX_PYTHONPATH/ansible*.egg-info
end
# Execute setup.py egg_info using the chosen Python interpreter
eval $PYTHON_BIN setup.py egg_info
end
pushd $ANSIBLE_HOME
if test -n "$QUIET"
# Run gen_egg_info in the background and redirect output to /dev/null
gen_egg_info &> /dev/null
# Remove any .pyc files found
find . -type f -name "*.pyc" -exec rm -f '{}' ';' &> /dev/null
else
# Run gen_egg_info
gen_egg_info
# Remove any .pyc files found
find . -type f -name "*.pyc" -exec rm -f '{}' ';'
# Display setup details