Skip to content
This repository was archived by the owner on Jan 15, 2025. It is now read-only.

Commit 433af5a

Browse files
committed
Update dependencies
1 parent e0251f6 commit 433af5a

32 files changed

+672
-608
lines changed

Cargo.lock

+309-345
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

+25-21
Original file line numberDiff line numberDiff line change
@@ -3,32 +3,36 @@ members = ["crates/*"]
33
resolver = "2"
44

55
[workspace.dependencies]
6-
anyhow = "1.0.75"
7-
cpufeatures = "0.2.11"
8-
fs-err = "2.9.0"
6+
anyhow = "1.0.81"
7+
cpufeatures = "0.2.12"
8+
fs-err = "2.11.0"
99
fs2 = "0.4.3"
10-
indoc = "2.0.4"
10+
indoc = "2.0.5"
1111
logtest = "2.0.0"
12-
mockito = "1.2.0"
13-
pep508_rs = { version = "0.3.0", features = ["serde"] }
14-
pyo3 = { version = "0.20.2", features = ["extension-module", "abi3-py37"] }
15-
regex = "1.9.5"
16-
serde = { version = "1.0.188", features = ["derive"] }
17-
serde_json = "1.0.107"
18-
sha2 = "0.10.7"
12+
mockito = "1.4.0"
13+
pep508_rs = { version = "0.4.2", features = ["serde"] }
14+
pyo3 = { version = "0.21.2", features = ["extension-module", "abi3-py38"] }
15+
regex = "1.10.4"
16+
serde = { version = "1.0.197", features = ["derive"] }
17+
serde_json = "1.0.115"
18+
sha2 = "0.10.8"
1919
tar = "0.4.40"
20-
target-lexicon = "0.12.11"
21-
tempfile = "3.8.0"
22-
thiserror = "1.0.48"
23-
toml = "0.8.0"
24-
tracing = "0.1.37"
25-
tracing-subscriber = "0.3.17"
20+
target-lexicon = "0.12.14"
21+
tempfile = "3.10.1"
22+
thiserror = "1.0.58"
23+
toml = "0.8.12"
24+
tracing = { version = "0.1.40", features = ["log"] }
25+
tracing-subscriber = "0.3.18"
2626
unscanny = "0.1.0"
27-
ureq = { version = "2.7.1", features = ["json"] }
28-
walkdir = "2.4.0"
29-
which = "6.0.0"
27+
ureq = { version = "2.9.6", features = ["json"] }
28+
walkdir = "2.5.0"
29+
which = "6.0.1"
3030
widestring = "1.0.2"
31-
zstd = "0.13.0"
31+
zstd = "0.13.1"
32+
33+
[patch.crates-io]
34+
pep508_rs = { git = "https://github.com/konstin/pep508_rs", rev = "e5dea4d041a2a7863074a60b667d04989ba84dcc" }
35+
pyo3-log = { git = "https://github.com/a1phyr/pyo3-log", rev = "76ff388163dd1100eb70ba164d59a42795829bdb" }
3236

3337
# Config for 'cargo dist'
3438
[workspace.metadata.dist]

crates/install-wheel-rs/Cargo.toml

+13-12
Original file line numberDiff line numberDiff line change
@@ -13,26 +13,27 @@ name = "install_wheel_rs"
1313
#crate-type = ["cdylib", "rlib"]
1414

1515
[dependencies]
16-
clap = { version = "4.4.6", optional = true, features = ["derive", "env"] }
17-
configparser = "3.0.2"
18-
csv = "1.2.2"
19-
data-encoding = "2.4.0"
16+
clap = { version = "4.5.4", optional = true, features = ["derive", "env"] }
17+
configparser = "3.0.4"
18+
csv = "1.3.0"
19+
data-encoding = "2.5.0"
2020
fs-err = { workspace = true }
2121
fs2 = { workspace = true }
2222
glibc_version = "0.1.2"
2323
goblin = "0.8.0"
24-
mailparse = "0.14.0"
25-
once_cell = "1.18.0"
24+
mailparse = "0.14.1"
25+
once_cell = "1.19.0"
26+
pep508_rs = { workspace = true }
2627
platform-info = "2.0.2"
27-
plist = "1.5.0"
28-
pyo3 = { workspace = true, features = ["extension-module", "abi3-py37"], optional = true }
29-
rayon = { version = "1.8.0", optional = true }
28+
plist = "1.6.1"
29+
pyo3 = { workspace = true, features = ["extension-module", "abi3-py38"], optional = true }
30+
rayon = { version = "1.10.0", optional = true }
3031
regex = { workspace = true }
31-
rfc2047-decoder = "1.0.1"
32+
rfc2047-decoder = "1.0.5"
3233
serde = { workspace = true, features = ["derive"] }
3334
serde_json = { workspace = true }
3435
sha2 = { workspace = true }
35-
target-lexicon = "0.12.11"
36+
target-lexicon = "0.12.14"
3637
tempfile = { workspace = true }
3738
thiserror = { workspace = true }
3839
tracing = { workspace = true }
@@ -42,7 +43,7 @@ zip = { version = "0.6.6", default-features = false, features = ["deflate"] } #
4243

