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 [1][2]. pip 24.2 has now deprecated a similar fallback to
"setup.py develop" and plans to fully remove this in pip 25.0 [3][4][5].
pbr supports editable installs since 6.0.0 so we can get ahead of this
by adding our own minimal pyproject.toml to ensure we are using the
correct build system.

[1] https://pip.pypa.io/en/stable/news/#v23-1
[2] https://github.com/pypa/pip/issues/8368
[3] https://pip.pypa.io/en/stable/news/#v24-2
[4] https://github.com/pypa/pip/issues/11457
[5] https://ichard26.github.io/blog/2024/08/whats-new-in-pip-24.2/

Change-Id: I66b075b15a83e8d30803e92c36683aff569f3d7b
This commit is contained in:
Ivan Anfimov
2025-05-04 15:12:22 +00:00
committed by Dmitriy Rabotyagov
parent 39bcc30685
commit 3e0b163d80
3 changed files with 5 additions and 4 deletions

3
pyproject.toml Normal file
View File

@@ -0,0 +1,3 @@
[build-system]
requires = ["pbr>=6.0.0", "setuptools>=64.0.0"]
build-backend = "pbr.build"

View File

@@ -3,7 +3,7 @@
# you find any incorrect lower bounds, let us know or propose a fix.
alembic>=1.8.0
pbr!=2.1.0,>=2.0.0 # Apache-2.0
pbr>=6.0.0 # Apache-2.0
eventlet>=0.27.0 # MIT
SQLAlchemy>=1.4.0 # MIT
keystonemiddleware>=4.17.0 # Apache-2.0

View File

@@ -15,6 +15,4 @@
import setuptools
setuptools.setup(
setup_requires=['pbr>=2.0.0'],
pbr=True)
setuptools.setup(pbr=True)