Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrate generated project from runtime.txt to .python-version #5652

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion hooks/post_gen_project.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ def remove_utility_files():


def remove_heroku_files():
file_names = ["Procfile", "runtime.txt", "requirements.txt"]
file_names = ["Procfile", "requirements.txt"]
for file_name in file_names:
if file_name == "requirements.txt" and "{{ cookiecutter.ci_tool }}".lower() == "travis":
# don't remove the file if we are using travisci but not using heroku
Expand Down
2 changes: 1 addition & 1 deletion {{cookiecutter.project_slug}}/.github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ updates:
# Enable version updates for Python/Pip - Production
- package-ecosystem: 'pip'
# Look for a `requirements.txt` in the `root` directory
# also 'setup.cfg', 'runtime.txt' and 'requirements/*.txt'
# also 'setup.cfg', '.python-version' and 'requirements/*.txt'
directory: '/'
# Every weekday
schedule:
Expand Down
6 changes: 3 additions & 3 deletions {{cookiecutter.project_slug}}/.github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.12'
python-version-file: '.python-version'

{%- if cookiecutter.open_source_license != 'Not open source' %}
# Consider using pre-commit.ci for open source project
Expand Down Expand Up @@ -88,9 +88,9 @@ jobs:
{%- else %}

- name: Set up Python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: '3.12'
python-version-file: '.python-version'
cache: pip
cache-dependency-path: |
requirements/base.txt
Expand Down
3 changes: 0 additions & 3 deletions {{cookiecutter.project_slug}}/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,6 @@ docs/_build/
# PyBuilder
target/

# pyenv
.python-version

{% if cookiecutter.use_celery == 'y' -%}
# celery beat schedule file
celerybeat-schedule
Expand Down
1 change: 1 addition & 0 deletions {{cookiecutter.project_slug}}/.python-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
3.12
1 change: 0 additions & 1 deletion {{cookiecutter.project_slug}}/runtime.txt

This file was deleted.

Loading