@@ -12,7 +12,7 @@ use crate::db::Db;
1212use crate :: module_name:: ModuleName ;
1313use crate :: module_resolver:: typeshed:: { vendored_typeshed_versions, TypeshedVersions } ;
1414use crate :: site_packages:: VirtualEnvironment ;
15- use crate :: { Program , SearchPathSettings , SitePackages } ;
15+ use crate :: { Program , PythonPath , SearchPathSettings } ;
1616
1717use super :: module:: { Module , ModuleKind } ;
1818use super :: path:: { ModulePath , SearchPath , SearchPathValidationError } ;
@@ -171,7 +171,7 @@ impl SearchPaths {
171171 extra_paths,
172172 src_roots,
173173 custom_typeshed : typeshed,
174- site_packages : site_packages_paths ,
174+ python_path ,
175175 } = settings;
176176
177177 let system = db. system ( ) ;
@@ -222,16 +222,16 @@ impl SearchPaths {
222222
223223 static_paths. push ( stdlib_path) ;
224224
225- let site_packages_paths = match site_packages_paths {
226- SitePackages :: Derived { venv_path } => {
225+ let site_packages_paths = match python_path {
226+ PythonPath :: SysPrefix ( sys_prefix ) => {
227227 // TODO: We may want to warn here if the venv's python version is older
228228 // than the one resolved in the program settings because it indicates
229229 // that the `target-version` is incorrectly configured or that the
230230 // venv is out of date.
231- VirtualEnvironment :: new ( venv_path , system)
231+ VirtualEnvironment :: new ( sys_prefix , system)
232232 . and_then ( |venv| venv. site_packages_directories ( system) ) ?
233233 }
234- SitePackages :: Known ( paths) => paths
234+ PythonPath :: KnownSitePackages ( paths) => paths
235235 . iter ( )
236236 . map ( |path| canonicalize ( path, system) )
237237 . collect ( ) ,
@@ -1310,7 +1310,7 @@ mod tests {
13101310 extra_paths : vec ! [ ] ,
13111311 src_roots : vec ! [ src. clone( ) ] ,
13121312 custom_typeshed : Some ( custom_typeshed) ,
1313- site_packages : SitePackages :: Known ( vec ! [ site_packages] ) ,
1313+ python_path : PythonPath :: KnownSitePackages ( vec ! [ site_packages] ) ,
13141314 } ,
13151315 } ,
13161316 )
@@ -1816,7 +1816,7 @@ not_a_directory
18161816 extra_paths : vec ! [ ] ,
18171817 src_roots : vec ! [ SystemPathBuf :: from( "/src" ) ] ,
18181818 custom_typeshed : None ,
1819- site_packages : SitePackages :: Known ( vec ! [
1819+ python_path : PythonPath :: KnownSitePackages ( vec ! [
18201820 venv_site_packages,
18211821 system_site_packages,
18221822 ] ) ,
0 commit comments