Skip to content

Commit 5076a56

Browse files
committed
uv: support double verbosity flag
1 parent 5662669 commit 5076a56

File tree

3 files changed

+3
-4
lines changed

3 files changed

+3
-4
lines changed

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ typing = [
7171
"typing-extensions >= 3.7.4.3",
7272
]
7373
uv = [
74-
"uv >= 0.1.15",
74+
"uv >= 0.1.18",
7575
]
7676
virtualenv = [
7777
"virtualenv >= 20.0.35",

src/build/env.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -297,8 +297,7 @@ def create(self, path: str) -> None:
297297
def install_requirements(self, requirements: Collection[str]) -> None:
298298
cmd = [self._uv_bin, 'pip']
299299
if _ctx.verbosity > 1:
300-
# uv doesn't support doubling up -v unlike pip.
301-
cmd += ['-v']
300+
cmd += [f'-{"v" * min(2, _ctx.verbosity - 1)}']
302301
run_subprocess([*cmd, 'install', *requirements], env={**os.environ, 'VIRTUAL_ENV': self._env_path})
303302

304303
@property

tests/test_env.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,7 @@ def test_uv_impl_install_cmd_well_formed(
221221
assert len(install_call.args) == 1
222222
assert install_call.args[0][1:] == [
223223
'pip',
224-
*(['-v'] if verbosity > 1 else []),
224+
*(['-vv' if verbosity > 2 else '-v'] if verbosity > 1 else []),
225225
'install',
226226
'some',
227227
'requirements',

0 commit comments

Comments
 (0)