@@ -28,7 +28,7 @@ use uv_distribution_types::{
28
28
} ;
29
29
use uv_git:: GitResolver ;
30
30
use uv_installer:: { Installer , Plan , Planner , Preparer , SitePackages } ;
31
- use uv_pypi_types:: { Conflicts , Requirement } ;
31
+ use uv_pypi_types:: { Conflicts , Requirement , VariantProviderBackend } ;
32
32
use uv_python:: { Interpreter , PythonEnvironment } ;
33
33
use uv_resolver:: {
34
34
ExcludeNewer , FlatIndex , Flexibility , InMemoryIndex , Manifest , OptionsBuilder ,
@@ -38,6 +38,7 @@ use uv_types::{
38
38
AnyErrorBuild , BuildContext , BuildIsolation , BuildStack , EmptyInstalledPackages , HashStrategy ,
39
39
InFlight ,
40
40
} ;
41
+ use uv_variant_frontend:: VariantBuild ;
41
42
use uv_workspace:: WorkspaceCache ;
42
43
43
44
#[ derive( Debug , Error ) ]
@@ -161,6 +162,24 @@ impl<'a> BuildDispatch<'a> {
161
162
. collect ( ) ;
162
163
self
163
164
}
165
+
166
+ pub async fn setup_variants < ' data > (
167
+ & ' data self ,
168
+ backend : VariantProviderBackend ,
169
+ build_output : BuildOutput ,
170
+ ) -> Result < VariantBuild , uv_variant_frontend:: Error > {
171
+ let builder = VariantBuild :: setup (
172
+ backend,
173
+ self . interpreter ,
174
+ self ,
175
+ self . build_extra_env_vars . clone ( ) ,
176
+ build_output,
177
+ self . concurrency . builds ,
178
+ )
179
+ . boxed_local ( )
180
+ . await ?;
181
+ Ok ( builder)
182
+ }
164
183
}
165
184
166
185
#[ allow( refining_impl_trait) ]
@@ -229,6 +248,7 @@ impl BuildContext for BuildDispatch<'_> {
229
248
// Conflicting groups only make sense when doing universal resolution.
230
249
Conflicts :: empty ( ) ,
231
250
Some ( tags) ,
251
+ None ,
232
252
self . flat_index ,
233
253
& self . shared_state . index ,
234
254
self . hasher ,
0 commit comments