From 74e0a5827e22533d91dfbc2f29e671b078046f69 Mon Sep 17 00:00:00 2001 From: Ossi Salmi Date: Wed, 1 Aug 2012 10:12:09 +0300 Subject: [PATCH] Use /usr/local prefix for pythonsitedir on Ubuntu --- python/lib/facter/python.rb | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/python/lib/facter/python.rb b/python/lib/facter/python.rb index 0b39745..bb47d9a 100644 --- a/python/lib/facter/python.rb +++ b/python/lib/facter/python.rb @@ -9,7 +9,12 @@ Facter.add('pythonsitedir') do end end if pythonbin - %x{#{pythonbin} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()"}.chomp + 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 + end end end end