Skip to content

Commit

Permalink
build: a few more cheats
Browse files Browse the repository at this point in the history
  • Loading branch information
nedbat committed Oct 19, 2023
1 parent 525ddd6 commit 0f6c111
Showing 1 changed file with 16 additions and 5 deletions.
21 changes: 16 additions & 5 deletions igor.py
Original file line number Diff line number Diff line change
Expand Up @@ -408,12 +408,9 @@ def do_cheats():
print()
print(f"Coverage version is {facts.ver}")

repo = "nedbat/coveragepy"
github = f"https://github.com/{repo}"
egg = "egg=coverage==0.0" # to force a re-install
if facts.branch == "master":
print(f"pip install git+https://github.com/nedbat/coveragepy#{egg}")
else:
print(f"pip install git+https://github.com/nedbat/coveragepy@{facts.branch}#{egg}")
print(f"pip install git+https://github.com/nedbat/coveragepy@{facts.sha}#{egg}")
print(f"https://coverage.readthedocs.io/en/{facts.ver}/changes.html#changes-{facts.anchor}")

print(
Expand All @@ -422,6 +419,20 @@ def do_cheats():
f"[coverage {facts.ver}](https://pypi.org/project/coverage/{facts.ver})."
)

print("\n## To run this code:")
if facts.branch == "master":
print(f"pip install git+{github}#{egg}")
else:
print(f"pip install git+{github}@{facts.branch}#{egg}")
print(f"pip install git+{github}@{facts.sha}#{egg}")

print(
"\n## For other collaborators:\n" +
f"git clone {github}\n" +
f"cd {repo.partition('/')[-1]}\n" +
f"git checkout {facts.sha}"
)


def do_help():
"""List the available commands"""
Expand Down

0 comments on commit 0f6c111

Please sign in to comment.