From 344baa4d4ba821baa8307c22d4cfe6494b19496c Mon Sep 17 00:00:00 2001 From: Sean Mooney Date: Thu, 2 Nov 2023 11:16:49 +0000 Subject: [PATCH] add pyproject.toml to support pip 23.1 pip 23.1 removed the "setup.py install" fallback for projects that do not have pyproject.toml and now uses a pyproject.toml which is vendored in pip. To address that, this change adds the minimal pyproject.toml to enable pbr to be properly used to build editable wheels. This is required to support installing devstack on centos stream 9 and related distros with GLOBAL_VENV=True Without this change the wsgi scripts are not generated in editable mode. i.e. pip install -e /opt/stack/keystone See https://pip.pypa.io/en/stable/news/#v23-1 and https://github.com/pypa/pip/issues/8368 for more details on the removal of the fallback support. setuptools v64.0.0 is used to support editable installs via its PEP-660 implmentation https://github.com/pypa/setuptools/pull/3488 Change-Id: Iee3338c1dd583fc35d93a3e6e74f8f71b7f076e0 --- pyproject.toml | 3 +++ requirements.txt | 2 +- zuul.d/base.yaml | 2 ++ zuul.d/grenade.yaml | 2 ++ zuul.d/job-templates.yaml | 1 + zuul.d/project.yaml | 1 + zuul.d/rally.yaml | 2 ++ zuul.d/tempest-multinode.yaml | 2 ++ zuul.d/tempest-singlenode.yaml | 5 +++++ 9 files changed, 19 insertions(+), 1 deletion(-) create mode 100644 pyproject.toml diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 00000000000..5e862a9593a --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,3 @@ +[build-system] +requires = ["pbr>=6.0.0", "setuptools>=64.0.0"] +build-backend = "pbr.build" diff --git a/requirements.txt b/requirements.txt index afd39c66ae8..3244161df5d 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,7 +1,7 @@ # Requirements lower bounds listed here are our best effort to keep them up to # date but we do not test them so no guarantee of having them all correct. If # you find any incorrect lower bounds, let us know or propose a fix. -pbr>=4.0.0 # Apache-2.0 +pbr>=6.0.0 # Apache-2.0 Paste>=2.0.2 # MIT PasteDeploy>=1.5.0 # MIT diff --git a/zuul.d/base.yaml b/zuul.d/base.yaml index fd72fb1f973..59a13850899 100644 --- a/zuul.d/base.yaml +++ b/zuul.d/base.yaml @@ -24,6 +24,7 @@ - ^releasenotes/.*$ - ^setup.cfg$ - ^plugin.spec$ + - ^pyproject.toml$ - ^tools/ovn_migration/.*$ - ^vagrant/.*$ - ^devstack/.*\.sample$ @@ -88,6 +89,7 @@ - ^doc/.*$ - ^setup.cfg$ - ^plugin.spec$ + - ^pyproject.toml$ - ^tools/ovn_migration/.*$ - ^.*\.conf\.sample$ - ^.*\.rst$ diff --git a/zuul.d/grenade.yaml b/zuul.d/grenade.yaml index 5863fc09e1c..5f0e5372648 100644 --- a/zuul.d/grenade.yaml +++ b/zuul.d/grenade.yaml @@ -18,6 +18,7 @@ - ^tools/.*$ - ^tox.ini$ - ^plugin.spec$ + - ^pyproject.toml$ - ^tools/ovn_migration/.*$ - ^neutron/agent/ovn/.*$ - ^neutron/plugins/ml2/drivers/macvtap/.*$ @@ -234,6 +235,7 @@ - ^releasenotes/.*$ - ^doc/.*$ - ^setup.cfg$ + - ^pyproject.toml$ - ^.*\.conf\.sample$ - ^.*\.rst$ - ^neutron/locale/.*$ diff --git a/zuul.d/job-templates.yaml b/zuul.d/job-templates.yaml index 1669e0a8061..bbb2ced2e88 100644 --- a/zuul.d/job-templates.yaml +++ b/zuul.d/job-templates.yaml @@ -16,6 +16,7 @@ - ^releasenotes/.*$ - ^setup.cfg$ - ^plugin.spec$ + - ^pyproject.toml$ - ^tools/ovn_migration/.*$ - ^tools/.*$ - ^vagrant/.*$ diff --git a/zuul.d/project.yaml b/zuul.d/project.yaml index 38974b39ff0..9cdce5af2d8 100644 --- a/zuul.d/project.yaml +++ b/zuul.d/project.yaml @@ -31,6 +31,7 @@ - ^releasenotes/.*$ - ^doc/.*$ - ^setup.cfg$ + - ^pyproject.toml$ - ^.*\.conf\.sample$ - ^.*\.rst$ - ^neutron/locale/.*$ diff --git a/zuul.d/rally.yaml b/zuul.d/rally.yaml index 993b71ec78c..e80cac3d4fc 100644 --- a/zuul.d/rally.yaml +++ b/zuul.d/rally.yaml @@ -59,6 +59,7 @@ - ^releasenotes/.*$ - ^doc/.*$ - ^setup.cfg$ + - ^pyproject.toml$ - ^.*\.conf\.sample$ - ^.*\.rst$ - ^neutron/locale/.*$ @@ -102,6 +103,7 @@ - ^releasenotes/.*$ - ^doc/.*$ - ^setup.cfg$ + - ^pyproject.toml$ - ^.*\.conf\.sample$ - ^.*\.rst$ - ^neutron/locale/.*$ diff --git a/zuul.d/tempest-multinode.yaml b/zuul.d/tempest-multinode.yaml index 6daaeeefda0..b1da0d40a8c 100644 --- a/zuul.d/tempest-multinode.yaml +++ b/zuul.d/tempest-multinode.yaml @@ -57,6 +57,7 @@ - ^tools/.*$ - ^tox.ini$ - ^plugin.spec$ + - ^pyproject.toml$ - ^tools/ovn_migration/.*$ - ^neutron/agent/ovn/.*$ - ^neutron/plugins/ml2/drivers/macvtap/.*$ @@ -390,6 +391,7 @@ - ^tools/.*$ - ^tox.ini$ - ^plugin.spec$ + - ^pyproject.toml$ - ^tools/ovn_migration/.*$ - ^neutron/agent/dhcp/.*$ - ^neutron/agent/l2/.*$ diff --git a/zuul.d/tempest-singlenode.yaml b/zuul.d/tempest-singlenode.yaml index 82d70d1fce7..d2da0711a29 100644 --- a/zuul.d/tempest-singlenode.yaml +++ b/zuul.d/tempest-singlenode.yaml @@ -72,6 +72,7 @@ - ^tools/.*$ - ^tox.ini$ - ^plugin.spec$ + - ^pyproject.toml$ - ^tools/ovn_migration/.*$ - ^vagrant/.*$ - ^neutron/agent/ovn/.*$ @@ -221,6 +222,7 @@ - ^tools/.*$ - ^tox.ini$ - ^plugin.spec$ + - ^pyproject.toml$ - ^tools/ovn_migration/.*$ - ^vagrant/.*$ - ^neutron/agent/.*$ @@ -275,6 +277,7 @@ - ^tools/.*$ - ^tox.ini$ - ^plugin.spec$ + - ^pyproject.toml$ - ^tools/ovn_migration/.*$ - ^vagrant/.*$ - ^neutron/plugins/ml2/drivers/macvtap/.*$ @@ -435,6 +438,7 @@ - ^tools/.*$ - ^tox.ini$ - ^plugin.spec$ + - ^pyproject.toml$ - ^tools/ovn_migration/.*$ - ^vagrant/.*$ - ^roles/.*functional.*$ @@ -568,6 +572,7 @@ - ^tools/.*$ - ^tox.ini$ - ^plugin.spec$ + - ^pyproject.toml$ - ^tools/ovn_migration/.*$ - ^neutron/agent/dhcp/.*$ - ^neutron/agent/l2/.*$