mirror of
https://github.com/astral-sh/uv.git
synced 2025-07-07 21:35:00 +00:00
Use simpler pip-like Scheme
for install paths (#2173)
## Summary This will make it easier to use the paths returned by `distutils.py` (for some cases). No code or behavior changes; just removing some fields we don't need.
This commit is contained in:
parent
93f5609476
commit
5fed1f6259
13 changed files with 66 additions and 93 deletions
|
@ -2,10 +2,12 @@ pub use base_url::*;
|
|||
pub use direct_url::*;
|
||||
pub use lenient_requirement::*;
|
||||
pub use metadata::*;
|
||||
pub use scheme::*;
|
||||
pub use simple_json::*;
|
||||
|
||||
mod base_url;
|
||||
mod direct_url;
|
||||
mod lenient_requirement;
|
||||
mod metadata;
|
||||
mod scheme;
|
||||
mod simple_json;
|
||||
|
|
18
crates/pypi-types/src/scheme.rs
Normal file
18
crates/pypi-types/src/scheme.rs
Normal file
|
@ -0,0 +1,18 @@
|
|||
use std::path::PathBuf;
|
||||
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
||||
/// The paths associated with an installation scheme, typically returned by `sysconfig.get_paths()`.
|
||||
///
|
||||
/// See: <https://github.com/pypa/pip/blob/ae5fff36b0aad6e5e0037884927eaa29163c0611/src/pip/_internal/models/scheme.py#L12>
|
||||
///
|
||||
/// 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,
|
||||
pub data: PathBuf,
|
||||
pub include: PathBuf,
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue