Merge "Allow PEP517 without setup_requires"
This commit is contained in:
commit
8cd1a06e82
|
@ -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()
|
||||
|
|
|
@ -930,7 +930,12 @@ class TestPEP517Support(base.BaseTestCase):
|
|||
sphinx
|
||||
iso8601
|
||||
"""),
|
||||
# Use default PBR test setup.py.
|
||||
# Override default setup.py to remove setup_requires.
|
||||
'setup.py': textwrap.dedent("""\
|
||||
#!/usr/bin/env python
|
||||
import setuptools
|
||||
setuptools.setup(pbr=True)
|
||||
"""),
|
||||
'setup.cfg': textwrap.dedent("""\
|
||||
[metadata]
|
||||
name = test_pep517
|
||||
|
|
Loading…
Reference in New Issue