artemp/mapnik — Issue #48: installing python modules with respect to the PREFIX build option
Author: artemp
Created: 2011-10-11 15:53:56+00:00
State: open
Labels: Boost_Python_Binding

When installing mapnik into a user directory (without superuser privileges), the build fails because the Scons can not install Python modules in the main Python tree.

In order to force Scons to install Python modules into the specified prefix, I changed line 26 of bindings/python/SConscript from :
{{{
prefix = env['PYTHON_PREFIX'] + '/' + env['LIBDIR_SCHEMA'] + '/python' + env['PYTHON_VERSION'] + '/site-packages/'
}}}
to:
{{{
prefix = env['PREFIX'] + '/' + env['LIBDIR_SCHEMA'] + '/python' + env['PYTHON_VERSION'] + '/site-packages/'
}}}

I do not know if this solution could be recommended but it would be great to respect the PREFIX build option anyway.