Skip to content

Commit

Permalink
Use python -m install --upgrade pip. (#576)
Browse files Browse the repository at this point in the history
  • Loading branch information
itsayellow authored Dec 1, 2020
1 parent 3889e8a commit 8b0e70e
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
Expand All @@ -91,15 +91,15 @@ 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")


@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")
Expand All @@ -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")
Expand All @@ -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?")
Expand All @@ -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"
Expand All @@ -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")
Expand Down

0 comments on commit 8b0e70e

Please sign in to comment.