mirror of
https://github.com/astral-sh/uv.git
synced 2025-07-07 21:35:00 +00:00
Query interpreter to determine correct virtualenv
paths (#2188)
## Summary This PR migrates our virtualenv creation from a setup that assumes prior knowledge of the correct paths, to a technique borrowed from `virtualenv` whereby we use `sysconfig` and `distutils` to determine the paths. The general trick is to grab the expected paths with `sysconfig`, then make them all relative, then make them absolute for a given directory. Closes #2095. Closes #2153.
This commit is contained in:
parent
a8ac7b1eb4
commit
0f6fc117c1
6 changed files with 171 additions and 66 deletions
|
@ -9,7 +9,6 @@ use serde::{Deserialize, Serialize};
|
|||
/// See: <https://docs.python.org/3.12/library/sysconfig.html#installation-paths>
|
||||
#[derive(Debug, Deserialize, Serialize, Clone)]
|
||||
pub struct Scheme {
|
||||
pub stdlib: PathBuf,
|
||||
pub purelib: PathBuf,
|
||||
pub platlib: PathBuf,
|
||||
pub scripts: PathBuf,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue