Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fixed 'setup.py build' from a git-archive tree
I think that's the full matrix of possibilities.
- Loading branch information
Showing
6 changed files
with
45 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
def version_from_expanded_variable(s, tag_prefix): | ||
s = s.strip() | ||
if "$Format" in s: # unexpanded | ||
return version_from_vcs(tag_prefix) | ||
refs = set([r.strip() for r in s.strip("()").split(",")]) | ||
refs.discard("HEAD") ; refs.discard("master") | ||
for r in reversed(sorted(refs)): | ||
if r.startswith(tag_prefix): | ||
return r[len(tag_prefix):] | ||
return "unknown" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters