-
Notifications
You must be signed in to change notification settings - Fork 30
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Problem with PEP 440 pre-release versions #8
Comments
I also bumped into this...
|
…ible!) Since the previous release (0.25) I've only made bug fixes (i.e. no features were added) however the change related to #8 is backwards incompatible, which is why I've decided to bump the major version number.
Hi Jan and thanks for the feedback! I've just released py2deb version 1.0 which contains the quick fix you suggested. Since the previous release (0.25) I've only made bug fixes (i.e. no features were added) however the change you suggested is backwards incompatible, this is why I've decided to bump the major version number. With regards to the I just took a look at PEP 440 and I guess implementing support for |
How can I disable this? I appended by git commit hash to my version, and it happened to contain an Version: |
The versioning scheme defined in PEP 440 (https://www.python.org/dev/peps/pep-0440/) includes pre-release versions. For example, version
1.0a2
is the second alpha version of the1.0
release. Thus, version1.0a2
comes before version1.0
(1.0a2
<1.0
).However, the Debian versioning works differently (https://www.debian.org/doc/debian-policy/ch-controlfields.html#s-f-Version). Here, it holds that
1.0
<1.0a2
.py2deb doesn't handle this inconsistency in any way, which leads to problems. For example, let's take the PyPI package
pyramid 1.7
(https://pypi.python.org/pypi/pyramid/1.7), which requiresvenusian (>=1.0a3)
. There is already a version1.0
of venusian. Thus, when we invoke py2deb onpyramid 1.7
, it creates (among others) a .deb forpyramid 1.7
and one forvenusian 1.0
. The pyramid .deb specifies a dependency onvenusian (>= 1.0a3)
. When we now try to install those .debs with dpkg, this dependency is checked. dpkg looks for a venusian .deb with version >=1.0a3
, but finds only one with version1.0
, which (according to Debian versioning) is less than1.0a3
. Thus the install fails.I think the quickest fix would be to replace to simply insert a
~
before every pre-release part (e.g.1.0a2
becomes1.0~a2
). According to Debians versioning,~
is smaller than the empty string, so this would fix the problem. There might be other problematic inconsistencies between PEP 440 and Debian versioning, though.The text was updated successfully, but these errors were encountered: