diff options
author | Stephen Finucane <sfinucan@redhat.com> | 2017-10-06 15:44:13 +0100 |
---|---|---|
committer | Stephen Finucane <sfinucan@redhat.com> | 2017-10-09 10:48:33 +0100 |
commit | 32c90ba598d7740e52bf21bc5e920fb5df08645a (patch) | |
tree | 3ec86c93f0aa1e5200b2444a22561b516235b75d /pbr/core.py | |
parent | 87637bdf1d22d5e6aee5650b533e477e8e715b19 (diff) | |
download | pbr-32c90ba598d7740e52bf21bc5e920fb5df08645a.tar.gz |
Remove support for command hooks
distutils2 is long dead and many of its best ideas have been
incorporated into setuptools. One of the ideas that *has not* been
incorporated is the idea of command hooks, of either the pre or post
kind. pbr is still carrying the code for this, and there are several
issues with this:
- No one is using this functionality in OpenStack and, given the
complete lack of documentation on the matter, it's very doubtful that
it's being used anywhere else [1]
- It's causing issues for projects attempting to hook into the
'distutils.commands' entry point on Python 2.7, which it seems no else
must have attempted yet [2].
- distutils2 is dead and advanced features like this that we don't
explicitly need should not be retained
We could attempt to fix this but why bother? Good riddance, I say.
[1] http://codesearch.openstack.org/?q=pre_hook%5C.&i=nope&files=&repos=
[2] http://codesearch.openstack.org/?q=distutils.commands&i=nope&files=&repos=
Change-Id: I01f657034cffbf55ce830b7e8dbb6b3d94c1fd18
Diffstat (limited to 'pbr/core.py')
-rw-r--r-- | pbr/core.py | 11 |
1 files changed, 0 insertions, 11 deletions
diff --git a/pbr/core.py b/pbr/core.py index 71d1e56..753387e 100644 --- a/pbr/core.py +++ b/pbr/core.py @@ -141,16 +141,5 @@ def pbr(dist, attr, value): if isinstance(dist.metadata.version, integer_types + (float,)): # Some people apparently take "version number" too literally :) dist.metadata.version = str(dist.metadata.version) - - # This bit of hackery is necessary so that the Distribution will ignore - # normally unsupport command options (namely pre-hooks and post-hooks). - # dist.command_options is normally a dict mapping command names to - # dicts of their options. Now it will be a defaultdict that returns - # IgnoreDicts for the each command's options so we can pass through the - # unsupported options - ignore = ['pre_hook.*', 'post_hook.*'] - dist.command_options = util.DefaultGetDict( - lambda: util.IgnoreDict(ignore) - ) finally: _restore_distribution_monkeypatch() |