0001-setup.py-handle-case-of-a-tagged-dirty-workdir.patch
setup.py | ||
---|---|---|
75 | 75 |
if p.returncode == 0: |
76 | 76 |
result = result.decode('ascii').strip()[1:] # strip spaces/newlines and initial v |
77 | 77 |
if '-' in result: # not a tagged version |
78 |
real_number, commit_count, commit_hash = result.split('-', 2) |
|
78 |
try: |
|
79 |
real_number, commit_count, commit_hash = result.split('-', 2) |
|
80 |
except ValueError: |
|
81 |
real_number, commit_hash = result.split('-', 2) |
|
82 |
commit_count = 0 |
|
79 | 83 |
version = '%s.post%s+%s' % (real_number, commit_count, commit_hash) |
80 | 84 |
else: |
81 | 85 |
version = result |
82 |
- |