Skip to content

Commit

Permalink
Merge pull request #144 from sbidoul/uvpip
Browse files Browse the repository at this point in the history
Rename uv option to uvpip
  • Loading branch information
sbidoul authored Mar 1, 2024
2 parents deb5fd4 + 92e1c7e commit a4cef9d
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 6 deletions.
8 changes: 4 additions & 4 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -110,9 +110,9 @@ in a fresh virtualenv).

.. note::

``pip-deepfreeze`` has experimental support for the `uv
``pip-deepfreeze`` has experimental support for the `uv pip
<https://github.com/astral-sh/uv>`_ installer. To use it, run ``pip-df sync
--installer=uv``.
--installer=uvpip``.

When you add or remove dependencies of your project, run ``pip-df sync`` again
to update your environment and ``requirements.txt``.
Expand Down Expand Up @@ -355,7 +355,7 @@ pip-df sync
dependencies of the project. If not
specified, ask confirmation.
--installer [pip|uv]
--installer [pip|uvpip]
--help Show this message and exit.
Expand Down Expand Up @@ -396,7 +396,7 @@ Example:
[tool.pip-deepfreeze.sync]
extras = "test,doc"
post_sync_commands = ["pip-preserve-requirements requirements*.txt"]
installer = "uv"
installer = "uvpip"
Other tools
-----------
Expand Down
3 changes: 3 additions & 0 deletions news/144.removal
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Change ``--installer=uv`` to ``--installer=uvpip``. This is a breaking change that
we do while this is young, to avoid possible confusion in the future with other ``uv``
install mechanisms that are on their roadmap.
4 changes: 2 additions & 2 deletions src/pip_deepfreeze/pip.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ class PipInspectReport(TypedDict, total=False):

class Installer(str, Enum):
pip = "pip"
uv = "uv"
uvpip = "uvpip"


def _pip_install_cmd_and_env(python: str) -> Tuple[List[str], Dict[str, str]]:
Expand All @@ -74,7 +74,7 @@ def _install_cmd_and_env(
) -> Tuple[List[str], Dict[str, str]]:
if installer == Installer.pip:
return _pip_install_cmd_and_env(python)
elif installer == Installer.uv:
elif installer == Installer.uvpip:
if get_python_version_info(python) < (3, 7):
log_error("The 'uv' installer requires Python 3.7 or later.")
raise typer.Exit(1)
Expand Down

0 comments on commit a4cef9d

Please sign in to comment.