summaryrefslogtreecommitdiff
path: root/pbr/core.py
diff options
context:
space:
mode:
authorZuul <zuul@review.opendev.org>2021-11-13 03:06:29 +0000
committerGerrit Code Review <review@openstack.org>2021-11-13 03:06:29 +0000
commit8cd1a06e82b2fef6b1efc5b384827cb73bd7b0c3 (patch)
tree113a2e0b6e05cfbdcbfab2f3dacab05d4351f641 /pbr/core.py
parenta6006f608564d582b0e442c1a29ffa8e81e7e0ec (diff)
parentde0c717b17841b0b14019130872f8f02a6aed217 (diff)
downloadpbr-8cd1a06e82b2fef6b1efc5b384827cb73bd7b0c3.tar.gz
Merge "Allow PEP517 without setup_requires"5.8.0
Diffstat (limited to 'pbr/core.py')
-rw-r--r--pbr/core.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/pbr/core.py b/pbr/core.py
index 645a2ef..f221299 100644
--- a/pbr/core.py
+++ b/pbr/core.py
@@ -130,6 +130,14 @@ def pbr(dist, attr, value):
msg = 'Unknown distribution option: %s' % repr(key)
warnings.warn(msg)
+ # Distribution.finalize_options() is what calls this method. That means
+ # there is potential for recursion here. Recursion seems to be an issue
+ # particularly when using PEP517 build-system configs without
+ # setup_requires in setup.py. We can avoid the recursion by setting
+ # dist.pbr to a None value as the corresponding entrypoint (this function)
+ # will only be called on a non None value.
+ setattr(dist, "pbr", None)
+
# Re-finalize the underlying Distribution
try:
super(dist.__class__, dist).finalize_options()