Open pjz opened 6 years ago
Hi @pjz, the current version numbers are designed to work well as debian package version numbers. I didn't mean to break them for setup.py in the process, but clearly I did...
My goals for the version number are:
I wonder if we can come up with something that makes both dpkg and setup.py happy.
Since pycam
uses the python packaging tools, I guess we should use a primary version scheme compatible with these (here: PEP440). Thus we should indeed remove the tilde from the snapshot versions.
For the deb package version number we will probably need to reformat this version number (which is acceptable according to the Debian Policy).
How about this one?
0.7.0.dev0.98.g3e598c2
0.7.0~pre0.98.g3e598c2
This would require:
v0.7.0-pre0
to v0.7.0.dev0
pycam/__init__.py
from re.sub('-pre([0-9])', r'~pre\1', git_describe, 1)
to re.sub('\.dev([0-9]+)', r'~pre\1', git_describe, 1)
This approach would allow proper sorting both for python package tools as well as Debian package tools.
That seems like it would work.
I would prefer it if the string in all three places "looked" the same, ie using either "dev" or "pre" everywhere.
I have a slight preference for "pre" over "dev", because to me "pre" seems unambiguously "before", whereas "dev" could be before or after.
So I'm proposing this:
Yes, I would also prefer identical or at least similar version strings.
Thus, I took another look at PEP440:
pre
is an allowed tag - indicating a release candidate (synonym for r
or rc
)Local version identifiers
Thus I would propose the following for a PEP440-compliant version string:
v0.7.0-pre0
v0.7.0-pre0+98.g3e598c2
v0.7.0~pre0+98.g3e598c2
Great! I'm going to be out of town for a week, but I will work on this when I get back, if no one beats me to it 😊
I was going to build a wheel, but...