Activity log for bug #1300381

Date Who What changed Old value New value Message
2014-03-31 18:45:27 Sam Stavinoha bug added bug
2014-03-31 18:46:12 Sam Stavinoha 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: _____________________________________ [global] commands = setup.MyLocalInstall _____________________________________ The MyLocalInstall class might be defined in the project's setup.py: _____________________________________ # setup.py from pbr.packaging import LocalInstall class MyLocalInstall(LocalInstall): # override __init__() and run() ... _____________________________________ After noticing that my custom class wasn't being called, I traced the behavior to here: https://github.com/openstack-dev/pbr/blob/master/pbr/util.py#L360 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_to_setup_kwargs(). 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.MyLocalInstall _____________________________________ The MyLocalInstall class might be defined in the project's setup.py: _____________________________________ # setup.py from pbr.packaging import LocalInstall class MyLocalInstall(LocalInstall):     # override __init__() and run()     ... _____________________________________ After noticing that my custom class wasn't being called, I traced the behavior to here: https://github.com/openstack-dev/pbr/blob/master/pbr/util.py#L360 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_to_setup_kwargs().
2014-03-31 19:27:37 BK Box bug task added satori
2014-09-08 21:02:07 Doug Hellmann pbr: status New Triaged
2014-09-08 21:02:09 Doug Hellmann pbr: importance Undecided Low
2017-03-30 23:05:08 Benoit Pierre bug added subscriber Benoit Pierre