summaryrefslogtreecommitdiff
path: root/setup.py
diff options
context:
space:
mode:
authorDave Andreoli <dave@gurumeditation.it>2015-02-16 22:30:58 +0100
committerDave Andreoli <dave@gurumeditation.it>2015-02-16 22:30:58 +0100
commitabbccd84aa8dde9cede4e8dbaf2b77a199860158 (patch)
treea7a51e76bcc63ce3183d8db020bce3167bd3169d /setup.py
parent65ff1c8217559ddcd487b717df891205e7395089 (diff)
Correct commit count
The current method of counting commits give a wrong number. This lets git do the counting. patch by Doug Newgard slightly modified by me
Diffstat (limited to 'setup.py')
-rwxr-xr-xsetup.py13
1 files changed, 5 insertions, 8 deletions
diff --git a/setup.py b/setup.py
index fa0c744..60f73ea 100755
--- a/setup.py
+++ b/setup.py
@@ -26,18 +26,14 @@ ELM_MIN_VER = RELEASE
26# Add git commit count for dev builds 26# Add git commit count for dev builds
27if vers[2] == 99: 27if vers[2] == 99:
28 try: 28 try:
29 call = subprocess.Popen(["git", "log", "--oneline"], 29 call = subprocess.Popen(["git", "rev-list", "--count", "HEAD"],
30 stdout=subprocess.PIPE) 30 stdout=subprocess.PIPE)
31 out, err = call.communicate() 31 out, err = call.communicate()
32 count = out.decode("utf-8").strip()
33 RELEASE += "a" + count
32 except Exception: 34 except Exception:
33 RELEASE += "a0" 35 RELEASE += "a0"
34 else: 36
35 log = out.decode("utf-8").strip()
36 if log:
37 ver = log.count("\n")
38 RELEASE += "a" + str(ver)
39 else:
40 RELEASE += "a0"
41 37
42# XXX: Force default visibility. See phab T504 38# XXX: Force default visibility. See phab T504
43if os.getenv("CFLAGS") is not None and "-fvisibility=" in os.environ["CFLAGS"]: 39if os.getenv("CFLAGS") is not None and "-fvisibility=" in os.environ["CFLAGS"]:
@@ -204,6 +200,7 @@ py_modules = []
204packages = ["efl"] 200packages = ["efl"]
205 201
206if set(("build", "build_ext", "install", "bdist", "sdist")) & set(sys.argv): 202if set(("build", "build_ext", "install", "bdist", "sdist")) & set(sys.argv):
203 sys.stdout.write("Python-EFL: %s\n" % RELEASE)
207 204
208 # === Python === 205 # === Python ===
209 sys.stdout.write("Checking for Python: ") 206 sys.stdout.write("Checking for Python: ")