mirror of
https://github.com/mapnik/mapnik.git
synced 2025-12-08 20:13:09 +00:00
scons: python 2.5 compatibility
This commit is contained in:
parent
261c9e41e5
commit
bc7da29e6b
@ -142,7 +142,11 @@ paths += "__all__ = [mapniklibpath,inputpluginspath,fontscollectionpath]\n"
|
||||
|
||||
if not os.path.exists('mapnik'):
|
||||
os.mkdir('mapnik')
|
||||
file('mapnik/paths.py','w').write(paths % (os.path.relpath(env['MAPNIK_LIB_DIR'],target_path)))
|
||||
|
||||
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']))
|
||||
|
||||
# force open perms temporarily so that `sudo scons install`
|
||||
# does not later break simple non-install non-sudo rebuild
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user