avoid trying to determine relative path from python module to plugins as this can make flexible packaging harder - closes #1171

This commit is contained in:
Dane Springmeyer 2012-05-03 21:49:09 -04:00
parent 19b51fd43b
commit 7fe677dd41

View file

@ -143,10 +143,7 @@ paths += "__all__ = [mapniklibpath,inputpluginspath,fontscollectionpath]\n"
if not os.path.exists('mapnik'):
os.mkdir('mapnik')
if hasattr(os.path,'relpath'): # python 2.6 and above
file('mapnik/paths.py','w').write(paths % (os.path.relpath(env['MAPNIK_LIB_DIR'],target_path)))
else:
file('mapnik/paths.py','w').write(paths % (env['MAPNIK_LIB_DIR']))
file('mapnik/paths.py','w').write(paths % (env['MAPNIK_LIB_DIR']))
# force open perms temporarily so that `sudo scons install`
# does not later break simple non-install non-sudo rebuild