Skip to content

Commit

Permalink
Update dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
konstin committed Apr 18, 2024
1 parent e0251f6 commit 433af5a
Show file tree
Hide file tree
Showing 32 changed files with 672 additions and 608 deletions.
654 changes: 309 additions & 345 deletions Cargo.lock

Large diffs are not rendered by default.

46 changes: 25 additions & 21 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,32 +3,36 @@ members = ["crates/*"]
resolver = "2"

[workspace.dependencies]
anyhow = "1.0.75"
cpufeatures = "0.2.11"
fs-err = "2.9.0"
anyhow = "1.0.81"
cpufeatures = "0.2.12"
fs-err = "2.11.0"
fs2 = "0.4.3"
indoc = "2.0.4"
indoc = "2.0.5"
logtest = "2.0.0"
mockito = "1.2.0"
pep508_rs = { version = "0.3.0", features = ["serde"] }
pyo3 = { version = "0.20.2", features = ["extension-module", "abi3-py37"] }
regex = "1.9.5"
serde = { version = "1.0.188", features = ["derive"] }
serde_json = "1.0.107"
sha2 = "0.10.7"
mockito = "1.4.0"
pep508_rs = { version = "0.4.2", features = ["serde"] }
pyo3 = { version = "0.21.2", features = ["extension-module", "abi3-py38"] }
regex = "1.10.4"
serde = { version = "1.0.197", features = ["derive"] }
serde_json = "1.0.115"
sha2 = "0.10.8"
tar = "0.4.40"
target-lexicon = "0.12.11"
tempfile = "3.8.0"
thiserror = "1.0.48"
toml = "0.8.0"
tracing = "0.1.37"
tracing-subscriber = "0.3.17"
target-lexicon = "0.12.14"
tempfile = "3.10.1"
thiserror = "1.0.58"
toml = "0.8.12"
tracing = { version = "0.1.40", features = ["log"] }
tracing-subscriber = "0.3.18"
unscanny = "0.1.0"
ureq = { version = "2.7.1", features = ["json"] }
walkdir = "2.4.0"
which = "6.0.0"
ureq = { version = "2.9.6", features = ["json"] }
walkdir = "2.5.0"
which = "6.0.1"
widestring = "1.0.2"
zstd = "0.13.0"
zstd = "0.13.1"

[patch.crates-io]
pep508_rs = { git = "https://github.com/konstin/pep508_rs", rev = "e5dea4d041a2a7863074a60b667d04989ba84dcc" }
pyo3-log = { git = "https://github.com/a1phyr/pyo3-log", rev = "76ff388163dd1100eb70ba164d59a42795829bdb" }

# Config for 'cargo dist'
[workspace.metadata.dist]
Expand Down
25 changes: 13 additions & 12 deletions crates/install-wheel-rs/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,26 +13,27 @@ name = "install_wheel_rs"
#crate-type = ["cdylib", "rlib"]

[dependencies]
clap = { version = "4.4.6", optional = true, features = ["derive", "env"] }
configparser = "3.0.2"
csv = "1.2.2"
data-encoding = "2.4.0"
clap = { version = "4.5.4", optional = true, features = ["derive", "env"] }
configparser = "3.0.4"
csv = "1.3.0"
data-encoding = "2.5.0"
fs-err = { workspace = true }
fs2 = { workspace = true }
glibc_version = "0.1.2"
goblin = "0.8.0"
mailparse = "0.14.0"
once_cell = "1.18.0"
mailparse = "0.14.1"
once_cell = "1.19.0"
pep508_rs = { workspace = true }
platform-info = "2.0.2"
plist = "1.5.0"
pyo3 = { workspace = true, features = ["extension-module", "abi3-py37"], optional = true }
rayon = { version = "1.8.0", optional = true }
plist = "1.6.1"
pyo3 = { workspace = true, features = ["extension-module", "abi3-py38"], optional = true }
rayon = { version = "1.10.0", optional = true }
regex = { workspace = true }
rfc2047-decoder = "1.0.1"
rfc2047-decoder = "1.0.5"
serde = { workspace = true, features = ["derive"] }
serde_json = { workspace = true }
sha2 = { workspace = true }
target-lexicon = "0.12.11"
target-lexicon = "0.12.14"
tempfile = { workspace = true }
thiserror = { workspace = true }
tracing = { workspace = true }
Expand All @@ -42,7 +43,7 @@ zip = { version = "0.6.6", default-features = false, features = ["deflate"] } #

