mirror of
https://github.com/astral-sh/uv.git
synced 2025-07-07 13:25:00 +00:00
Move DirectUrl
into pypi-types
(#343)
This needs to be reused elsewhere, and there's nothing specific to wheel installation about it.
This commit is contained in:
parent
24e30e6557
commit
b013ea9c93
7 changed files with 10 additions and 6 deletions
1
Cargo.lock
generated
1
Cargo.lock
generated
|
@ -1445,6 +1445,7 @@ dependencies = [
|
|||
"platform-info",
|
||||
"plist",
|
||||
"pyo3",
|
||||
"pypi-types",
|
||||
"rayon",
|
||||
"reflink-copy",
|
||||
"regex",
|
||||
|
|
|
@ -17,8 +17,9 @@ license = { workspace = true }
|
|||
name = "install_wheel_rs"
|
||||
|
||||
[dependencies]
|
||||
platform-host = { path = "../platform-host" }
|
||||
distribution-filename = { path = "../distribution-filename" }
|
||||
platform-host = { path = "../platform-host" }
|
||||
pypi-types = { path = "../pypi-types" }
|
||||
|
||||
clap = { workspace = true, optional = true, features = ["derive", "env"] }
|
||||
configparser = { workspace = true }
|
||||
|
|
|
@ -7,7 +7,6 @@ use platform_info::PlatformInfoError;
|
|||
use thiserror::Error;
|
||||
use zip::result::ZipError;
|
||||
|
||||
pub use direct_url::DirectUrl;
|
||||
pub use install_location::{normalize_name, InstallLocation, LockedDir};
|
||||
use platform_host::{Arch, Os};
|
||||
pub use record::RecordEntry;
|
||||
|
@ -18,7 +17,6 @@ pub use wheel::{
|
|||
relative_to, SHEBANG_PYTHON,
|
||||
};
|
||||
|
||||
mod direct_url;
|
||||
mod install_location;
|
||||
pub mod linker;
|
||||
#[cfg(feature = "python_bindings")]
|
||||
|
|
|
@ -10,12 +10,14 @@ use fs_err::File;
|
|||
use mailparse::MailHeaderMap;
|
||||
use tracing::{debug, span, Level};
|
||||
|
||||
use pypi_types::DirectUrl;
|
||||
|
||||
use crate::install_location::InstallLocation;
|
||||
use crate::wheel::{
|
||||
extra_dist_info, install_data, parse_wheel_version, read_scripts_from_section,
|
||||
write_script_entrypoints,
|
||||
};
|
||||
use crate::{read_record_file, DirectUrl, Error, Script};
|
||||
use crate::{read_record_file, Error, Script};
|
||||
|
||||
/// Install the given wheel to the given venv
|
||||
///
|
||||
|
|
|
@ -14,18 +14,18 @@ use mailparse::MailHeaderMap;
|
|||
use sha2::{Digest, Sha256};
|
||||
use tempfile::tempdir;
|
||||
use tracing::{debug, error, span, warn, Level};
|
||||
|
||||
use walkdir::WalkDir;
|
||||
use zip::result::ZipError;
|
||||
use zip::write::FileOptions;
|
||||
use zip::{ZipArchive, ZipWriter};
|
||||
|
||||
use distribution_filename::WheelFilename;
|
||||
use pypi_types::DirectUrl;
|
||||
|
||||
use crate::install_location::{InstallLocation, LockedDir};
|
||||
use crate::record::RecordEntry;
|
||||
use crate::script::Script;
|
||||
use crate::{DirectUrl, Error};
|
||||
use crate::Error;
|
||||
|
||||
/// `#!/usr/bin/env python`
|
||||
pub const SHEBANG_PYTHON: &str = "#!/usr/bin/env python";
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
pub use direct_url::DirectUrl;
|
||||
pub use metadata::{Error, Metadata21};
|
||||
pub use simple_json::{File, SimpleJson};
|
||||
|
||||
mod direct_url;
|
||||
mod metadata;
|
||||
mod simple_json;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue