add _lzma module with new dependency

Signed-off-by: Ashwin Naren <arihant2math@gmail.com>
This commit is contained in:
Ashwin Naren
2025-04-19 11:42:46 -07:00
committed by Jeong YunWon
parent 48b08a2b7f
commit 2a1ea45659
4 changed files with 41 additions and 0 deletions

32
Cargo.lock generated
View File

@@ -237,6 +237,12 @@ version = "1.22.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b6b1fc10dbac614ebc03540c9dbd60e83887fda27794998c6528f1782047d540"
[[package]]
name = "byteorder"
version = "1.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b"
[[package]]
name = "bzip2"
version = "0.5.2"
@@ -630,6 +636,21 @@ dependencies = [
"target-lexicon",
]
[[package]]
name = "crc"
version = "3.2.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "69e6e4d7b33a94f0991c26729976b10ebde1d34c3ee82408fb536164fa10d636"
dependencies = [
"crc-catalog",
]
[[package]]
name = "crc-catalog"
version = "2.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "19d374276b40fb8bbdee95aef7c7fa6b5316ec764510eb64b8dd0e2ed0d7e7f5"
[[package]]
name = "crc32fast"
version = "1.4.2"
@@ -1396,6 +1417,16 @@ dependencies = [
"twox-hash",
]
[[package]]
name = "lzma-rs"
version = "0.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "297e814c836ae64db86b36cf2a557ba54368d03f6afcd7d947c266692f71115e"
dependencies = [
"byteorder",
"crc",
]
[[package]]
name = "mac_address"
version = "1.1.8"
@@ -2467,6 +2498,7 @@ dependencies = [
"libc",
"libsqlite3-sys",
"libz-rs-sys",
"lzma-rs",
"mac_address",
"malachite-bigint",
"md-5",

View File

@@ -80,6 +80,7 @@ crc32fast = "1.3.2"
flate2 = { version = "1.1", default-features = false, features = ["zlib-rs"] }
libz-sys = { package = "libz-rs-sys", version = "0.5" }
bzip2 = { version = "0.5", features = ["libbz2-rs-sys"] }
lzma-rs = "0.3"
# tkinter
tk-sys = { git = "https://github.com/arihant2math/tkinter.git", tag = "v0.2.0", optional = true }

View File

@@ -83,6 +83,7 @@ mod uuid;
#[cfg(feature = "tkinter")]
mod tkinter;
mod lzma;
use rustpython_common as common;
use rustpython_vm as vm;
@@ -120,6 +121,7 @@ pub fn get_module_inits() -> impl Iterator<Item = (Cow<'static, str>, StdlibInit
"faulthandler" => faulthandler::make_module,
"gc" => gc::make_module,
"_hashlib" => hashlib::make_module,
"_lzma" => lzma::make_module,
"_sha1" => sha1::make_module,
"_sha3" => sha3::make_module,
"_sha256" => sha256::make_module,

6
stdlib/src/lzma.rs Normal file
View File

@@ -0,0 +1,6 @@
pub(crate) use _lzma::make_module;
#[pymodule]
mod _lzma {
}