4344
[features]
4445
default = ["cli", "parallel"]
45-
python_bindings = ["pyo3", "tracing-subscriber"]
46+
pyo3 = ["dep:pyo3", "tracing-subscriber"]
4647
cli = ["clap"]
4748
parallel = ["rayon"]
4849

crates/install-wheel-rs/pyproject.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
name = "install-wheel-rs"
33

44
[tool.maturin]
5-
features = ["python_bindings"]
5+
features = ["pyo3"]
66

77
[build-system]
88
requires = ["maturin>=1.2,<2.0"]

crates/install-wheel-rs/src/install_location.rs

-10
Original file line numberDiff line numberDiff line change
@@ -10,16 +10,6 @@ use tracing::{error, warn};
1010

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

13-
/// I'm not sure that's the right way to normalize here, but it's a single place to change
14-
/// everything.
15-
///
16-
/// For displaying to the user, `-` is better, and it's also what poetry lockfile 2.0 does
17-
///
18-
/// Keep in sync with `find_distributions`
19-
pub fn normalize_name(dep_name: &str) -> String {
20-
dep_name.to_lowercase().replace(['.', '_'], "-")
21-
}
22-
2313
/// A directory for which we acquired a install-wheel-rs.lock lockfile
2414
pub struct LockedDir {
2515
/// The directory to lock

crates/install-wheel-rs/src/lib.rs

+5-2
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
//! ).unwrap();
1313
//! ```
1414
15+
use pep508_rs::InvalidNameError;
1516
use platform_info::PlatformInfoError;
1617
use std::fs::File;
1718
use std::io;
@@ -20,15 +21,15 @@ use std::str::FromStr;
2021
use thiserror::Error;
2122
use zip::result::ZipError;
2223

23-
pub use install_location::{normalize_name, InstallLocation, LockedDir};
24+
pub use install_location::{InstallLocation, LockedDir};
2425
pub use wheel::{
2526
get_script_launcher, install_wheel, parse_key_value_file, read_record_file, relative_to,
2627
Script, SHEBANG_PYTHON,
2728
};
2829
pub use wheel_tags::{Arch, CompatibleTags, Os, WheelFilename};
2930

3031
mod install_location;
31-
#[cfg(feature = "python_bindings")]
32+
#[cfg(feature = "pyo3")]
3233
mod python_bindings;
3334
mod wheel;
3435
mod wheel_tags;
@@ -70,6 +71,8 @@ pub enum Error {
7071
PlatformInfo(#[source] PlatformInfoError),
7172
#[error("Invalid version specification, only none or == is supported")]
7273
Pep440,
74+
#[error("Wheel has an unsupported package name")]
75+
InvalidNameError(#[from] InvalidNameError),
7376
}
7477

7578
impl Error {

crates/install-wheel-rs/src/python_bindings.rs

+4-3
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,9 @@
22

33
use crate::{install_wheel, CompatibleTags, Error, InstallLocation, LockedDir, WheelFilename};
44
use pyo3::create_exception;
5+
use pyo3::prelude::PyAnyMethods;
56
use pyo3::types::PyModule;
6-
use pyo3::{pyclass, pymethods, pymodule, PyErr, PyResult, Python};
7+
use pyo3::{pyclass, pymethods, pymodule, Bound, PyErr, PyResult, Python};
78
use std::env;
89
use std::fs::File;
910
use std::path::{Path, PathBuf};
@@ -47,7 +48,7 @@ impl LockedVenv {
4748

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

5253
// TODO: Pass those options on to the user
5354
py.allow_threads(|| {
@@ -76,7 +77,7 @@ impl LockedVenv {
7677
}
7778

7879
#[pymodule]
79-
pub fn install_wheel_rs(_py: Python, m: &PyModule) -> PyResult<()> {
80+
pub fn install_wheel_rs(_py: Python, m: &Bound<PyModule>) -> PyResult<()> {
8081
// Good enough for now
8182
if env::var_os("RUST_LOG").is_some() {
8283
tracing_subscriber::fmt::init();

0 commit comments

Comments
 (0)