Skip to content

Commit

Permalink
Add python version check for using uv
Browse files Browse the repository at this point in the history
  • Loading branch information
sbidoul committed Feb 22, 2024
1 parent 28dd02f commit 1198b5d
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/pip_deepfreeze/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

from .pip import Installer
from .pyproject_toml import load_pyproject_toml
from .sanity import check_env
from .sanity import check_env, get_python_version_info
from .sync import sync as sync_operation
from .tree import tree as tree_operation
from .utils import comma_split, increase_verbosity, log_debug, log_error
Expand Down Expand Up @@ -81,6 +81,10 @@ def sync(
update of dependencies to to the latest version that matches
constraints. Optionally uninstall unneeded dependencies.
"""
if installer == Installer.uv and get_python_version_info(ctx.obj.python) < (3, 7):
log_error("The 'uv' installer requires Python 3.7 or later.")
raise typer.Exit(1)

sync_operation(
ctx.obj.python,
upgrade_all,
Expand Down

0 comments on commit 1198b5d

Please sign in to comment.