Skip to content

Commit f882a58

Browse files
gerrithollshoyer
authored andcommitted
Respect PEP 440 (#1777)
* Respect PEP 440 Change unreleased version numbers as to respect PEP 440. Rather than `0.10.0-9-g89a1a98` we will have `0.10.0+dev9.g89a1a98`. This means automated setuptools requirements can be respected. Closes #1300. * The fallback version string should also respect PEP 440
1 parent 19fb757 commit f882a58

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

setup.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,11 +105,14 @@
105105
# partial clone, manually construct version string
106106
# this is the format before we started using git-describe
107107
# to get an ordering on dev version strings.
108-
rev = "v%s.dev-%s" % (VERSION, rev)
108+
rev = "v%s+dev.%s" % (VERSION, rev)
109109

110110
# Strip leading v from tags format "vx.y.z" to get th version string
111111
FULLVERSION = rev.lstrip('v')
112112

113+
# make sure we respect PEP 440
114+
FULLVERSION = FULLVERSION.replace("-", "+dev", 1).replace("-", ".")
115+
113116
else:
114117
FULLVERSION += QUALIFIER
115118

0 commit comments

Comments
 (0)