nadlah
nadlah

Reputation: 11

Python package version standard

According to PEP440, it seems the following format below is a valid version string:

X.Y.postN    # Post-release

But when I use something like: 1.0.post1, I get the following exception in pbr. (I'm using the pbr version 0.11.0)

ERROR:root:Error parsing
Traceback (most recent call last):
    File "/usr/local/lib/python2.7/dist-packages/pbr/core.py", line 104, in pbr
    attrs = util.cfg_to_args(path)
    File "/usr/local/lib/python2.7/dist-packages/pbr/util.py", line 238, in cfg_to_args
    pbr.hooks.setup_hook(config)
    File "/usr/local/lib/python2.7/dist-packages/pbr/hooks/__init__.py", line 27, in setup_hook
    metadata_config.run()
    File "/usr/local/lib/python2.7/dist-packages/pbr/hooks/base.py", line 29, in run
    self.hook()
    File "/usr/local/lib/python2.7/dist-packages/pbr/hooks/metadata.py", line 28, in hook
    self.config['name'], self.config.get('version', None))
    File "/usr/local/lib/python2.7/dist-packages/pbr/packaging.py", line 1009, in get_version
    version = _get_version_from_git(pre_version)
    File "/usr/local/lib/python2.7/dist-packages/pbr/packaging.py", line 947, in _get_version_from_gitpre_version)
    File "/usr/local/lib/python2.7/dist-packages/pbr/version.py", line 236, in from_pip_string
% (remainder, version_string))
ValueError: Unknown remainder ['post1'] in '1.0.post1'
error in setup command: Error parsing /home/admin/mypackage/setup.cfg:

ValueError: Unknown remainder ['post1'] in '1.0.post1'

Anybody knows why that format is not supported in PBR?

Upvotes: 1

Views: 416

Answers (1)

Tom Dalton
Tom Dalton

Reputation: 6190

Ref the docs: http://docs.openstack.org/developer/pbr/#version

The versions should be compatible with "Linux Compatible Semantic Versioning 3.0.0": http://docs.openstack.org/developer/pbr/semver.html

Upvotes: 1

Related Questions