Skip to content

Commit

Permalink
Include testing version upgrades.
Browse files Browse the repository at this point in the history
  • Loading branch information
EmilStenstrom committed Dec 9, 2023
2 parents f489979 + 8a7dd1a commit 266b1a1
Showing 1 changed file with 24 additions and 1 deletion.
25 changes: 24 additions & 1 deletion scripts/supported_versions.py
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,23 @@ def build_readme(python_to_django):
return version_lines


def build_pyenv(python_to_django):
lines = []
all_python_versions = python_to_django.keys()
for python_version in all_python_versions:
lines.append(
f'pyenv install -s {env_format(python_version, divider=".")}'
)

lines.append(
f'pyenv local {" ".join(env_format(version, divider=".") for version in all_python_versions)}'
)

lines.append("tox -p")

return "\n".join(lines)


def main():
django_to_python = get_supported_versions(
"https://docs.djangoproject.com/en/dev/faq/install/"
Expand Down Expand Up @@ -198,10 +215,16 @@ def main():
print()
print()

print("Add this to README:\n")
print("Add this to the middle of README.md:\n")
readme = build_readme(python_to_django)
print(readme)
print()
print()

print("And this to the end of README.md:\n")
pyenv = build_pyenv(python_to_django)
print(pyenv)
print()


if __name__ == "__main__":
Expand Down

0 comments on commit 266b1a1

Please sign in to comment.