Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

make sure mapnik-config can still report the git revision if git or i…

…ts metadata is not available via a special file we will create a tagging/tarball stage - closes #1170
  • Loading branch information...
commit 909802983cd0a5dde9399398c331889ee547b103 1 parent 6edbec8
Dane Springmeyer springmeyer authored
Showing with 12 additions and 1 deletion.
  1. +12 −1 utils/mapnik-config/
13 utils/mapnik-config/
@@ -3,6 +3,7 @@
import os
import sys
from copy import copy
+from subprocess import Popen, PIPE
@@ -59,7 +60,17 @@ def write_config(configuration,template,config_file):
# remove local agg from public linking
dep_libs = dep_libs.replace('-lagg','')
-git_revision = os.popen("git rev-list --max-count=1 HEAD").read()
+git_revision = 'unknown'
+# present only for official releases where git metadata is stripped
+# more info:
+revision_release_file = '../../GIT_REVISION'
+if os.path.exists(revision_release_file):
+ git_revision = open(revision_release_file,'r').read()
+ git_cmd = "git rev-list --max-count=1 HEAD"
+ stdin, stderr = Popen(git_cmd, shell=True, stdout=PIPE, stderr=PIPE).communicate()
+ if not stderr:
+ git_revision = stdin.strip()
configuration = {
"prefix": config_env['PREFIX'],
Please sign in to comment.
Something went wrong with that request. Please try again.