VersionInfo doesn't play nice with dh_auto_test
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
PBR |
Confirmed
|
Wishlist
|
Unassigned |
Bug Description
When creating a Debian package of a pbr-based Python package, by default dh-python will try to run unittests right after running "python setup.py build" (see [0]), and *before* running "python setup.py install".
This means that the default dh-python test command ("python -m unittest discover -v") will be run in the setuptools build directory, that does NOT have any PKG-INFO file.
Now, in case the Python package runs the idiomatic VersionInfo(
In that case the only rescue is to set the PBR_VERSION environment variable explicitly (for example in debian/rules).
I think it'd be nice to have some code in pbr.packaging.
Or, alternatively to make dh-python export PBR_VERSION automatically (or more generically-named variable, that pbr could honor), but that sounds a bit ad-hoc.
Thoughts?
I'm attaching the log of sample dpkg-buildpackage run that failed due to this bug.
[0] http://
Changed in pbr: | |
status: | New → Confirmed |
importance: | Undecided → Wishlist |