python-pbr

Python Setuptools and PBR - how to create a package release using the git tag as the version?

家住魔仙堡 提交于 2020-01-21 19:42:27
问题 How do I actually create a release/distro of a python package that uses a git repo tag for the versioning, using setuptools and pbr ? There is plenty of information on the basic setup and configuration required: SetupTools Documentation - setup() and setup.py configuration Python Packaging User Guide - Installing Packages PBR v3.1.1 documentation StackOverflow: How to use version info generated using setuptools and pbr But where is the simple info on how to actually create the distro? i.e. I

How to update git metadata in a Python Packages using Setuptools and PBR

一曲冷凌霜 提交于 2019-12-13 04:36:30
问题 Working with versions generated from git repo tags by pbr I'm having issues getting the version info from my package, which is setup as a normal Python package using setuptools with the pbr extension. pbr will pull the version info from the tags in a git repo so there is a single source of truth. I did get the basics working - see this Q&A for more info. It is working overall, if I make a full distribution of the package. For example: py setup.py sdist will create a full distribution and the

How can I use pbr version from source?

你。 提交于 2019-12-12 16:32:04
问题 My goal: I want to keep coherent versions in my GIT repository, my distribution on pypi repository, and in my source using the __version__ variable. Details: I tried to use pbr , which generates the distro version from git tags, so these two versions will be coherent. However, I cannot find out how to keep the __version__ variable coherent with them in my source. (There are several ways to fetch the version from source, but how will it be connected to git/distro?) Is it possible to generate a

How to load package version into __version__ variable if you are using pbr?

天涯浪子 提交于 2019-12-10 16:37:45
问题 In order to simplify python packaging I am trying to migrate to use of pbr. Still, I was not able to figure out how to expose the version of the package into __version__ variable. This is quite important because I do have many users of the package that do rely on the existence of the version variable. People should be able to do: import somemodule print(somemodule.__version__) 回答1: I am not sure if that's the best approach but I was able to spot one other packages that is doing something

Error when installing pbr

こ雲淡風輕ζ 提交于 2019-12-10 13:12:04
问题 I want to install openstack client on my machine running OSX 10.8.5. As a prerequisite, i need to install pbr. So, i did the following git clone git://github.com/openstack-dev/pbr.git cd pbr sudo python setup.py install But im getting the following error trace Traceback (most recent call last): File "setup.py", line 22, in <module> **util.cfg_to_args()) File "/Users/jimcgh/dev/pbr/pbr/util.py", line 241, in cfg_to_args pbr.hooks.setup_hook(config) File "/Users/jimcgh/dev/pbr/pbr/hooks/__init_