[features]
default = ["cli", "parallel"]
python_bindings = ["pyo3", "tracing-subscriber"]
pyo3 = ["dep:pyo3", "tracing-subscriber"]
cli = ["clap"]
parallel = ["rayon"]

Expand Down
2 changes: 1 addition & 1 deletion crates/install-wheel-rs/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name = "install-wheel-rs"

[tool.maturin]
features = ["python_bindings"]
features = ["pyo3"]

[build-system]
requires = ["maturin>=1.2,<2.0"]
Expand Down
10 changes: 0 additions & 10 deletions crates/install-wheel-rs/src/install_location.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,6 @@ use tracing::{error, warn};

const INSTALL_LOCKFILE: &str = "install-wheel-rs.lock";

/// I'm not sure that's the right way to normalize here, but it's a single place to change
/// everything.
///
/// For displaying to the user, `-` is better, and it's also what poetry lockfile 2.0 does
///
/// Keep in sync with `find_distributions`
pub fn normalize_name(dep_name: &str) -> String {
dep_name.to_lowercase().replace(['.', '_'], "-")
}

/// A directory for which we acquired a install-wheel-rs.lock lockfile
pub struct LockedDir {
/// The directory to lock
Expand Down
7 changes: 5 additions & 2 deletions crates/install-wheel-rs/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
//! ).unwrap();
//! ```
use pep508_rs::InvalidNameError;
use platform_info::PlatformInfoError;
use std::fs::File;
use std::io;
Expand All @@ -20,15 +21,15 @@ use std::str::FromStr;
use thiserror::Error;
use zip::result::ZipError;

pub use install_location::{normalize_name, InstallLocation, LockedDir};
pub use install_location::{InstallLocation, LockedDir};
pub use wheel::{
get_script_launcher, install_wheel, parse_key_value_file, read_record_file, relative_to,
Script, SHEBANG_PYTHON,
};
pub use wheel_tags::{Arch, CompatibleTags, Os, WheelFilename};

mod install_location;
#[cfg(feature = "python_bindings")]
#[cfg(feature = "pyo3")]
mod python_bindings;
mod wheel;
mod wheel_tags;
Expand Down Expand Up @@ -70,6 +71,8 @@ pub enum Error {
PlatformInfo(#[source] PlatformInfoError),
#[error("Invalid version specification, only none or == is supported")]
Pep440,
#[error("Wheel has an unsupported package name")]
InvalidNameError(#[from] InvalidNameError),
}

impl Error {
Expand Down
7 changes: 4 additions & 3 deletions crates/install-wheel-rs/src/python_bindings.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@

use crate::{install_wheel, CompatibleTags, Error, InstallLocation, LockedDir, WheelFilename};
use pyo3::create_exception;
use pyo3::prelude::PyAnyMethods;
use pyo3::types::PyModule;
use pyo3::{pyclass, pymethods, pymodule, PyErr, PyResult, Python};
use pyo3::{pyclass, pymethods, pymodule, Bound, PyErr, PyResult, Python};
use std::env;
use std::fs::File;
use std::path::{Path, PathBuf};
Expand Down Expand Up @@ -47,7 +48,7 @@ impl LockedVenv {

pub fn install_wheel(&self, py: Python, wheel: PathBuf) -> PyResult<()> {
// Would be nicer through https://docs.python.org/3/c-api/init.html#c.Py_GetProgramFullPath
let sys_executable: String = py.import("sys")?.getattr("executable")?.extract()?;
let sys_executable: String = py.import_bound("sys")?.getattr("executable")?.extract()?;

// TODO: Pass those options on to the user
py.allow_threads(|| {
Expand Down Expand Up @@ -76,7 +77,7 @@ impl LockedVenv {
}

#[pymodule]
pub fn install_wheel_rs(_py: Python, m: &PyModule) -> PyResult<()> {
pub fn install_wheel_rs(_py: Python, m: &Bound<PyModule>) -> PyResult<()> {
// Good enough for now
if env::var_os("RUST_LOG").is_some() {
tracing_subscriber::fmt::init();
Expand Down
Loading

0 comments on commit 433af5a

Please sign in to comment.