Questions tagged [python-pbr]

PBR is a library that injects some useful and sensible default behaviors into your setuptools run.

PBR is a library that injects some useful and sensible default behaviors into your setuptools run. It started off life as the chunks of code that were copied between all of the OpenStack projects. Around the time that OpenStack hit 18 different projects each with at least 3 active branches, it seemed like a good time to make that code into a proper reusable library.

PBR is only mildly configurable. The basic idea is that there’s a decent way to run things and if you do, you should reap the rewards, because then it’s simple and repeatable. If you want to do things differently, cool! But you’ve already got the power of Python at your fingertips, so you don’t really need PBR.

PBR builds on top of the work that d2to1 started to provide for declarative configuration. d2to1 is itself an implementation of the ideas behind distutils2. Although distutils2 is now abandoned in favor of work towards PEP 426 and Metadata 2.0, declarative config is still a great idea and specifically important in trying to distribute setup code as a library when that library itself will alter how the setup is processed. As Metadata 2.0 and other modern Python packaging PEPs come out, PBR aims to support them as quickly as possible.

17 questions
7
votes
2 answers

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

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()…
LightCC
  • 9,804
  • 5
  • 52
  • 92
6
votes
1 answer

How to include a git repo as a dependency when using pbr

I'm using pbr which uses a requirements.txt file to look for dependencies. I've a line in requirements.txt like git+ssh://git@github.com/user/repo.git and it works when I run pip install -r requirements.txt However, when I run python setup.py build…
Karim Tabet
  • 1,789
  • 1
  • 14
  • 35
6
votes
2 answers

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

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…
sorin
  • 161,544
  • 178
  • 535
  • 806
6
votes
1 answer

Error when installing pbr

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…
jimcgh
  • 5,637
  • 4
  • 27
  • 37
3
votes
1 answer

How to tell pbr to include non-code files in package

I only run into this problem when I build in a python:alpine image. Reproducing it is a bit of a pain, but these are the steps: Docker container setup: $ docker run -it python:3.7-rc-alpine /bin/ash $ pip install pbr Small package setup, including…
Arne
  • 17,706
  • 5
  • 83
  • 99
3
votes
1 answer

How do I tell pbr to use pytest when setup.py test command is invoked?

While using pbr to simplify Python packaging what do we need to configure in order to make it use pytest when python setup.py test command is executed. Running pytest works without any problems.
sorin
  • 161,544
  • 178
  • 535
  • 806
2
votes
2 answers

How can I use pbr version from source?

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…
betontalpfa
  • 3,454
  • 1
  • 33
  • 65
2
votes
0 answers

How to tell setuptools to install requirements quietly?

Is there a way to tell setuptools with PBR to install packages from requirements.txt and test-requirements.txt quietly? With this command: python setup.py --quiet test I am getting all messages from pip, which I would like to avoid. My setup.py…
asylumine
  • 31
  • 6
2
votes
4 answers

issue while installing python module (pbr)

I just deiscover CKAn and I am trying to install it on a Ubuntu 14.04. I install it from source. AT a step we have to install the Python module that CKAn requires. pip install -r /usr/lib/ckan/default/src/ckan/requirements.txt I first got an…
pierrot10
  • 129
  • 4
  • 13
1
vote
0 answers

What is the proper usage of pbr for Python libraries?

Many projects use pbr for automated tracking of changes and incrementing versions. Me too. My project is a library. (It is the Sphinx extension sphinxcontrib.constdata for completeness.) Do I understand properly that my library also needs pbr as…
Matt Warrick
  • 1,385
  • 1
  • 13
  • 22
1
vote
1 answer

How to set the production version for a python package using pbr

for my package, I have the following setup.py import setuptools setuptools.setup( setup_requires=['pbr>=2.0.0'], pbr=True ) when I run python setup.py sdist, the version that gets tagged to the tar file is module-0.0.1.dev1207. If I…
modernNeo
  • 137
  • 9
1
vote
0 answers

using a custom build with pbr

I am trying to use pbr for a python package that has an extension module that uses pybind11. There is a pybind11 cmake example repo showing how to use cmake to build an extension module from setup.py. My question is: How can I incorporate this…
Phil
  • 5,822
  • 2
  • 31
  • 60
1
vote
1 answer

python setup.py install - already installed a package, why is it searching pypi to install it?

I'm trying to install linecache2, which has a pre-requisite of pbr. I went to pypi, and installed pbr by downloading and running setup.py build since I'm behind a firewall: cd C:\Users\\Downloads\pbr-1.5.0\pbr-1.5.0 python…
user1157751
  • 2,427
  • 6
  • 42
  • 73
1
vote
2 answers

NoneType error in pbr when running setup.py script

When running 'python setup.py develop' or 'python setup.py install' I receive the following traceback. Traceback (most recent call last): File "setup.py", line 38, in test_suite='nose.collector', File…
0
votes
1 answer

semantic versions for the wheel file contains devNN

I'm trying to create a python package with the following python setup.py bdist_wheel. The wheel file is generated under my_py_lib-0.0.2.dev19-py2.py3-none-any.whl. The semantic version is appearing as 0.0.2.dev19. However the dev19 is also…
1
2