File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -17,7 +17,7 @@ RUN useradd -m dev && chown -R dev:dev /workspaces/dfetch
1717USER dev
1818
1919ENV PATH="/home/dev/.local/bin:${PATH}"
20- ENV PYTHONPATH="/home/dev/.local/lib/python3.12 "
20+ ENV PYTHONPATH="/home/dev/.local/lib/python3.13 "
2121ENV PYTHONUSERBASE="/home/dev/.local"
2222
2323COPY --chown=dev:dev . .
Original file line number Diff line number Diff line change @@ -16,7 +16,7 @@ formats:
1616build :
1717 os : ubuntu-22.04
1818 tools :
19- python : " 3.12 "
19+ python : " 3.13 "
2020
2121# Optionally set the version of Python and requirements required to build your docs
2222python :
Original file line number Diff line number Diff line change @@ -19,7 +19,7 @@ and install all runtime dependencies from ``pyproject.toml``.
1919
2020 script/create_venv.py
2121
22- .. important :: *dfetch* is primarily developed with python 3.12
22+ .. important :: *dfetch* is primarily developed with python 3.13
2323
2424 Running in Github Codespaces
2525----------------------------
Original file line number Diff line number Diff line change 1- #!/usr/bin/env python3.12
1+ #!/usr/bin/env python3
22"""Script to setup a venv."""
33
44import argparse
55import pathlib
66import subprocess # nosec
7+ import sys
78import venv
89from typing import Any
910
1011PROJECT_ROOT = pathlib .Path (__file__ ).resolve ().parent .parent
1112
1213
14+ MIN_VERSION = (3 , 9 ) # minimum supported; change if needed
15+ RECOMMENDED_VERSION = (3 , 13 ) # preferred for development
16+
17+
18+ if sys .version_info [:2 ] < MIN_VERSION :
19+ raise RuntimeError (
20+ f"⚠ Unsupported Python version { sys .version_info .major } .{ sys .version_info .minor } . "
21+ f"Please use Python { MIN_VERSION [0 ]} .{ MIN_VERSION [1 ]} or newer."
22+ )
23+ if sys .version_info [:2 ] != RECOMMENDED_VERSION :
24+ print (
25+ f"⚠ Warning: Running with Python { sys .version_info .major } .{ sys .version_info .minor } , "
26+ f", dfetch is primarily developed with Python { RECOMMENDED_VERSION [0 ]} .{ RECOMMENDED_VERSION [1 ]} ."
27+ )
28+
29+
1330class MyEnvBuilder (venv .EnvBuilder ):
1431 """Create a virtual environment.
1532
You can’t perform that action at this time.
0 commit comments