PBR command classes overwrite setup.cfg cmdclass settings
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
PBR |
Triaged
|
Low
|
Unassigned | ||
satori |
New
|
Undecided
|
Unassigned |
Bug Description
A user should be able to subclass pbr's command classes found in pbr/packaging.py, and declare that they be used by specifying them in the setup.cfg:
_______
# setup.cfg
[global]
commands = setup.MyLocalIn
_______
The MyLocalInstall class might be defined in the project's setup.py:
_______
# setup.py
from pbr.packaging import LocalInstall
class MyLocalInstall(
# override __init__() and run()
...
_______
After noticing that my custom class wasn't being called, I traced the behavior to here:
https:/
Since pbr.hooks.commands appends to a string of command class names, the pbr classes are always at the end of that string. Any command class specified in setup.cfg that has the same `command_name` (class attribute) as a pbr class defined in pbr.packaging, the class from pbr.packaging will overwrite that class in the config returned by setup_cfg_
description: | updated |
Changed in pbr: | |
status: | New → Triaged |
importance: | Undecided → Low |
I'm not certain this is something we want to support in pbr.
What's the use case for overriding the install command?