waf: print the library name in which we search for a function
[samba.git] / buildtools / wafsamba / samba_version.py
index 239f2445503a2923fa2f141c6339808f5fe46ef6..f0e7b4d0caf0e2ae8ad01c7e5d00e18ff14bcc52 100644 (file)
@@ -1,4 +1,4 @@
-import os
+import os, sys
 from waflib import Utils, Context
 import samba_utils
 from samba_git import find_git
@@ -14,7 +14,7 @@ def git_version_summary(path, env=None):
     environ = dict(os.environ)
     environ["GIT_DIR"] = '%s/.git' % path
     environ["GIT_WORK_TREE"] = path
-    git = Utils.cmd_output(env.GIT + ' show --pretty=format:"%h%n%ct%n%H%n%cd" --stat HEAD', silent=True, env=environ)
+    git = samba_utils.get_string(Utils.cmd_output(env.GIT + ' show --pretty=format:"%h%n%ct%n%H%n%cd" --stat HEAD', silent=True, env=environ))
 
     lines = git.splitlines()
     if not lines or len(lines) < 4:
@@ -198,7 +198,10 @@ also accepted as dictionary entries here
         for name in sorted(self.vcs_fields.keys()):
             string+="#define SAMBA_VERSION_%s " % name
             value = self.vcs_fields[name]
-            if isinstance(value, basestring):
+            string_types = str
+            if sys.version_info[0] < 3:
+                string_types = basestring
+            if isinstance(value, string_types):
                 string += "\"%s\"" % value
             elif type(value) is int:
                 string += "%d" % value