Skip to content

Commit

Permalink
Support LIB_DIR_NAME environment variable for custom mapniklibpath
Browse files Browse the repository at this point in the history
  • Loading branch information
sebastic committed Oct 31, 2015
1 parent ab8b1f6 commit d14286e
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion setup.py
Expand Up @@ -162,7 +162,11 @@ def run(self):
f_paths.write(
'mapniklibpath = os.path.join(os.path.dirname(os.path.realpath(__file__)), "plugins")\n')
elif create_paths:
f_paths.write("mapniklibpath = '" + lib_path + "/mapnik'\n")
if os.environ.get('LIB_DIR_NAME'):
mapnik_lib_path = lib_path + os.environ.get('LIB_DIR_NAME')
else:
mapnik_lib_path = lib_path + "/mapnik"
f_paths.write("mapniklibpath = '{path}'\n".format(path=mapnik_lib_path))
f_paths.write('mapniklibpath = os.path.normpath(mapniklibpath)\n')

if create_paths:
Expand Down

0 comments on commit d14286e

Please sign in to comment.