@ -5,7 +5,7 @@ set HACKING_DIR (dirname (status -f))
set FULL_PATH ( python -c " import os; print(os.path.realpath(' $HACKING_DIR ')) " )
set FULL_PATH ( python -c " import os; print(os.path.realpath(' $HACKING_DIR ')) " )
set ANSIBLE_HOME ( dirname $FULL_PATH )
set ANSIBLE_HOME ( dirname $FULL_PATH )
set PREFIX_PYTHONPATH $ANSIBLE_HOME /lib
set PREFIX_PYTHONPATH $ANSIBLE_HOME /lib
set PREFIX_PATH $ANSIBLE_HOME /bin
set PREFIX_PATH $ANSIBLE_HOME /bin $ANSIBLE_HOME /test/runner
set PREFIX_MANPATH $ANSIBLE_HOME /docs/man
set PREFIX_MANPATH $ANSIBLE_HOME /docs/man
# set quiet flag
# set quiet flag
@ -45,21 +45,51 @@ if not contains $PREFIX_MANPATH $MANPATH
end
end
end
end
# Set PYTHON_BIN
if not set -q PYTHON_BIN
if test ( which python)
set -gx PYTHON_BIN ( which python)
else if test ( which python3)
set -gx PYTHON_BIN ( which python3)
else
echo "No valid Python found"
exit 1
end
end
set -gx ANSIBLE_LIBRARY $ANSIBLE_HOME /library
set -gx ANSIBLE_LIBRARY $ANSIBLE_HOME /library
#
# Generate egg_info so that pkg_resources works
# Generate egg_info so that pkg_resources works
pushd $ANSIBLE_HOME
#
if test -e $PREFIX_PYTHONPATH /ansible*.egg-info
rm -r $PREFIX_PYTHONPATH /ansible*.egg-info
# Do the work in a fuction
function gen_egg_info
if test -e $PREFIX_PYTHONPATH /ansible*.egg-info
rm -rf " $PREFIX_PYTHONPATH /ansible*.egg-info "
end
if [ $QUIET ]
set options '-q'
end
eval $PYTHON_BIN setup.py $options egg_info
end
end
pushd $ANSIBLE_HOME
if [ $QUIET ]
if [ $QUIET ]
python setup.py -q egg_info
gen_egg_info ^ /dev/null
find . -type f -name "*.pyc" -exec rm -f '{}' ';' ^ /dev/null
else
else
python setup.py egg_info
gen_egg_info
find . -type f -name "*.pyc" -exec rm -f '{}' ';'
end
end
find . -type f -name "*.pyc" -delete
popd
popd
if not [ $QUIET ]
if not [ $QUIET ]
echo ""
echo ""
@ -67,6 +97,7 @@ if not [ $QUIET ]
echo ""
echo ""
echo " PATH= $PATH "
echo " PATH= $PATH "
echo " PYTHONPATH= $PYTHONPATH "
echo " PYTHONPATH= $PYTHONPATH "
echo " PYTHON_BIN= $PYTHON_BIN "
echo " ANSIBLE_LIBRARY= $ANSIBLE_LIBRARY "
echo " ANSIBLE_LIBRARY= $ANSIBLE_LIBRARY "
echo " MANPATH= $MANPATH "
echo " MANPATH= $MANPATH "
echo ""
echo ""