Skip to content
Closed
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
1 change: 1 addition & 0 deletions docs/changelog/1179.bugfix.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Honor ``_fresh`` isolated installs when using the uv installer - by :user:`r3wretrhy`
7 changes: 6 additions & 1 deletion src/build/env.py
Original file line number Diff line number Diff line change
Expand Up @@ -473,7 +473,12 @@ def install_dependencies( # pragma: no cover -- uv tests are skipped on PyPy, c
if (verbosity := _ctx.verbosity) > 1:
cmd += [f'-{"v" * min(2, verbosity - 1)}']

cmd += ['install', *requirements, '--python', self.python_executable]
cmd += ['install']
if _fresh:
# Match pip's ``--ignore-installed`` so CLI / project_wheel_metadata
# ``_fresh=True`` (preset PYTHONPATH) actually reinstalls into the env.
cmd += ['--reinstall']
cmd += [*requirements, '--python', self.python_executable]

if constraints_txt_path:
cmd += ['-c', str(constraints_txt_path)]
Expand Down
1 change: 1 addition & 0 deletions tests/test_env.py
Original file line number Diff line number Diff line change
Expand Up @@ -298,6 +298,7 @@ def test_uv_impl_install_cmd_well_formed( # pragma: no cover -- uv tests are sk
'pip',
*(['-vv' if verbosity > 2 else '-v'] if verbosity > 1 else []),
'install',
*(['--reinstall'] if fresh else []),
'some',
'requirements',
'--python',
Expand Down
Loading