AttributeError: Distribution instance has no attribute 'pbr'
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
PBR |
Fix Released
|
Critical
|
Sachi King |
Bug Description
Hi!
I have a module not using pbr: https:/
It uses "mock" as a test dependency and therefore pulls pbr indirectly. I get this stacktrace:
```
Installed /home/travis/
running egg_info
writing dependency_links to snimpy.
writing snimpy.
writing requirements to snimpy.
writing entry points to snimpy.
writing top-level names to snimpy.
Traceback (most recent call last):
File "setup.py", line 68, in <module>
'version_
File "/opt/python/
dist.
File "/opt/python/
self.
File "/opt/python/
cmd_obj.run()
File "/home/
self.
File "/home/
self.
File "/opt/python/
self.
File "/opt/python/
cmd_obj.run()
File "/home/
writer(self, ep.name, os.path.
File "/home/
if not cmd.distributio
AttributeError: Distribution instance has no attribute 'pbr'
ERROR: InvocationError: '/home/
```
I have tried adding "pbr=False" in my setup.py. No change. It could be fixed by checking if pbr is an attribute of cmd.distribution but I think this would mask the fact that pbr is adding unwanted entry points (in this case, egg_info.writers = pbr.json = pbr.pbr_
summary: |
- pbr hijacks unrelated setup.py + AttributeError: Distribution instance has no attribute 'pbr' |
Changed in pbr: | |
assignee: | James Polley (tchaypo) → Sachi King (nakato) |
Changed in pbr: | |
assignee: | Sachi King (nakato) → Robert Collins (lifeless) |
Changed in pbr: | |
assignee: | Robert Collins (lifeless) → Sachi King (nakato) |
Changed in pbr: | |
milestone: | none → 1.8.1 |
status: | Fix Committed → Fix Released |
This effects me as well. Also with python 2.7.9 and also when being pulled in by mock (1.3.0, which requires pbr>=0.11). If I manually change the line in 'mock-1. 3.0-py2. 7.egg/EGG- INFO/requires. txt' to be 'pbr>=0.11,<1.7.0' everything is fine, so it seems to be an issue with pbr 1.7.0 either being incompatible with mock or having fundamental issues of its own.