Use PBR's pyproject.toml build-backend support
setup.py is still required as the build_meta entrypoints PBR uses execute setup.py, but only needs to set the pbr attribute to True now. Really what this change gets us is control over the version of SetupTools and PBR that are used, but much of the underlying machinery doesn't change. Some gymnastics are required in order to keep working with Python 3.6, due to Pip and SetupTools disagreeing on PEP 660 support with that interpreter version, but appropriate TODO comments are left as a reminder to simplify once we no longer care to support those platforms. Change-Id: If210b5f5b5b7b9bbcb2538c49fbe7a5f7b8260ed
This commit is contained in:
parent
97c7c51eef
commit
fdff6b292a
18
noxfile.py
18
noxfile.py
@ -32,7 +32,11 @@ def docs(session):
|
||||
def venv(session):
|
||||
session.install("-r", "requirements.txt")
|
||||
session.install("-r", "test-requirements.txt")
|
||||
session.install("-e", ".")
|
||||
# TODO: clean this conditional up once Python 3.6 support is dropped
|
||||
if session.python == "3.6":
|
||||
session.install(".")
|
||||
else:
|
||||
session.install("-e", ".")
|
||||
session.run(*session.posargs)
|
||||
|
||||
|
||||
@ -41,7 +45,11 @@ def venv(session):
|
||||
def tests(session):
|
||||
session.install("-r", "requirements.txt")
|
||||
session.install("-r", "test-requirements.txt")
|
||||
session.install("-e", ".")
|
||||
# TODO: clean this conditional up once Python 3.6 support is dropped
|
||||
if session.python == "3.6":
|
||||
session.install(".")
|
||||
else:
|
||||
session.install("-e", ".")
|
||||
session.run("stestr", "run", *session.posargs)
|
||||
session.run("stestr", "slowest")
|
||||
|
||||
@ -50,7 +58,11 @@ def tests(session):
|
||||
def cover(session):
|
||||
session.install("-r", "requirements.txt")
|
||||
session.install("-r", "test-requirements.txt")
|
||||
session.install("-e", ".")
|
||||
# TODO: clean this conditional up once Python 3.6 support is dropped
|
||||
if session.python == "3.6":
|
||||
session.install(".")
|
||||
else:
|
||||
session.install("-e", ".")
|
||||
session.env["PYTHON"] = "coverage run --source bindep --parallel-mode"
|
||||
session.run("stestr", "run", *session.posargs)
|
||||
session.run("stestr", "slowest")
|
||||
|
3
pyproject.toml
Normal file
3
pyproject.toml
Normal file
@ -0,0 +1,3 @@
|
||||
[build-system]
|
||||
requires = ["pbr>=6.1.1"]
|
||||
build-backend = "pbr.build"
|
@ -42,8 +42,8 @@ classifier =
|
||||
Topic :: Utilities
|
||||
python_requires = >=3.6
|
||||
|
||||
[files]
|
||||
packages = bindep
|
||||
[options]
|
||||
py_modules = bindep
|
||||
|
||||
[pbr]
|
||||
warnerrors = True
|
||||
|
6
setup.py
Executable file → Normal file
6
setup.py
Executable file → Normal file
@ -14,8 +14,8 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
# TODO: Delete this file once PBR gains the ability to act as a build hook
|
||||
|
||||
import setuptools
|
||||
|
||||
setuptools.setup(
|
||||
setup_requires=['pbr'],
|
||||
pbr=True)
|
||||
setuptools.setup(pbr=True)
|
||||
|
Loading…
x
Reference in New Issue
Block a user