diff options
Diffstat (limited to 'setup.py')
-rwxr-xr-x | setup.py | 23 |
1 files changed, 14 insertions, 9 deletions
@@ -23,15 +23,20 @@ ELM_MIN_VERSION = RELEASE | |||
23 | 23 | ||
24 | 24 | ||
25 | # Add git commit count for dev builds | 25 | # Add git commit count for dev builds |
26 | if vers[2] >= 99: | 26 | if vers[2] == 99: |
27 | call = subprocess.Popen( | 27 | try: |
28 | ["git", "log", "--oneline"], stdout=subprocess.PIPE) | 28 | call = subprocess.Popen( |
29 | out, err = call.communicate() | 29 | ["git", "log", "--oneline"], stdout=subprocess.PIPE) |
30 | log = out.decode("utf-8").strip() | 30 | out, err = call.communicate() |
31 | if log: | 31 | except Exception: |
32 | ver = log.count("\n") | 32 | RELEASE += "a0" |
33 | RELEASE += "a" + str(ver) | 33 | else: |
34 | 34 | log = out.decode("utf-8").strip() | |
35 | if log: | ||
36 | ver = log.count("\n") | ||
37 | RELEASE += "a" + str(ver) | ||
38 | else: | ||
39 | RELEASE += "a0" | ||
35 | 40 | ||
36 | # XXX: Force default visibility. See phab T504 | 41 | # XXX: Force default visibility. See phab T504 |
37 | if os.getenv("CFLAGS") is not None and "-fvisibility=" in os.environ["CFLAGS"]: | 42 | if os.getenv("CFLAGS") is not None and "-fvisibility=" in os.environ["CFLAGS"]: |