@@ -46,6 +46,12 @@ def make_variant(args: list[str]) -> None:
46
46
help = "Output Directory to use to store the Wheel Variant" ,
47
47
)
48
48
49
+ parser .add_argument (
50
+ "--installer" ,
51
+ choices = ("pip" , "uv" ),
52
+ help = "Installer to use for providers (choices: pip, uv)" ,
53
+ )
54
+
49
55
group = parser .add_mutually_exclusive_group (required = True )
50
56
51
57
group .add_argument (
@@ -100,6 +106,7 @@ def make_variant(args: list[str]) -> None:
100
106
properties = parsed_args .properties ,
101
107
validate_properties = not parsed_args .skip_plugin_validation ,
102
108
variant_info = pyproject_toml ,
109
+ installer = parsed_args .installer ,
103
110
)
104
111
105
112
@@ -111,6 +118,7 @@ def _make_variant(
111
118
properties : list [VariantProperty ],
112
119
validate_properties : bool = True ,
113
120
variant_info : VariantPyProjectToml ,
121
+ installer : str | None = None ,
114
122
) -> None :
115
123
# Input Validation
116
124
if not input_filepath .is_file ():
@@ -133,7 +141,17 @@ def _make_variant(
133
141
if validate_properties :
134
142
from build .env import DefaultIsolatedEnv
135
143
136
- with DefaultIsolatedEnv () as venv :
144
+ # make it really verbose to make mypy happy
145
+ if installer is None :
146
+ env_factory = DefaultIsolatedEnv ()
147
+ elif installer == "pip" :
148
+ env_factory = DefaultIsolatedEnv (installer = "pip" )
149
+ elif installer == "uv" :
150
+ env_factory = DefaultIsolatedEnv (installer = "uv" )
151
+ else :
152
+ raise ValueError (f"unexpected installer={ installer } " )
153
+
154
+ with env_factory as venv :
137
155
try :
138
156
venv .install (
139
157
variant_info .get_provider_requires (
0 commit comments