# determine the current major Python version
python_major=`installed_version Python | cut -d. -f1-2`

# determine the Python site-packages path
python_dir="/usr/lib/python${python_major}/site-packages"

# determine the easy_install .egg file cache
pth_file="$python_dir/easy-install.pth"

# clear the cache
rm $pth_file

# put all the .egg files/dirs into the cache
for egg in $python_dir/*.egg; do
  echo `basename $egg` >> $pth_file
done
