From 8b0e70ebf69a10425fd5eafe31394dae2ed1174d Mon Sep 17 00:00:00 2001 From: Matthew Clapp Date: Tue, 1 Dec 2020 11:40:01 -0800 Subject: [PATCH] Use python -m install --upgrade pip. (#576) --- noxfile.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/noxfile.py b/noxfile.py index f49c219eb8..53f3274747 100644 --- a/noxfile.py +++ b/noxfile.py @@ -80,7 +80,7 @@ def on_master_no_changes(session): @nox.session(python=PYTHON_ALL_VERSIONS) def tests(session): - session.install("--upgrade", "pip") + session.run("python", "-m", "pip", "install", "--upgrade", "pip") prebuild_wheels(session, PREBUILD_PACKAGES) session.install("-e", ".", "pytest", "pytest-cov") tests = session.posargs or ["tests"] @@ -91,7 +91,7 @@ def tests(session): @nox.session def cover(session): """Coverage analysis""" - session.install("--upgrade", "pip") + session.run("python", "-m", "pip", "install", "--upgrade", "pip") session.install("coverage") session.run("coverage", "report", "--show-missing", "--fail-under=70") session.run("coverage", "erase") @@ -99,7 +99,7 @@ def cover(session): @nox.session(python=PYTHON_DEFAULT_VERSION) def lint(session): - session.install("--upgrade", "pip") + session.run("python", "-m", "pip", "install", "--upgrade", "pip") session.install(*LINT_DEPENDENCIES) files = [str(Path("src") / "pipx"), "tests", "scripts"] + [ str(p) for p in Path(".").glob("*.py") @@ -114,14 +114,14 @@ def lint(session): @nox.session(python=PYTHON_ALL_VERSIONS) def develop(session): - session.install("--upgrade", "pip") + session.run("python", "-m", "pip", "install", "--upgrade", "pip") session.install(*DOC_DEPENDENCIES, *LINT_DEPENDENCIES) session.install("-e", ".") @nox.session(python=PYTHON_DEFAULT_VERSION) def build(session): - session.install("--upgrade", "pip") + session.run("python", "-m", "pip", "install", "--upgrade", "pip") session.install("build") session.run("rm", "-rf", "dist", "build", external=True) session.run("python", "-m", "build") @@ -130,7 +130,7 @@ def build(session): @nox.session(python=PYTHON_DEFAULT_VERSION) def publish(session): on_master_no_changes(session) - session.install("--upgrade", "pip") + session.run("python", "-m", "pip", "install", "--upgrade", "pip") session.install("twine") build(session) print("REMINDER: Has the changelog been updated?") @@ -139,7 +139,7 @@ def publish(session): @nox.session(python=PYTHON_DEFAULT_VERSION) def build_docs(session): - session.install("--upgrade", "pip") + session.run("python", "-m", "pip", "install", "--upgrade", "pip") session.install(*DOC_DEPENDENCIES) session.env[ "PIPX__DOC_DEFAULT_PYTHON" @@ -150,7 +150,7 @@ def build_docs(session): @nox.session(python=PYTHON_DEFAULT_VERSION) def publish_docs(session): - session.install("--upgrade", "pip") + session.run("python", "-m", "pip", "install", "--upgrade", "pip") session.install(*DOC_DEPENDENCIES) build_docs(session) session.run("mkdocs", "gh-deploy")