Imported Upstream version 5.8.0 upstream/5.8.0
authorDongHun Kwak <dh0128.kwak@samsung.com>
Mon, 18 Jul 2022 01:14:02 +0000 (10:14 +0900)
committerDongHun Kwak <dh0128.kwak@samsung.com>
Mon, 18 Jul 2022 01:14:02 +0000 (10:14 +0900)
.zuul.yaml
ChangeLog
PKG-INFO
doc/source/user/using.rst
pbr.egg-info/PKG-INFO
pbr/core.py
pbr/tests/test_packaging.py

index 7e168162e28e5444b41084707f94ce36b61fdfc6..87fccb4e7dae95f4b4955706a4b613cfdb96e641 100644 (file)
       jobs:
         - openstack-tox-pep8
         - openstack-tox-cover
+        - openstack-tox-py27
         - openstack-tox-py36
         - openstack-tox-py37
         - openstack-tox-py38
       jobs:
         - openstack-tox-pep8
         - openstack-tox-cover
+        - openstack-tox-py27
         - openstack-tox-py36
         - openstack-tox-py37
         - openstack-tox-py38
index 4bcee126a1816d963a40bbf5a97363cd54393cba..012299893b5a3ad18777ecd9cb1f24d3f9e83849 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,13 @@
 CHANGES
 =======
 
+5.8.0
+-----
+
+* Add python2 testing back to PBR
+* Allow PEP517 without setup\_requires
+* Clarify the need for setup.py with PEP517
+
 5.7.0
 -----
 
index c23308df07caf22e583179d241b5c9ca47d1ca27..ccf0c2ae48dc5e2893e9027c3946998a60f747e2 100644 (file)
--- a/PKG-INFO
+++ b/PKG-INFO
@@ -1,6 +1,6 @@
 Metadata-Version: 2.1
 Name: pbr
-Version: 5.7.0
+Version: 5.8.0
 Summary: Python Build Reasonableness
 Home-page: https://docs.openstack.org/pbr/latest/
 Author: OpenStack
index 7070e017922154c75c43a1e3c4ebd90208eef92e..21aa99be37d7a490820e84c0fe61490ba8ed6b95 100644 (file)
@@ -37,8 +37,11 @@ something like this::
 ``pyproject.toml``
 ------------------
 
-As an alternative to writing a ``setup.py`` you can instead setup PBR
-through the PEP 517 build-system configuration in ``pyproject.toml``.
+PBR can be configured as a PEP517 build-system in ``pyproject.toml``. This
+currently continues to rely on setuptools which means you need the above
+``setup.py`` file to be present. The main benefits to using a
+``pyproject.toml`` file with PBR are that you can control the versions of
+PBR, setuptools, and wheel that are used avoiding easy_install invocation.
 Your build-system block in ``pyproject.toml`` will need to look something
 like this::
 
@@ -46,6 +49,10 @@ like this::
     requires = ["pbr>=5.7.0", "setuptools>=36.6.0", "wheel"]
     build-backend = "pbr.build"
 
+
+Eventually PBR may grow its own direct support for PEP517 build hooks, but
+until then it will continue to need setuptools and ``setup.py``.
+
 .. _setup_cfg:
 
 ``setup.cfg``
index c23308df07caf22e583179d241b5c9ca47d1ca27..ccf0c2ae48dc5e2893e9027c3946998a60f747e2 100644 (file)
@@ -1,6 +1,6 @@
 Metadata-Version: 2.1
 Name: pbr
-Version: 5.7.0
+Version: 5.8.0
 Summary: Python Build Reasonableness
 Home-page: https://docs.openstack.org/pbr/latest/
 Author: OpenStack
index 645a2ef1a28e4a97046bed30e0cb9cdfae77a3bf..f221299e9671d2b8cb2cbf8e051dc15a7f113435 100644 (file)
@@ -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()
index 7d55d549a335bb646ca17682a81f3cc49599285d..7735053f7ab9ca934c8c5da6c242d2e386352101 100644 (file)
@@ -229,9 +229,6 @@ class CreatePackages(fixtures.Fixture):
         self.packages = packages
 
     def _writeFile(self, directory, file_name, contents):
-        if not contents:
-            # We want to be able to override not having files
-            return
         path = os.path.abspath(os.path.join(directory, file_name))
         path_dir = os.path.dirname(path)
         if not os.path.exists(path_dir):
@@ -924,6 +921,8 @@ class TestRequirementParsing(base.BaseTestCase):
 
 class TestPEP517Support(base.BaseTestCase):
     def test_pep_517_support(self):
+        # Note that the current PBR PEP517 entrypoints rely on a valid
+        # PBR setup.py existing.
         pkgs = {
             'test_pep517':
                 {
@@ -931,8 +930,12 @@ class TestPEP517Support(base.BaseTestCase):
                         sphinx
                         iso8601
                     """),
-                    # Override no setup.py.
-                    '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