Use /usr/local prefix for pythonsitedir on Ubuntu

This commit is contained in:
Ossi Salmi 2012-08-01 10:12:09 +03:00
parent 97ca8107c0
commit 74e0a5827e

View file

@ -9,10 +9,15 @@ Facter.add('pythonsitedir') do
end end
end end
if pythonbin if pythonbin
case Facter.value(:operatingsystem)
when "Ubuntu"
%x{#{pythonbin} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(prefix='/usr/local')"}.chomp
else
%x{#{pythonbin} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()"}.chomp %x{#{pythonbin} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()"}.chomp
end end
end end
end end
end
Facter.add('pythonversion') do Facter.add('pythonversion') do
setcode do setcode do