From 9191b13cea53e301e6195a21561d43ba1c5379a1 Mon Sep 17 00:00:00 2001 From: Wackyator Date: Tue, 27 Feb 2024 18:33:24 +0530 Subject: [PATCH 01/10] feat: seperate bindings and lib into seperate crate --- py-rattler/Cargo.lock | 232 +++++++++--------- py-rattler/Cargo.toml | 54 +--- py-rattler/pixi.toml | 2 +- py-rattler/pyo3-rattler/Cargo.toml | 57 +++++ .../{ => pyo3-rattler}/src/about_json.rs | 0 .../{ => pyo3-rattler}/src/channel/mod.rs | 0 py-rattler/{ => pyo3-rattler}/src/error.rs | 0 .../src/generic_virtual_package.rs | 0 py-rattler/{ => pyo3-rattler}/src/index.rs | 0 py-rattler/pyo3-rattler/src/lib.rs | 58 +++++ py-rattler/{ => pyo3-rattler}/src/linker.rs | 0 py-rattler/{ => pyo3-rattler}/src/lock/mod.rs | 0 .../{ => pyo3-rattler}/src/match_spec.rs | 0 py-rattler/{ => pyo3-rattler}/src/meta.rs | 0 .../src/nameless_match_spec.rs | 0 .../src/networking/authenticated_client.rs | 0 .../src/networking/cached_repo_data.rs | 0 .../{ => pyo3-rattler}/src/networking/mod.rs | 0 .../{ => pyo3-rattler}/src/package_name.rs | 0 py-rattler/{ => pyo3-rattler}/src/platform.rs | 0 .../{ => pyo3-rattler}/src/prefix_paths.rs | 0 py-rattler/{ => pyo3-rattler}/src/record.rs | 0 .../{ => pyo3-rattler}/src/repo_data/mod.rs | 0 .../src/repo_data/patch_instructions.rs | 0 .../src/repo_data/sparse.rs | 0 py-rattler/{ => pyo3-rattler}/src/shell.rs | 0 py-rattler/{ => pyo3-rattler}/src/solver.rs | 0 .../src/version/component.rs | 0 .../{ => pyo3-rattler}/src/version/mod.rs | 0 .../{ => pyo3-rattler}/src/virtual_package.rs | 0 py-rattler/src/lib.rs | 57 +---- 31 files changed, 244 insertions(+), 216 deletions(-) create mode 100644 py-rattler/pyo3-rattler/Cargo.toml rename py-rattler/{ => pyo3-rattler}/src/about_json.rs (100%) rename py-rattler/{ => pyo3-rattler}/src/channel/mod.rs (100%) rename py-rattler/{ => pyo3-rattler}/src/error.rs (100%) rename py-rattler/{ => pyo3-rattler}/src/generic_virtual_package.rs (100%) rename py-rattler/{ => pyo3-rattler}/src/index.rs (100%) create mode 100644 py-rattler/pyo3-rattler/src/lib.rs rename py-rattler/{ => pyo3-rattler}/src/linker.rs (100%) rename py-rattler/{ => pyo3-rattler}/src/lock/mod.rs (100%) rename py-rattler/{ => pyo3-rattler}/src/match_spec.rs (100%) rename py-rattler/{ => pyo3-rattler}/src/meta.rs (100%) rename py-rattler/{ => pyo3-rattler}/src/nameless_match_spec.rs (100%) rename py-rattler/{ => pyo3-rattler}/src/networking/authenticated_client.rs (100%) rename py-rattler/{ => pyo3-rattler}/src/networking/cached_repo_data.rs (100%) rename py-rattler/{ => pyo3-rattler}/src/networking/mod.rs (100%) rename py-rattler/{ => pyo3-rattler}/src/package_name.rs (100%) rename py-rattler/{ => pyo3-rattler}/src/platform.rs (100%) rename py-rattler/{ => pyo3-rattler}/src/prefix_paths.rs (100%) rename py-rattler/{ => pyo3-rattler}/src/record.rs (100%) rename py-rattler/{ => pyo3-rattler}/src/repo_data/mod.rs (100%) rename py-rattler/{ => pyo3-rattler}/src/repo_data/patch_instructions.rs (100%) rename py-rattler/{ => pyo3-rattler}/src/repo_data/sparse.rs (100%) rename py-rattler/{ => pyo3-rattler}/src/shell.rs (100%) rename py-rattler/{ => pyo3-rattler}/src/solver.rs (100%) rename py-rattler/{ => pyo3-rattler}/src/version/component.rs (100%) rename py-rattler/{ => pyo3-rattler}/src/version/mod.rs (100%) rename py-rattler/{ => pyo3-rattler}/src/virtual_package.rs (100%) diff --git a/py-rattler/Cargo.lock b/py-rattler/Cargo.lock index a89abc604..f38f23303 100644 --- a/py-rattler/Cargo.lock +++ b/py-rattler/Cargo.lock @@ -214,7 +214,7 @@ checksum = "5fd55a5ba1179988837d24ab4c7cc8ed6efdeff578ede0416b4225a5fca35bd0" dependencies = [ "proc-macro2", "quote", - "syn 2.0.50", + "syn 2.0.51", ] [[package]] @@ -249,7 +249,7 @@ checksum = "c980ee35e870bd1a4d2c8294d4c04d0499e67bca1e4b5cefcc693c2fa00caea9" dependencies = [ "proc-macro2", "quote", - "syn 2.0.50", + "syn 2.0.51", ] [[package]] @@ -361,9 +361,9 @@ dependencies = [ [[package]] name = "bumpalo" -version = "3.15.0" +version = "3.15.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d32a994c2b3ca201d9b263612a374263f05e7adde37c4707f693dcd375076d1f" +checksum = "8ea184aa71bb362a1157c896979544cc23974e08fd265f29ea96b59f0b4a555b" [[package]] name = "byteorder" @@ -406,11 +406,10 @@ checksum = "1bf2a5fb3207c12b5d208ebc145f967fea5cac41a021c37417ccc31ba40f39ee" [[package]] name = "cc" -version = "1.0.83" +version = "1.0.88" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1174fb0b6ec23863f8b971027804a42614e347eafb0a95bf0b12cdae21fc4d0" +checksum = "02f341c093d19155a6e41631ce5971aac4e9a868262212153124c15fa22d1cdc" dependencies = [ - "jobserver", "libc", ] @@ -430,7 +429,7 @@ dependencies = [ "iana-time-zone", "num-traits", "serde", - "windows-targets 0.52.0", + "windows-targets 0.52.3", ] [[package]] @@ -503,9 +502,9 @@ dependencies = [ [[package]] name = "darling" -version = "0.20.6" +version = "0.20.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c376d08ea6aa96aafe61237c7200d1241cb177b7d3a542d791f2d118e9cbb955" +checksum = "54e36fcd13ed84ffdfda6f5be89b31287cbb80c439841fe69e04841435464391" dependencies = [ "darling_core", "darling_macro", @@ -513,27 +512,27 @@ dependencies = [ [[package]] name = "darling_core" -version = "0.20.6" +version = "0.20.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "33043dcd19068b8192064c704b3f83eb464f91f1ff527b44a4e2b08d9cdb8855" +checksum = "9c2cf1c23a687a1feeb728783b993c4e1ad83d99f351801977dd809b48d0a70f" dependencies = [ "fnv", "ident_case", "proc-macro2", "quote", "strsim", - "syn 2.0.50", + "syn 2.0.51", ] [[package]] name = "darling_macro" -version = "0.20.6" +version = "0.20.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c5a91391accf613803c2a9bf9abccdbaa07c54b4244a5b64883f9c3c137c86be" +checksum = "a668eda54683121533a393014d8692171709ff57a7d61f187b6e782719f8933f" dependencies = [ "darling_core", "quote", - "syn 2.0.50", + "syn 2.0.51", ] [[package]] @@ -628,7 +627,7 @@ dependencies = [ "once_cell", "proc-macro2", "quote", - "syn 2.0.50", + "syn 2.0.51", ] [[package]] @@ -649,7 +648,7 @@ checksum = "5c785274071b1b420972453b306eeca06acf4633829db4223b58a2a8c5953bc4" dependencies = [ "proc-macro2", "quote", - "syn 2.0.50", + "syn 2.0.51", ] [[package]] @@ -909,7 +908,7 @@ checksum = "87750cf4b7a4c0625b1529e4c543c2182106e4dedc60a2a6455e00d212c489ac" dependencies = [ "proc-macro2", "quote", - "syn 2.0.50", + "syn 2.0.51", ] [[package]] @@ -1025,9 +1024,9 @@ checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" [[package]] name = "hermit-abi" -version = "0.3.6" +version = "0.3.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd5256b483761cd23699d0da46cc6fd2ee3be420bbe6d020ae4a091e70b7e9fd" +checksum = "379dada1584ad501b383485dd706b8afb7a70fcbc7f4da7d780638a5a6124a60" [[package]] name = "hex" @@ -1122,7 +1121,7 @@ dependencies = [ "httpdate", "itoa", "pin-project-lite", - "socket2 0.5.5", + "socket2 0.5.6", "tokio", "tower-service", "tracing", @@ -1270,15 +1269,6 @@ version = "1.0.10" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b1a46d1a171d865aa5f83f92695765caa047a9b4cbae2cbf37dbd613a793fd4c" -[[package]] -name = "jobserver" -version = "0.1.28" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab46a6e9526ddef3ae7f787c06f0f2600639ba80ea3eade3d8e670a2230f51d6" -dependencies = [ - "libc", -] - [[package]] name = "js-sys" version = "0.3.68" @@ -1334,7 +1324,7 @@ dependencies = [ "proc-macro2", "quote", "regex", - "syn 2.0.50", + "syn 2.0.51", ] [[package]] @@ -1689,7 +1679,7 @@ checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.50", + "syn 2.0.51", ] [[package]] @@ -1709,9 +1699,9 @@ dependencies = [ [[package]] name = "openssl-sys" -version = "0.9.100" +version = "0.9.101" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae94056a791d0e1217d18b6cbdccb02c61e3054fc69893607f4067e3bb0b1fd1" +checksum = "dda2b0f344e78efc2facf7d195d098df0dd72151b26ab98da807afc26c198dff" dependencies = [ "cc", "libc", @@ -1758,7 +1748,7 @@ dependencies = [ "proc-macro2", "proc-macro2-diagnostics", "quote", - "syn 2.0.50", + "syn 2.0.51", ] [[package]] @@ -1864,7 +1854,7 @@ dependencies = [ "phf_shared", "proc-macro2", "quote", - "syn 2.0.50", + "syn 2.0.51", "unicase", ] @@ -1990,7 +1980,7 @@ checksum = "af066a9c399a26e020ada66a034357a868728e72cd426f3adcd35f80d88d88c8" dependencies = [ "proc-macro2", "quote", - "syn 2.0.50", + "syn 2.0.51", "version_check", "yansi", ] @@ -2014,28 +2004,9 @@ dependencies = [ name = "py-rattler" version = "0.3.0" dependencies = [ - "anyhow", - "futures", - "openssl", - "pep508_rs", "pyo3", - "pyo3-asyncio", - "pyo3-build-config 0.20.2", - "rattler", - "rattler_conda_types", - "rattler_digest", - "rattler_index", - "rattler_lock", - "rattler_networking", - "rattler_repodata_gateway", - "rattler_shell", - "rattler_solve", - "rattler_virtual_packages", - "reqwest", - "reqwest-middleware", - "thiserror", - "tokio", - "url", + "pyo3-build-config 0.20.3", + "pyo3-rattler", ] [[package]] @@ -2081,9 +2052,9 @@ dependencies = [ [[package]] name = "pyo3-build-config" -version = "0.20.2" +version = "0.20.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "07426f0d8fe5a601f26293f300afd1a7b1ed5e78b2a705870c5f30893c5163be" +checksum = "deaa5745de3f5231ce10517a1f5dd97d53e5a2fd77aa6b5842292085831d48d7" dependencies = [ "once_cell", "target-lexicon", @@ -2122,6 +2093,33 @@ dependencies = [ "syn 1.0.109", ] +[[package]] +name = "pyo3-rattler" +version = "0.3.0" +dependencies = [ + "anyhow", + "futures", + "openssl", + "pep508_rs", + "pyo3", + "pyo3-asyncio", + "rattler", + "rattler_conda_types", + "rattler_digest", + "rattler_index", + "rattler_lock", + "rattler_networking", + "rattler_repodata_gateway", + "rattler_shell", + "rattler_solve", + "rattler_virtual_packages", + "reqwest", + "reqwest-middleware", + "thiserror", + "tokio", + "url", +] + [[package]] name = "quick-xml" version = "0.31.0" @@ -2302,7 +2300,7 @@ name = "rattler_macros" version = "0.19.0" dependencies = [ "quote", - "syn 2.0.50", + "syn 2.0.51", ] [[package]] @@ -2793,7 +2791,7 @@ checksum = "7eb0b34b42edc17f6b7cac84a52a1c5f0e1bb2227e997ca9011ea3dd34e8610b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.50", + "syn 2.0.51", ] [[package]] @@ -2816,7 +2814,7 @@ checksum = "0b2e6b945e9d3df726b65d6ee24060aff8e3533d431f677a9695db04eff9dfdb" dependencies = [ "proc-macro2", "quote", - "syn 2.0.50", + "syn 2.0.51", ] [[package]] @@ -2858,7 +2856,7 @@ dependencies = [ "darling", "proc-macro2", "quote", - "syn 2.0.50", + "syn 2.0.51", ] [[package]] @@ -2958,12 +2956,12 @@ dependencies = [ [[package]] name = "socket2" -version = "0.5.5" +version = "0.5.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b5fac59a5cb5dd637972e5fca70daf0523c9067fcdc4842f053dae04a18f8e9" +checksum = "05ffd9c0a93b7543e062e759284fcf5f5e3b098501104bfbdde4d404db792871" dependencies = [ "libc", - "windows-sys 0.48.0", + "windows-sys 0.52.0", ] [[package]] @@ -3009,7 +3007,7 @@ dependencies = [ "proc-macro2", "quote", "rustversion", - "syn 2.0.50", + "syn 2.0.51", ] [[package]] @@ -3037,9 +3035,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.50" +version = "2.0.51" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "74f1bdc9872430ce9b75da68329d1c1746faf50ffac5f19e02b71e37ff881ffb" +checksum = "6ab617d94515e94ae53b8406c628598680aa0c9587474ecbe58188f7b345d66c" dependencies = [ "proc-macro2", "quote", @@ -3092,9 +3090,9 @@ dependencies = [ [[package]] name = "target-lexicon" -version = "0.12.13" +version = "0.12.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "69758bda2e78f098e4ccb393021a0963bb3442eac05f135c30f61b7370bbafae" +checksum = "e1fc403891a21bcfb7c37834ba66a547a8f402146eba7265b5a6d88059c9ff2f" [[package]] name = "task-local-extensions" @@ -3107,9 +3105,9 @@ dependencies = [ [[package]] name = "tempfile" -version = "3.10.0" +version = "3.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a365e8cd18e44762ef95d87f284f4b5cd04107fec2ff3052bd6a3e6069669e67" +checksum = "85b77fafb263dd9d05cbeac119526425676db3784113aa9295c88498cbf8bff1" dependencies = [ "cfg-if", "fastrand 2.0.1", @@ -3134,7 +3132,7 @@ checksum = "a953cb265bef375dae3de6663da4d3804eee9682ea80d8e2542529b73c531c81" dependencies = [ "proc-macro2", "quote", - "syn 2.0.50", + "syn 2.0.51", ] [[package]] @@ -3195,7 +3193,7 @@ dependencies = [ "mio", "num_cpus", "pin-project-lite", - "socket2 0.5.5", + "socket2 0.5.6", "tokio-macros", "windows-sys 0.48.0", ] @@ -3208,7 +3206,7 @@ checksum = "5b8a1e28f2deaa14e508979454cb3a223b10b938b45af148bc0986de36f1923b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.50", + "syn 2.0.51", ] [[package]] @@ -3300,7 +3298,7 @@ checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.50", + "syn 2.0.51", ] [[package]] @@ -3367,9 +3365,9 @@ checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" [[package]] name = "unicode-normalization" -version = "0.1.22" +version = "0.1.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c5713f0fc4b5db668a2ac63cdb7bb4469d8c9fed047b1d0292cc7b0ce2ba921" +checksum = "a56d1686db2308d901306f92a263857ef59ea39678a5458e7cb17f01415101f5" dependencies = [ "tinyvec", ] @@ -3484,7 +3482,7 @@ dependencies = [ "once_cell", "proc-macro2", "quote", - "syn 2.0.50", + "syn 2.0.51", "wasm-bindgen-shared", ] @@ -3518,7 +3516,7 @@ checksum = "642f325be6301eb8107a83d12a8ac6c1e1c54345a7ef1a9261962dfefda09e66" dependencies = [ "proc-macro2", "quote", - "syn 2.0.50", + "syn 2.0.51", "wasm-bindgen-backend", "wasm-bindgen-shared", ] @@ -3596,7 +3594,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e48a53791691ab099e5e2ad123536d0fff50652600abaf43bbf952894110d0be" dependencies = [ "windows-core", - "windows-targets 0.52.0", + "windows-targets 0.52.3", ] [[package]] @@ -3605,7 +3603,7 @@ version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "33ab640c8d7e35bf8ba19b884ba838ceb4fba93a4e8c65a9059d08afcfc683d9" dependencies = [ - "windows-targets 0.52.0", + "windows-targets 0.52.3", ] [[package]] @@ -3623,7 +3621,7 @@ version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" dependencies = [ - "windows-targets 0.52.0", + "windows-targets 0.52.3", ] [[package]] @@ -3643,17 +3641,17 @@ dependencies = [ [[package]] name = "windows-targets" -version = "0.52.0" +version = "0.52.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a18201040b24831fbb9e4eb208f8892e1f50a37feb53cc7ff887feb8f50e7cd" +checksum = "d380ba1dc7187569a8a9e91ed34b8ccfc33123bbacb8c0aed2d1ad7f3ef2dc5f" dependencies = [ - "windows_aarch64_gnullvm 0.52.0", - "windows_aarch64_msvc 0.52.0", - "windows_i686_gnu 0.52.0", - "windows_i686_msvc 0.52.0", - "windows_x86_64_gnu 0.52.0", - "windows_x86_64_gnullvm 0.52.0", - "windows_x86_64_msvc 0.52.0", + "windows_aarch64_gnullvm 0.52.3", + "windows_aarch64_msvc 0.52.3", + "windows_i686_gnu 0.52.3", + "windows_i686_msvc 0.52.3", + "windows_x86_64_gnu 0.52.3", + "windows_x86_64_gnullvm 0.52.3", + "windows_x86_64_msvc 0.52.3", ] [[package]] @@ -3664,9 +3662,9 @@ checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" [[package]] name = "windows_aarch64_gnullvm" -version = "0.52.0" +version = "0.52.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cb7764e35d4db8a7921e09562a0304bf2f93e0a51bfccee0bd0bb0b666b015ea" +checksum = "68e5dcfb9413f53afd9c8f86e56a7b4d86d9a2fa26090ea2dc9e40fba56c6ec6" [[package]] name = "windows_aarch64_msvc" @@ -3676,9 +3674,9 @@ checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" [[package]] name = "windows_aarch64_msvc" -version = "0.52.0" +version = "0.52.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bbaa0368d4f1d2aaefc55b6fcfee13f41544ddf36801e793edbbfd7d7df075ef" +checksum = "8dab469ebbc45798319e69eebf92308e541ce46760b49b18c6b3fe5e8965b30f" [[package]] name = "windows_i686_gnu" @@ -3688,9 +3686,9 @@ checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" [[package]] name = "windows_i686_gnu" -version = "0.52.0" +version = "0.52.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a28637cb1fa3560a16915793afb20081aba2c92ee8af57b4d5f28e4b3e7df313" +checksum = "2a4e9b6a7cac734a8b4138a4e1044eac3404d8326b6c0f939276560687a033fb" [[package]] name = "windows_i686_msvc" @@ -3700,9 +3698,9 @@ checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" [[package]] name = "windows_i686_msvc" -version = "0.52.0" +version = "0.52.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ffe5e8e31046ce6230cc7215707b816e339ff4d4d67c65dffa206fd0f7aa7b9a" +checksum = "28b0ec9c422ca95ff34a78755cfa6ad4a51371da2a5ace67500cf7ca5f232c58" [[package]] name = "windows_x86_64_gnu" @@ -3712,9 +3710,9 @@ checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" [[package]] name = "windows_x86_64_gnu" -version = "0.52.0" +version = "0.52.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d6fa32db2bc4a2f5abeacf2b69f7992cd09dca97498da74a151a3132c26befd" +checksum = "704131571ba93e89d7cd43482277d6632589b18ecf4468f591fbae0a8b101614" [[package]] name = "windows_x86_64_gnullvm" @@ -3724,9 +3722,9 @@ checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" [[package]] name = "windows_x86_64_gnullvm" -version = "0.52.0" +version = "0.52.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a657e1e9d3f514745a572a6846d3c7aa7dbe1658c056ed9c3344c4109a6949e" +checksum = "42079295511643151e98d61c38c0acc444e52dd42ab456f7ccfd5152e8ecf21c" [[package]] name = "windows_x86_64_msvc" @@ -3736,9 +3734,9 @@ checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" [[package]] name = "windows_x86_64_msvc" -version = "0.52.0" +version = "0.52.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dff9641d1cd4be8d1a070daf9e3773c5f67e78b4d9d42263020c057706765c04" +checksum = "0770833d60a970638e989b3fa9fd2bb1aaadcf88963d1659fd7d9990196ed2d6" [[package]] name = "winnow" @@ -3797,9 +3795,9 @@ checksum = "1367295b8f788d371ce2dbc842c7b709c73ee1364d30351dd300ec2203b12377" [[package]] name = "zbus" -version = "3.15.0" +version = "3.15.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c45d06ae3b0f9ba1fb2671268b975557d8f5a84bb5ec6e43964f87e763d8bca8" +checksum = "675d170b632a6ad49804c8cf2105d7c31eddd3312555cffd4b740e08e97c25e6" dependencies = [ "async-broadcast", "async-executor", @@ -3838,9 +3836,9 @@ dependencies = [ [[package]] name = "zbus_macros" -version = "3.15.0" +version = "3.15.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b4a1ba45ed0ad344b85a2bb5a1fe9830aed23d67812ea39a586e7d0136439c7d" +checksum = "7131497b0f887e8061b430c530240063d33bf9455fa34438f388a245da69e0a5" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -3904,9 +3902,9 @@ dependencies = [ [[package]] name = "zvariant" -version = "3.15.0" +version = "3.15.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "44b291bee0d960c53170780af148dca5fa260a63cdd24f1962fa82e03e53338c" +checksum = "4eef2be88ba09b358d3b58aca6e41cd853631d44787f319a1383ca83424fb2db" dependencies = [ "byteorder", "enumflags2", @@ -3918,9 +3916,9 @@ dependencies = [ [[package]] name = "zvariant_derive" -version = "3.15.0" +version = "3.15.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "934d7a7dfc310d6ee06c87ffe88ef4eca7d3e37bb251dece2ef93da8f17d8ecd" +checksum = "37c24dc0bed72f5f90d1f8bb5b07228cbf63b3c6e9f82d82559d4bae666e7ed9" dependencies = [ "proc-macro-crate", "proc-macro2", diff --git a/py-rattler/Cargo.toml b/py-rattler/Cargo.toml index 9513564ec..54e8ef0bf 100644 --- a/py-rattler/Cargo.toml +++ b/py-rattler/Cargo.toml @@ -1,61 +1,29 @@ -[package] -name = "py-rattler" +[workspace] +members = ["pyo3-rattler"] + +[workspace.package] version = "0.3.0" edition = "2021" license = "BSD-3-Clause" publish = false +[package] +name = "py-rattler" +version.workspace = true +edition.workspace = true + [lib] name = "rattler" +path = "src/lib.rs" crate-type = ["cdylib"] -[features] -default = ["native-tls"] -native-tls = ["rattler_networking/native-tls", "rattler_repodata_gateway/native-tls"] -rustls-tls = ["rattler_networking/rustls-tls", "rattler_repodata_gateway/rustls-tls"] -vendored-openssl = ["openssl", "openssl/vendored"] - [dependencies] -anyhow = "1.0.75" -futures = "0.3.28" - -rattler = { path = "../crates/rattler", default-features = false } -rattler_repodata_gateway = { path = "../crates/rattler_repodata_gateway", default-features = false, features = [ - "sparse", -] } -rattler_conda_types = { path = "../crates/rattler_conda_types", default-features = false } -rattler_digest = { path = "../crates/rattler_digest" } -rattler_networking = { path = "../crates/rattler_networking", default-features = false } -rattler_shell = { path = "../crates/rattler_shell", default-features = false } -rattler_virtual_packages = { path = "../crates/rattler_virtual_packages", default-features = false } -rattler_solve = { path = "../crates/rattler_solve", default-features = false, features = [ - "resolvo", -] } -rattler_index = { path = "../crates/rattler_index" } -rattler_lock = { path = "../crates/rattler_lock", default-features = false } - +pyo3-rattler = { path = "./pyo3-rattler" } pyo3 = { version = "0.19", features = [ "abi3-py38", "extension-module", "multiple-pymethods", ] } -pyo3-asyncio = { version = "0.19", features = ["tokio-runtime"] } -tokio = { version = "1.32" } - -reqwest = { version = "0.11.22", default-features = false } -reqwest-middleware = "0.2.4" - -thiserror = "1.0.44" -url = "2.4.1" - -openssl = { version = "0.10", optional = true } -pep508_rs = "0.3.0" [build-dependencies] pyo3-build-config = "0.20" - - -[patch.crates-io] - -# Prevent package from thinking it's in the workspace -[workspace] diff --git a/py-rattler/pixi.toml b/py-rattler/pixi.toml index 0d1895549..1de5901a6 100644 --- a/py-rattler/pixi.toml +++ b/py-rattler/pixi.toml @@ -12,7 +12,7 @@ license = "BSD-3-Clause" [tasks] build = "PIP_REQUIRE_VIRTUALENV=false maturin develop" -build-release = "PIP_REQUIRE_VIRTUALENV=false maturin develop --release" +build-release = "PIP_REQUIRE_VIRTUALENV=false maturin develop --release -m ./py-rattler/Cargo.toml" test = { cmd = "pytest --doctest-modules", depends_on = ["build"] } fmt-python = "black ." fmt-rust = "cargo fmt --all" diff --git a/py-rattler/pyo3-rattler/Cargo.toml b/py-rattler/pyo3-rattler/Cargo.toml new file mode 100644 index 000000000..e84a16a5a --- /dev/null +++ b/py-rattler/pyo3-rattler/Cargo.toml @@ -0,0 +1,57 @@ +[package] +name = "pyo3-rattler" +version.workspace = true +edition.workspace = true + +# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html +[lib] +name = "pyo3_rattler" +path = "src/lib.rs" + +[features] +default = ["native-tls"] +native-tls = [ + "rattler_networking/native-tls", + "rattler_repodata_gateway/native-tls", +] +rustls-tls = [ + "rattler_networking/rustls-tls", + "rattler_repodata_gateway/rustls-tls", +] +vendored-openssl = ["openssl", "openssl/vendored"] + +[dependencies] +anyhow = "1.0.75" +futures = "0.3.28" + +rattler = { path = "../../crates/rattler", default-features = false } +rattler_repodata_gateway = { path = "../../crates/rattler_repodata_gateway", default-features = false, features = [ + "sparse", +] } +rattler_conda_types = { path = "../../crates/rattler_conda_types", default-features = false } +rattler_digest = { path = "../../crates/rattler_digest" } +rattler_networking = { path = "../../crates/rattler_networking", default-features = false } +rattler_shell = { path = "../../crates/rattler_shell", default-features = false } +rattler_virtual_packages = { path = "../../crates/rattler_virtual_packages", default-features = false } +rattler_solve = { path = "../../crates/rattler_solve", default-features = false, features = [ + "resolvo", +] } +rattler_index = { path = "../../crates/rattler_index" } +rattler_lock = { path = "../../crates/rattler_lock", default-features = false } + +pyo3 = { version = "0.19", features = [ + "abi3-py38", + "extension-module", + "multiple-pymethods", +] } +pyo3-asyncio = { version = "0.19", features = ["tokio-runtime"] } +tokio = { version = "1.32" } + +reqwest = { version = "0.11.22", default-features = false } +reqwest-middleware = "0.2.4" + +thiserror = "1.0.44" +url = "2.4.1" + +openssl = { version = "0.10", optional = true } +pep508_rs = "0.3.0" diff --git a/py-rattler/src/about_json.rs b/py-rattler/pyo3-rattler/src/about_json.rs similarity index 100% rename from py-rattler/src/about_json.rs rename to py-rattler/pyo3-rattler/src/about_json.rs diff --git a/py-rattler/src/channel/mod.rs b/py-rattler/pyo3-rattler/src/channel/mod.rs similarity index 100% rename from py-rattler/src/channel/mod.rs rename to py-rattler/pyo3-rattler/src/channel/mod.rs diff --git a/py-rattler/src/error.rs b/py-rattler/pyo3-rattler/src/error.rs similarity index 100% rename from py-rattler/src/error.rs rename to py-rattler/pyo3-rattler/src/error.rs diff --git a/py-rattler/src/generic_virtual_package.rs b/py-rattler/pyo3-rattler/src/generic_virtual_package.rs similarity index 100% rename from py-rattler/src/generic_virtual_package.rs rename to py-rattler/pyo3-rattler/src/generic_virtual_package.rs diff --git a/py-rattler/src/index.rs b/py-rattler/pyo3-rattler/src/index.rs similarity index 100% rename from py-rattler/src/index.rs rename to py-rattler/pyo3-rattler/src/index.rs diff --git a/py-rattler/pyo3-rattler/src/lib.rs b/py-rattler/pyo3-rattler/src/lib.rs new file mode 100644 index 000000000..2507e2a05 --- /dev/null +++ b/py-rattler/pyo3-rattler/src/lib.rs @@ -0,0 +1,58 @@ +mod about_json; +mod channel; +mod error; +mod generic_virtual_package; +mod index; +mod linker; +mod lock; +mod match_spec; +mod meta; +mod nameless_match_spec; +mod networking; +mod package_name; +mod platform; +mod prefix_paths; +mod record; +mod repo_data; +mod shell; +mod solver; +mod version; +mod virtual_package; + +pub use about_json::PyAboutJson; +pub use channel::{PyChannel, PyChannelConfig}; +pub use error::{ + ActivationException, CacheDirException, ConvertSubdirException, DetectVirtualPackageException, + EnvironmentCreationException, FetchRepoDataException, InvalidChannelException, + InvalidMatchSpecException, InvalidPackageNameException, InvalidUrlException, + InvalidVersionException, IoException, LinkException, ParseArchException, + ParsePlatformException, PyRattlerError, SolverException, TransactionException, + VersionBumpException, +}; +pub use generic_virtual_package::PyGenericVirtualPackage; +pub use lock::{ + PyEnvironment, PyLockChannel, PyLockFile, PyLockedPackage, PyPackageHashes, PyPypiPackageData, + PyPypiPackageEnvironmentData, +}; +pub use match_spec::PyMatchSpec; +pub use nameless_match_spec::PyNamelessMatchSpec; +pub use networking::{authenticated_client::PyAuthenticatedClient, py_fetch_repo_data}; +pub use package_name::PyPackageName; +pub use prefix_paths::PyPrefixPaths; +pub use repo_data::{patch_instructions::PyPatchInstructions, sparse::PySparseRepoData, PyRepoData}; +pub use version::PyVersion; + +pub use pyo3::prelude::*; + +pub use index::py_index; +pub use linker::py_link; +pub use meta::get_rattler_version; +pub use platform::{PyArch, PyPlatform}; +pub use record::PyRecord; +pub use shell::{PyActivationResult, PyActivationVariables, PyActivator, PyShellEnum}; +pub use solver::py_solve; +pub use virtual_package::PyVirtualPackage; + +pub fn pyo3_rattler_dummy() -> &'static str { + "lol" +} \ No newline at end of file diff --git a/py-rattler/src/linker.rs b/py-rattler/pyo3-rattler/src/linker.rs similarity index 100% rename from py-rattler/src/linker.rs rename to py-rattler/pyo3-rattler/src/linker.rs diff --git a/py-rattler/src/lock/mod.rs b/py-rattler/pyo3-rattler/src/lock/mod.rs similarity index 100% rename from py-rattler/src/lock/mod.rs rename to py-rattler/pyo3-rattler/src/lock/mod.rs diff --git a/py-rattler/src/match_spec.rs b/py-rattler/pyo3-rattler/src/match_spec.rs similarity index 100% rename from py-rattler/src/match_spec.rs rename to py-rattler/pyo3-rattler/src/match_spec.rs diff --git a/py-rattler/src/meta.rs b/py-rattler/pyo3-rattler/src/meta.rs similarity index 100% rename from py-rattler/src/meta.rs rename to py-rattler/pyo3-rattler/src/meta.rs diff --git a/py-rattler/src/nameless_match_spec.rs b/py-rattler/pyo3-rattler/src/nameless_match_spec.rs similarity index 100% rename from py-rattler/src/nameless_match_spec.rs rename to py-rattler/pyo3-rattler/src/nameless_match_spec.rs diff --git a/py-rattler/src/networking/authenticated_client.rs b/py-rattler/pyo3-rattler/src/networking/authenticated_client.rs similarity index 100% rename from py-rattler/src/networking/authenticated_client.rs rename to py-rattler/pyo3-rattler/src/networking/authenticated_client.rs diff --git a/py-rattler/src/networking/cached_repo_data.rs b/py-rattler/pyo3-rattler/src/networking/cached_repo_data.rs similarity index 100% rename from py-rattler/src/networking/cached_repo_data.rs rename to py-rattler/pyo3-rattler/src/networking/cached_repo_data.rs diff --git a/py-rattler/src/networking/mod.rs b/py-rattler/pyo3-rattler/src/networking/mod.rs similarity index 100% rename from py-rattler/src/networking/mod.rs rename to py-rattler/pyo3-rattler/src/networking/mod.rs diff --git a/py-rattler/src/package_name.rs b/py-rattler/pyo3-rattler/src/package_name.rs similarity index 100% rename from py-rattler/src/package_name.rs rename to py-rattler/pyo3-rattler/src/package_name.rs diff --git a/py-rattler/src/platform.rs b/py-rattler/pyo3-rattler/src/platform.rs similarity index 100% rename from py-rattler/src/platform.rs rename to py-rattler/pyo3-rattler/src/platform.rs diff --git a/py-rattler/src/prefix_paths.rs b/py-rattler/pyo3-rattler/src/prefix_paths.rs similarity index 100% rename from py-rattler/src/prefix_paths.rs rename to py-rattler/pyo3-rattler/src/prefix_paths.rs diff --git a/py-rattler/src/record.rs b/py-rattler/pyo3-rattler/src/record.rs similarity index 100% rename from py-rattler/src/record.rs rename to py-rattler/pyo3-rattler/src/record.rs diff --git a/py-rattler/src/repo_data/mod.rs b/py-rattler/pyo3-rattler/src/repo_data/mod.rs similarity index 100% rename from py-rattler/src/repo_data/mod.rs rename to py-rattler/pyo3-rattler/src/repo_data/mod.rs diff --git a/py-rattler/src/repo_data/patch_instructions.rs b/py-rattler/pyo3-rattler/src/repo_data/patch_instructions.rs similarity index 100% rename from py-rattler/src/repo_data/patch_instructions.rs rename to py-rattler/pyo3-rattler/src/repo_data/patch_instructions.rs diff --git a/py-rattler/src/repo_data/sparse.rs b/py-rattler/pyo3-rattler/src/repo_data/sparse.rs similarity index 100% rename from py-rattler/src/repo_data/sparse.rs rename to py-rattler/pyo3-rattler/src/repo_data/sparse.rs diff --git a/py-rattler/src/shell.rs b/py-rattler/pyo3-rattler/src/shell.rs similarity index 100% rename from py-rattler/src/shell.rs rename to py-rattler/pyo3-rattler/src/shell.rs diff --git a/py-rattler/src/solver.rs b/py-rattler/pyo3-rattler/src/solver.rs similarity index 100% rename from py-rattler/src/solver.rs rename to py-rattler/pyo3-rattler/src/solver.rs diff --git a/py-rattler/src/version/component.rs b/py-rattler/pyo3-rattler/src/version/component.rs similarity index 100% rename from py-rattler/src/version/component.rs rename to py-rattler/pyo3-rattler/src/version/component.rs diff --git a/py-rattler/src/version/mod.rs b/py-rattler/pyo3-rattler/src/version/mod.rs similarity index 100% rename from py-rattler/src/version/mod.rs rename to py-rattler/pyo3-rattler/src/version/mod.rs diff --git a/py-rattler/src/virtual_package.rs b/py-rattler/pyo3-rattler/src/virtual_package.rs similarity index 100% rename from py-rattler/src/virtual_package.rs rename to py-rattler/pyo3-rattler/src/virtual_package.rs diff --git a/py-rattler/src/lib.rs b/py-rattler/src/lib.rs index 9fec90821..91243bf56 100644 --- a/py-rattler/src/lib.rs +++ b/py-rattler/src/lib.rs @@ -1,57 +1,4 @@ -mod about_json; -mod channel; -mod error; -mod generic_virtual_package; -mod index; -mod linker; -mod lock; -mod match_spec; -mod meta; -mod nameless_match_spec; -mod networking; -mod package_name; -mod platform; -mod prefix_paths; -mod record; -mod repo_data; -mod shell; -mod solver; -mod version; -mod virtual_package; - -use about_json::PyAboutJson; -use channel::{PyChannel, PyChannelConfig}; -use error::{ - ActivationException, CacheDirException, ConvertSubdirException, DetectVirtualPackageException, - EnvironmentCreationException, FetchRepoDataException, InvalidChannelException, - InvalidMatchSpecException, InvalidPackageNameException, InvalidUrlException, - InvalidVersionException, IoException, LinkException, ParseArchException, - ParsePlatformException, PyRattlerError, SolverException, TransactionException, - VersionBumpException, -}; -use generic_virtual_package::PyGenericVirtualPackage; -use lock::{ - PyEnvironment, PyLockChannel, PyLockFile, PyLockedPackage, PyPackageHashes, PyPypiPackageData, - PyPypiPackageEnvironmentData, -}; -use match_spec::PyMatchSpec; -use nameless_match_spec::PyNamelessMatchSpec; -use networking::{authenticated_client::PyAuthenticatedClient, py_fetch_repo_data}; -use package_name::PyPackageName; -use prefix_paths::PyPrefixPaths; -use repo_data::{patch_instructions::PyPatchInstructions, sparse::PySparseRepoData, PyRepoData}; -use version::PyVersion; - -use pyo3::prelude::*; - -use index::py_index; -use linker::py_link; -use meta::get_rattler_version; -use platform::{PyArch, PyPlatform}; -use record::PyRecord; -use shell::{PyActivationResult, PyActivationVariables, PyActivator, PyShellEnum}; -use solver::py_solve; -use virtual_package::PyVirtualPackage; +use pyo3_rattler::*; #[pymodule] fn rattler(py: Python<'_>, m: &PyModule) -> PyResult<()> { @@ -171,4 +118,4 @@ fn rattler(py: Python<'_>, m: &PyModule) -> PyResult<()> { .unwrap(); Ok(()) -} +} \ No newline at end of file From 85a254f124bb3ae070814f1b614b1d5ef9f272f6 Mon Sep 17 00:00:00 2001 From: Wackyator Date: Tue, 27 Feb 2024 19:00:49 +0530 Subject: [PATCH 02/10] fix: lints --- py-rattler/pyo3-rattler/src/about_json.rs | 1 + py-rattler/pyo3-rattler/src/lib.rs | 8 +++----- py-rattler/src/lib.rs | 18 ++++++++++++++++-- 3 files changed, 20 insertions(+), 7 deletions(-) diff --git a/py-rattler/pyo3-rattler/src/about_json.rs b/py-rattler/pyo3-rattler/src/about_json.rs index 54709ba1c..c16486c97 100644 --- a/py-rattler/pyo3-rattler/src/about_json.rs +++ b/py-rattler/pyo3-rattler/src/about_json.rs @@ -58,6 +58,7 @@ impl PyAboutJson { /// For example, if the file is in JSON format, this function parses the JSON string and returns /// the resulting object. If the file is not in a parsable format, this function returns an /// error. + #[allow(clippy::should_implement_trait)] #[staticmethod] pub fn from_str(str: &str) -> PyResult { Ok(AboutJson::from_str(str) diff --git a/py-rattler/pyo3-rattler/src/lib.rs b/py-rattler/pyo3-rattler/src/lib.rs index 2507e2a05..b36bfc28a 100644 --- a/py-rattler/pyo3-rattler/src/lib.rs +++ b/py-rattler/pyo3-rattler/src/lib.rs @@ -39,7 +39,9 @@ pub use nameless_match_spec::PyNamelessMatchSpec; pub use networking::{authenticated_client::PyAuthenticatedClient, py_fetch_repo_data}; pub use package_name::PyPackageName; pub use prefix_paths::PyPrefixPaths; -pub use repo_data::{patch_instructions::PyPatchInstructions, sparse::PySparseRepoData, PyRepoData}; +pub use repo_data::{ + patch_instructions::PyPatchInstructions, sparse::PySparseRepoData, PyRepoData, +}; pub use version::PyVersion; pub use pyo3::prelude::*; @@ -52,7 +54,3 @@ pub use record::PyRecord; pub use shell::{PyActivationResult, PyActivationVariables, PyActivator, PyShellEnum}; pub use solver::py_solve; pub use virtual_package::PyVirtualPackage; - -pub fn pyo3_rattler_dummy() -> &'static str { - "lol" -} \ No newline at end of file diff --git a/py-rattler/src/lib.rs b/py-rattler/src/lib.rs index 91243bf56..25c9e18b0 100644 --- a/py-rattler/src/lib.rs +++ b/py-rattler/src/lib.rs @@ -1,4 +1,18 @@ -use pyo3_rattler::*; +use pyo3::prelude::*; +use pyo3_rattler::{ + get_rattler_version, py_fetch_repo_data, py_index, py_link, py_solve, ActivationException, + CacheDirException, ConvertSubdirException, DetectVirtualPackageException, + EnvironmentCreationException, FetchRepoDataException, InvalidChannelException, + InvalidMatchSpecException, InvalidPackageNameException, InvalidUrlException, + InvalidVersionException, IoException, LinkException, ParseArchException, + ParsePlatformException, PyAboutJson, PyActivationResult, PyActivationVariables, PyActivator, + PyArch, PyAuthenticatedClient, PyChannel, PyChannelConfig, PyEnvironment, + PyGenericVirtualPackage, PyLockChannel, PyLockFile, PyLockedPackage, PyMatchSpec, PyModule, + PyNamelessMatchSpec, PyPackageHashes, PyPackageName, PyPatchInstructions, PyPlatform, + PyPrefixPaths, PyPypiPackageData, PyPypiPackageEnvironmentData, PyRecord, PyRepoData, + PyShellEnum, PySparseRepoData, PyVersion, PyVirtualPackage, SolverException, + TransactionException, VersionBumpException, +}; #[pymodule] fn rattler(py: Python<'_>, m: &PyModule) -> PyResult<()> { @@ -118,4 +132,4 @@ fn rattler(py: Python<'_>, m: &PyModule) -> PyResult<()> { .unwrap(); Ok(()) -} \ No newline at end of file +} From 9720a1f17e961d642da4585aa58e1531539ce7f0 Mon Sep 17 00:00:00 2001 From: Wackyator Date: Fri, 1 Mar 2024 15:37:16 +0530 Subject: [PATCH 03/10] fix: move pyo3-rattler to rattler workspace --- Cargo.toml | 32 +++++- crates/pyo3-rattler/Cargo.toml | 52 +++++++++ .../pyo3-rattler/src/about_json.rs | 0 .../pyo3-rattler/src/channel/mod.rs | 0 .../pyo3-rattler/src/error.rs | 0 .../src/generic_virtual_package.rs | 0 .../pyo3-rattler/src/index.rs | 0 .../pyo3-rattler/src/lib.rs | 0 .../pyo3-rattler/src/linker.rs | 0 .../pyo3-rattler/src/lock/mod.rs | 0 .../pyo3-rattler/src/match_spec.rs | 0 .../pyo3-rattler/src/meta.rs | 0 .../pyo3-rattler/src/nameless_match_spec.rs | 0 .../src/networking/authenticated_client.rs | 0 .../src/networking/cached_repo_data.rs | 0 .../pyo3-rattler/src/networking/mod.rs | 0 .../pyo3-rattler/src/package_name.rs | 0 .../pyo3-rattler/src/platform.rs | 0 .../pyo3-rattler/src/prefix_paths.rs | 0 .../pyo3-rattler/src/record.rs | 0 .../pyo3-rattler/src/repo_data/mod.rs | 0 .../src/repo_data/patch_instructions.rs | 0 .../pyo3-rattler/src/repo_data/sparse.rs | 0 .../pyo3-rattler/src/shell.rs | 0 .../pyo3-rattler/src/solver.rs | 0 .../pyo3-rattler/src/version/component.rs | 0 .../pyo3-rattler/src/version/mod.rs | 0 .../pyo3-rattler/src/virtual_package.rs | 0 pixi.toml | 2 +- py-rattler/Cargo.lock | 104 ------------------ py-rattler/Cargo.toml | 7 +- py-rattler/pixi.toml | 2 +- py-rattler/pyo3-rattler/Cargo.toml | 57 ---------- 33 files changed, 85 insertions(+), 171 deletions(-) create mode 100644 crates/pyo3-rattler/Cargo.toml rename {py-rattler => crates}/pyo3-rattler/src/about_json.rs (100%) rename {py-rattler => crates}/pyo3-rattler/src/channel/mod.rs (100%) rename {py-rattler => crates}/pyo3-rattler/src/error.rs (100%) rename {py-rattler => crates}/pyo3-rattler/src/generic_virtual_package.rs (100%) rename {py-rattler => crates}/pyo3-rattler/src/index.rs (100%) rename {py-rattler => crates}/pyo3-rattler/src/lib.rs (100%) rename {py-rattler => crates}/pyo3-rattler/src/linker.rs (100%) rename {py-rattler => crates}/pyo3-rattler/src/lock/mod.rs (100%) rename {py-rattler => crates}/pyo3-rattler/src/match_spec.rs (100%) rename {py-rattler => crates}/pyo3-rattler/src/meta.rs (100%) rename {py-rattler => crates}/pyo3-rattler/src/nameless_match_spec.rs (100%) rename {py-rattler => crates}/pyo3-rattler/src/networking/authenticated_client.rs (100%) rename {py-rattler => crates}/pyo3-rattler/src/networking/cached_repo_data.rs (100%) rename {py-rattler => crates}/pyo3-rattler/src/networking/mod.rs (100%) rename {py-rattler => crates}/pyo3-rattler/src/package_name.rs (100%) rename {py-rattler => crates}/pyo3-rattler/src/platform.rs (100%) rename {py-rattler => crates}/pyo3-rattler/src/prefix_paths.rs (100%) rename {py-rattler => crates}/pyo3-rattler/src/record.rs (100%) rename {py-rattler => crates}/pyo3-rattler/src/repo_data/mod.rs (100%) rename {py-rattler => crates}/pyo3-rattler/src/repo_data/patch_instructions.rs (100%) rename {py-rattler => crates}/pyo3-rattler/src/repo_data/sparse.rs (100%) rename {py-rattler => crates}/pyo3-rattler/src/shell.rs (100%) rename {py-rattler => crates}/pyo3-rattler/src/solver.rs (100%) rename {py-rattler => crates}/pyo3-rattler/src/version/component.rs (100%) rename {py-rattler => crates}/pyo3-rattler/src/version/mod.rs (100%) rename {py-rattler => crates}/pyo3-rattler/src/virtual_package.rs (100%) delete mode 100644 py-rattler/pyo3-rattler/Cargo.toml diff --git a/Cargo.toml b/Cargo.toml index fbfc86598..71367ba4f 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -26,9 +26,17 @@ lto = true [workspace.dependencies] anyhow = "1.0.79" assert_matches = "1.5.0" -async-compression = { version = "0.4.6", features = ["gzip", "tokio", "bzip2", "zstd"] } +async-compression = { version = "0.4.6", features = [ + "gzip", + "tokio", + "bzip2", + "zstd", +] } async-trait = "0.1.77" -axum = { version = "0.7.4", default-features = false, features = ["tokio", "http1"] } +axum = { version = "0.7.4", default-features = false, features = [ + "tokio", + "http1", +] } base64 = "0.21.7" bindgen = "0.69.4" blake2 = "0.10.6" @@ -36,7 +44,11 @@ bytes = "1.5.0" bzip2 = "0.4.4" cache_control = "0.2.0" cfg-if = "1.0" -chrono = { version = "0.4.33", default-features = false, features = ["std", "serde", "alloc"] } +chrono = { version = "0.4.33", default-features = false, features = [ + "std", + "serde", + "alloc", +] } clap = { version = "4.4.18", features = ["derive"] } cmake = "0.1.50" console = { version = "0.15.8", features = ["windows-console-colors"] } @@ -76,6 +88,7 @@ netrc-rs = "0.1.2" nom = "7.1.3" num_cpus = "1.16.0" once_cell = "1.19.0" +openssl = "0.10" ouroboros = "0.18.3" pathdiff = "0.2.1" pep440_rs = { version = "0.4.0" } @@ -83,6 +96,12 @@ pep508_rs = { version = "0.3.0" } pin-project-lite = "0.2.13" plist = "1" purl = { version = "0.1.2", features = ["serde"] } +pyo3 = { version = "0.19.0", features = [ + "abi3-py38", + "extension-module", + "multiple-pymethods", +] } +pyo3-asyncio = { version = "0.19.0", features = ["tokio-runtime"] } quote = "1.0.35" rand = "0.8.5" reflink-copy = "0.1.14" @@ -102,7 +121,12 @@ serde_yaml = "0.9.31" sha2 = "0.10.8" shlex = "1.3.0" similar-asserts = "1.5.0" -smallvec = { version = "1.13.1", features = ["serde", "const_new", "const_generics", "union"] } +smallvec = { version = "1.13.1", features = [ + "serde", + "const_new", + "const_generics", + "union", +] } strum = { version = "0.26.1", features = ["derive"] } superslice = "1.0.0" syn = "2.0.48" diff --git a/crates/pyo3-rattler/Cargo.toml b/crates/pyo3-rattler/Cargo.toml new file mode 100644 index 000000000..f3bc2e0c8 --- /dev/null +++ b/crates/pyo3-rattler/Cargo.toml @@ -0,0 +1,52 @@ +[package] +name = "pyo3-rattler" +version = "0.3.0" +edition.workspace = true + +[lib] +name = "pyo3_rattler" +path = "src/lib.rs" + +[features] +default = ["native-tls"] +native-tls = [ + "rattler_networking/native-tls", + "rattler_repodata_gateway/native-tls", +] +rustls-tls = [ + "rattler_networking/rustls-tls", + "rattler_repodata_gateway/rustls-tls", +] +vendored-openssl = ["openssl", "openssl/vendored"] + +[dependencies] +rattler = { path = "../rattler", default-features = false } +rattler_repodata_gateway = { path = "../rattler_repodata_gateway", default-features = false, features = [ + "sparse", +] } +rattler_conda_types = { path = "../rattler_conda_types", default-features = false } +rattler_digest = { path = "../rattler_digest" } +rattler_networking = { path = "../rattler_networking", default-features = false } +rattler_shell = { path = "../rattler_shell", default-features = false } +rattler_virtual_packages = { path = "../rattler_virtual_packages", default-features = false } +rattler_solve = { path = "../rattler_solve", default-features = false, features = [ + "resolvo", +] } +rattler_index = { path = "../rattler_index" } +rattler_lock = { path = "../rattler_lock", default-features = false } + +anyhow = { workspace = true } +futures = { workspace = true } +openssl = { workspace = true, optional = true } +pep508_rs = { workspace = true } +pyo3 = { workspace = true, features = [ + "abi3-py38", + "extension-module", + "multiple-pymethods", +] } +pyo3-asyncio = { workspace = true, features = ["tokio-runtime"] } +reqwest = { workspace = true, default-features = false } +reqwest-middleware = { workspace = true } +thiserror = { workspace = true } +tokio = { workspace = true } +url = { workspace = true } diff --git a/py-rattler/pyo3-rattler/src/about_json.rs b/crates/pyo3-rattler/src/about_json.rs similarity index 100% rename from py-rattler/pyo3-rattler/src/about_json.rs rename to crates/pyo3-rattler/src/about_json.rs diff --git a/py-rattler/pyo3-rattler/src/channel/mod.rs b/crates/pyo3-rattler/src/channel/mod.rs similarity index 100% rename from py-rattler/pyo3-rattler/src/channel/mod.rs rename to crates/pyo3-rattler/src/channel/mod.rs diff --git a/py-rattler/pyo3-rattler/src/error.rs b/crates/pyo3-rattler/src/error.rs similarity index 100% rename from py-rattler/pyo3-rattler/src/error.rs rename to crates/pyo3-rattler/src/error.rs diff --git a/py-rattler/pyo3-rattler/src/generic_virtual_package.rs b/crates/pyo3-rattler/src/generic_virtual_package.rs similarity index 100% rename from py-rattler/pyo3-rattler/src/generic_virtual_package.rs rename to crates/pyo3-rattler/src/generic_virtual_package.rs diff --git a/py-rattler/pyo3-rattler/src/index.rs b/crates/pyo3-rattler/src/index.rs similarity index 100% rename from py-rattler/pyo3-rattler/src/index.rs rename to crates/pyo3-rattler/src/index.rs diff --git a/py-rattler/pyo3-rattler/src/lib.rs b/crates/pyo3-rattler/src/lib.rs similarity index 100% rename from py-rattler/pyo3-rattler/src/lib.rs rename to crates/pyo3-rattler/src/lib.rs diff --git a/py-rattler/pyo3-rattler/src/linker.rs b/crates/pyo3-rattler/src/linker.rs similarity index 100% rename from py-rattler/pyo3-rattler/src/linker.rs rename to crates/pyo3-rattler/src/linker.rs diff --git a/py-rattler/pyo3-rattler/src/lock/mod.rs b/crates/pyo3-rattler/src/lock/mod.rs similarity index 100% rename from py-rattler/pyo3-rattler/src/lock/mod.rs rename to crates/pyo3-rattler/src/lock/mod.rs diff --git a/py-rattler/pyo3-rattler/src/match_spec.rs b/crates/pyo3-rattler/src/match_spec.rs similarity index 100% rename from py-rattler/pyo3-rattler/src/match_spec.rs rename to crates/pyo3-rattler/src/match_spec.rs diff --git a/py-rattler/pyo3-rattler/src/meta.rs b/crates/pyo3-rattler/src/meta.rs similarity index 100% rename from py-rattler/pyo3-rattler/src/meta.rs rename to crates/pyo3-rattler/src/meta.rs diff --git a/py-rattler/pyo3-rattler/src/nameless_match_spec.rs b/crates/pyo3-rattler/src/nameless_match_spec.rs similarity index 100% rename from py-rattler/pyo3-rattler/src/nameless_match_spec.rs rename to crates/pyo3-rattler/src/nameless_match_spec.rs diff --git a/py-rattler/pyo3-rattler/src/networking/authenticated_client.rs b/crates/pyo3-rattler/src/networking/authenticated_client.rs similarity index 100% rename from py-rattler/pyo3-rattler/src/networking/authenticated_client.rs rename to crates/pyo3-rattler/src/networking/authenticated_client.rs diff --git a/py-rattler/pyo3-rattler/src/networking/cached_repo_data.rs b/crates/pyo3-rattler/src/networking/cached_repo_data.rs similarity index 100% rename from py-rattler/pyo3-rattler/src/networking/cached_repo_data.rs rename to crates/pyo3-rattler/src/networking/cached_repo_data.rs diff --git a/py-rattler/pyo3-rattler/src/networking/mod.rs b/crates/pyo3-rattler/src/networking/mod.rs similarity index 100% rename from py-rattler/pyo3-rattler/src/networking/mod.rs rename to crates/pyo3-rattler/src/networking/mod.rs diff --git a/py-rattler/pyo3-rattler/src/package_name.rs b/crates/pyo3-rattler/src/package_name.rs similarity index 100% rename from py-rattler/pyo3-rattler/src/package_name.rs rename to crates/pyo3-rattler/src/package_name.rs diff --git a/py-rattler/pyo3-rattler/src/platform.rs b/crates/pyo3-rattler/src/platform.rs similarity index 100% rename from py-rattler/pyo3-rattler/src/platform.rs rename to crates/pyo3-rattler/src/platform.rs diff --git a/py-rattler/pyo3-rattler/src/prefix_paths.rs b/crates/pyo3-rattler/src/prefix_paths.rs similarity index 100% rename from py-rattler/pyo3-rattler/src/prefix_paths.rs rename to crates/pyo3-rattler/src/prefix_paths.rs diff --git a/py-rattler/pyo3-rattler/src/record.rs b/crates/pyo3-rattler/src/record.rs similarity index 100% rename from py-rattler/pyo3-rattler/src/record.rs rename to crates/pyo3-rattler/src/record.rs diff --git a/py-rattler/pyo3-rattler/src/repo_data/mod.rs b/crates/pyo3-rattler/src/repo_data/mod.rs similarity index 100% rename from py-rattler/pyo3-rattler/src/repo_data/mod.rs rename to crates/pyo3-rattler/src/repo_data/mod.rs diff --git a/py-rattler/pyo3-rattler/src/repo_data/patch_instructions.rs b/crates/pyo3-rattler/src/repo_data/patch_instructions.rs similarity index 100% rename from py-rattler/pyo3-rattler/src/repo_data/patch_instructions.rs rename to crates/pyo3-rattler/src/repo_data/patch_instructions.rs diff --git a/py-rattler/pyo3-rattler/src/repo_data/sparse.rs b/crates/pyo3-rattler/src/repo_data/sparse.rs similarity index 100% rename from py-rattler/pyo3-rattler/src/repo_data/sparse.rs rename to crates/pyo3-rattler/src/repo_data/sparse.rs diff --git a/py-rattler/pyo3-rattler/src/shell.rs b/crates/pyo3-rattler/src/shell.rs similarity index 100% rename from py-rattler/pyo3-rattler/src/shell.rs rename to crates/pyo3-rattler/src/shell.rs diff --git a/py-rattler/pyo3-rattler/src/solver.rs b/crates/pyo3-rattler/src/solver.rs similarity index 100% rename from py-rattler/pyo3-rattler/src/solver.rs rename to crates/pyo3-rattler/src/solver.rs diff --git a/py-rattler/pyo3-rattler/src/version/component.rs b/crates/pyo3-rattler/src/version/component.rs similarity index 100% rename from py-rattler/pyo3-rattler/src/version/component.rs rename to crates/pyo3-rattler/src/version/component.rs diff --git a/py-rattler/pyo3-rattler/src/version/mod.rs b/crates/pyo3-rattler/src/version/mod.rs similarity index 100% rename from py-rattler/pyo3-rattler/src/version/mod.rs rename to crates/pyo3-rattler/src/version/mod.rs diff --git a/py-rattler/pyo3-rattler/src/virtual_package.rs b/crates/pyo3-rattler/src/virtual_package.rs similarity index 100% rename from py-rattler/pyo3-rattler/src/virtual_package.rs rename to crates/pyo3-rattler/src/virtual_package.rs diff --git a/pixi.toml b/pixi.toml index 26021a2b6..afff3529d 100644 --- a/pixi.toml +++ b/pixi.toml @@ -23,5 +23,5 @@ cxx-compiler = "~=1.6.0" openssl = "~=3.1.2" make = "~=4.3" pkg-config = "~=0.29.2" -rust = "~=1.71.1" +rust = "~=1.75.0" cmake = "~=3.26.4" diff --git a/py-rattler/Cargo.lock b/py-rattler/Cargo.lock index f38f23303..29cf21a32 100644 --- a/py-rattler/Cargo.lock +++ b/py-rattler/Cargo.lock @@ -1128,20 +1128,6 @@ dependencies = [ "want", ] -[[package]] -name = "hyper-rustls" -version = "0.24.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec3efd23720e2049821a693cbc7e65ea87c72f1c58ff2f9522ff332b1491e590" -dependencies = [ - "futures-util", - "http", - "hyper", - "rustls", - "tokio", - "tokio-rustls", -] - [[package]] name = "hyper-tls" version = "0.5.0" @@ -1688,15 +1674,6 @@ version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" -[[package]] -name = "openssl-src" -version = "300.2.3+3.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5cff92b6f71555b61bb9315f7c64da3ca43d87531622120fea0195fc761b4843" -dependencies = [ - "cc", -] - [[package]] name = "openssl-sys" version = "0.9.101" @@ -1705,7 +1682,6 @@ checksum = "dda2b0f344e78efc2facf7d195d098df0dd72151b26ab98da807afc26c198dff" dependencies = [ "cc", "libc", - "openssl-src", "pkg-config", "vcpkg", ] @@ -2099,7 +2075,6 @@ version = "0.3.0" dependencies = [ "anyhow", "futures", - "openssl", "pep508_rs", "pyo3", "pyo3-asyncio", @@ -2519,7 +2494,6 @@ dependencies = [ "http", "http-body", "hyper", - "hyper-rustls", "hyper-tls", "ipnet", "js-sys", @@ -2530,7 +2504,6 @@ dependencies = [ "once_cell", "percent-encoding", "pin-project-lite", - "rustls", "rustls-pemfile", "serde", "serde_json", @@ -2539,7 +2512,6 @@ dependencies = [ "system-configuration", "tokio", "tokio-native-tls", - "tokio-rustls", "tokio-util", "tower-service", "url", @@ -2547,7 +2519,6 @@ dependencies = [ "wasm-bindgen-futures", "wasm-streams", "web-sys", - "webpki-roots", "winreg", ] @@ -2592,21 +2563,6 @@ dependencies = [ "rand", ] -[[package]] -name = "ring" -version = "0.17.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c17fa4cb658e3583423e915b9f3acc01cceaee1860e33d59ebae66adc3a2dc0d" -dependencies = [ - "cc", - "cfg-if", - "getrandom", - "libc", - "spin", - "untrusted", - "windows-sys 0.52.0", -] - [[package]] name = "rustc-demangle" version = "0.1.23" @@ -2640,18 +2596,6 @@ dependencies = [ "windows-sys 0.52.0", ] -[[package]] -name = "rustls" -version = "0.21.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f9d5a6813c0759e4609cd494e8e725babae6a2ca7b62a5536a13daaec6fcb7ba" -dependencies = [ - "log", - "ring", - "rustls-webpki", - "sct", -] - [[package]] name = "rustls-pemfile" version = "1.0.4" @@ -2661,16 +2605,6 @@ dependencies = [ "base64", ] -[[package]] -name = "rustls-webpki" -version = "0.101.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b6275d1ee7a1cd780b64aca7726599a1dbc893b1e64144529e55c3c2f745765" -dependencies = [ - "ring", - "untrusted", -] - [[package]] name = "rustversion" version = "1.0.14" @@ -2713,16 +2647,6 @@ version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" -[[package]] -name = "sct" -version = "0.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da046153aa2352493d6cb7da4b6e5c0c057d8a1d0a9aa8560baffdd945acd414" -dependencies = [ - "ring", - "untrusted", -] - [[package]] name = "secret-service" version = "3.0.1" @@ -2964,12 +2888,6 @@ dependencies = [ "windows-sys 0.52.0", ] -[[package]] -name = "spin" -version = "0.9.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67" - [[package]] name = "stable_deref_trait" version = "1.2.0" @@ -3219,16 +3137,6 @@ dependencies = [ "tokio", ] -[[package]] -name = "tokio-rustls" -version = "0.24.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c28327cf380ac148141087fbfb9de9d7bd4e84ab5d2c28fbc911d753de8a7081" -dependencies = [ - "rustls", - "tokio", -] - [[package]] name = "tokio-stream" version = "0.1.14" @@ -3390,12 +3298,6 @@ version = "0.2.10" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ab4c90930b95a82d00dc9e9ac071b4991924390d46cbd0dfe566148667605e4b" -[[package]] -name = "untrusted" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1" - [[package]] name = "url" version = "2.5.0" @@ -3550,12 +3452,6 @@ dependencies = [ "wasm-bindgen", ] -[[package]] -name = "webpki-roots" -version = "0.25.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f20c57d8d7db6d3b86154206ae5d8fba62dd39573114de97c2cb0578251f8e1" - [[package]] name = "winapi" version = "0.3.9" diff --git a/py-rattler/Cargo.toml b/py-rattler/Cargo.toml index 54e8ef0bf..094dc34dc 100644 --- a/py-rattler/Cargo.toml +++ b/py-rattler/Cargo.toml @@ -1,6 +1,3 @@ -[workspace] -members = ["pyo3-rattler"] - [workspace.package] version = "0.3.0" edition = "2021" @@ -18,7 +15,7 @@ path = "src/lib.rs" crate-type = ["cdylib"] [dependencies] -pyo3-rattler = { path = "./pyo3-rattler" } +pyo3-rattler = { path = "../crates/pyo3-rattler" } pyo3 = { version = "0.19", features = [ "abi3-py38", "extension-module", @@ -27,3 +24,5 @@ pyo3 = { version = "0.19", features = [ [build-dependencies] pyo3-build-config = "0.20" + +[workspace] \ No newline at end of file diff --git a/py-rattler/pixi.toml b/py-rattler/pixi.toml index 1de5901a6..0d1895549 100644 --- a/py-rattler/pixi.toml +++ b/py-rattler/pixi.toml @@ -12,7 +12,7 @@ license = "BSD-3-Clause" [tasks] build = "PIP_REQUIRE_VIRTUALENV=false maturin develop" -build-release = "PIP_REQUIRE_VIRTUALENV=false maturin develop --release -m ./py-rattler/Cargo.toml" +build-release = "PIP_REQUIRE_VIRTUALENV=false maturin develop --release" test = { cmd = "pytest --doctest-modules", depends_on = ["build"] } fmt-python = "black ." fmt-rust = "cargo fmt --all" diff --git a/py-rattler/pyo3-rattler/Cargo.toml b/py-rattler/pyo3-rattler/Cargo.toml deleted file mode 100644 index e84a16a5a..000000000 --- a/py-rattler/pyo3-rattler/Cargo.toml +++ /dev/null @@ -1,57 +0,0 @@ -[package] -name = "pyo3-rattler" -version.workspace = true -edition.workspace = true - -# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html -[lib] -name = "pyo3_rattler" -path = "src/lib.rs" - -[features] -default = ["native-tls"] -native-tls = [ - "rattler_networking/native-tls", - "rattler_repodata_gateway/native-tls", -] -rustls-tls = [ - "rattler_networking/rustls-tls", - "rattler_repodata_gateway/rustls-tls", -] -vendored-openssl = ["openssl", "openssl/vendored"] - -[dependencies] -anyhow = "1.0.75" -futures = "0.3.28" - -rattler = { path = "../../crates/rattler", default-features = false } -rattler_repodata_gateway = { path = "../../crates/rattler_repodata_gateway", default-features = false, features = [ - "sparse", -] } -rattler_conda_types = { path = "../../crates/rattler_conda_types", default-features = false } -rattler_digest = { path = "../../crates/rattler_digest" } -rattler_networking = { path = "../../crates/rattler_networking", default-features = false } -rattler_shell = { path = "../../crates/rattler_shell", default-features = false } -rattler_virtual_packages = { path = "../../crates/rattler_virtual_packages", default-features = false } -rattler_solve = { path = "../../crates/rattler_solve", default-features = false, features = [ - "resolvo", -] } -rattler_index = { path = "../../crates/rattler_index" } -rattler_lock = { path = "../../crates/rattler_lock", default-features = false } - -pyo3 = { version = "0.19", features = [ - "abi3-py38", - "extension-module", - "multiple-pymethods", -] } -pyo3-asyncio = { version = "0.19", features = ["tokio-runtime"] } -tokio = { version = "1.32" } - -reqwest = { version = "0.11.22", default-features = false } -reqwest-middleware = "0.2.4" - -thiserror = "1.0.44" -url = "2.4.1" - -openssl = { version = "0.10", optional = true } -pep508_rs = "0.3.0" From 29db6907cca2b743120cca6f900125b0f54d93f6 Mon Sep 17 00:00:00 2001 From: Wackyator Date: Mon, 11 Mar 2024 15:15:17 +0530 Subject: [PATCH 04/10] fix: intra-doc link --- crates/pyo3-rattler/src/lock/mod.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/pyo3-rattler/src/lock/mod.rs b/crates/pyo3-rattler/src/lock/mod.rs index 084e64026..ee4495192 100644 --- a/crates/pyo3-rattler/src/lock/mod.rs +++ b/crates/pyo3-rattler/src/lock/mod.rs @@ -85,7 +85,7 @@ impl PyLockFile { self.inner.environment(name).map(Into::into) } - /// Returns the environment with the default name as defined by [`DEFAULT_ENVIRONMENT_NAME`]. + /// Returns the environment with the default name. pub fn default_environment(&self) -> Option { self.inner.default_environment().map(Into::into) } From f1572872fc1cc51d712785f20eeba77a06f43c10 Mon Sep 17 00:00:00 2001 From: Wackyator Date: Mon, 18 Mar 2024 16:13:10 +0530 Subject: [PATCH 05/10] fix: remove extension-module feature from pyo3-rattler --- Cargo.toml | 6 +-- crates/pyo3-rattler/Cargo.toml | 6 +-- py-rattler/Cargo.lock | 69 ++++++++++++++++++++++------------ 3 files changed, 46 insertions(+), 35 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 6997b14e1..c0838c219 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -95,11 +95,7 @@ pep508_rs = { version = "0.4.2" } pin-project-lite = "0.2.13" plist = "1" purl = { version = "0.1.2", features = ["serde"] } -pyo3 = { version = "0.19.0", features = [ - "abi3-py38", - "extension-module", - "multiple-pymethods", -] } +pyo3 = { version = "0.19.0", features = ["abi3-py38", "multiple-pymethods"] } pyo3-asyncio = { version = "0.19.0", features = ["tokio-runtime"] } quote = "1.0.35" rand = "0.8.5" diff --git a/crates/pyo3-rattler/Cargo.toml b/crates/pyo3-rattler/Cargo.toml index f3bc2e0c8..d50be8c22 100644 --- a/crates/pyo3-rattler/Cargo.toml +++ b/crates/pyo3-rattler/Cargo.toml @@ -39,11 +39,7 @@ anyhow = { workspace = true } futures = { workspace = true } openssl = { workspace = true, optional = true } pep508_rs = { workspace = true } -pyo3 = { workspace = true, features = [ - "abi3-py38", - "extension-module", - "multiple-pymethods", -] } +pyo3 = { workspace = true, features = ["abi3-py38", "multiple-pymethods"] } pyo3-asyncio = { workspace = true, features = ["tokio-runtime"] } reqwest = { workspace = true, default-features = false } reqwest-middleware = { workspace = true } diff --git a/py-rattler/Cargo.lock b/py-rattler/Cargo.lock index 2543515d8..31f280e63 100644 --- a/py-rattler/Cargo.lock +++ b/py-rattler/Cargo.lock @@ -421,9 +421,9 @@ checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" [[package]] name = "chrono" -version = "0.4.34" +version = "0.4.35" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5bc015644b92d5890fab7489e49d21f879d5c990186827d42ec511919404f38b" +checksum = "8eaf5903dcbc0a39312feb77df2ff4c76387d591b9fc7b04a238dcf8bb62639a" dependencies = [ "android-tzdata", "iana-time-zone", @@ -1152,7 +1152,7 @@ dependencies = [ "iana-time-zone-haiku", "js-sys", "wasm-bindgen", - "windows-core", + "windows-core 0.52.0", ] [[package]] @@ -1327,12 +1327,12 @@ checksum = "9c198f91728a82281a64e1f4f9eeb25d82cb32a5de251c6bd1b5154d63a8e7bd" [[package]] name = "libloading" -version = "0.8.1" +version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c571b676ddfc9a8c12f1f3d3085a7b163966a8fd8098a90640953ce5f6170161" +checksum = "0c2a198fb6b0eada2a8df47933734e6d35d350665a33a3593d7164fa52c75c19" dependencies = [ "cfg-if", - "windows-sys 0.48.0", + "windows-targets 0.52.4", ] [[package]] @@ -2152,7 +2152,7 @@ dependencies = [ [[package]] name = "rattler" -version = "0.19.0" +version = "0.19.2" dependencies = [ "anyhow", "async-compression", @@ -2196,7 +2196,7 @@ dependencies = [ [[package]] name = "rattler_conda_types" -version = "0.19.0" +version = "0.20.1" dependencies = [ "chrono", "fxhash", @@ -2224,7 +2224,7 @@ dependencies = [ [[package]] name = "rattler_digest" -version = "0.19.0" +version = "0.19.1" dependencies = [ "blake2", "digest", @@ -2238,7 +2238,7 @@ dependencies = [ [[package]] name = "rattler_index" -version = "0.19.0" +version = "0.19.2" dependencies = [ "fs-err", "rattler_conda_types", @@ -2251,7 +2251,7 @@ dependencies = [ [[package]] name = "rattler_lock" -version = "0.19.0" +version = "0.20.1" dependencies = [ "chrono", "fxhash", @@ -2273,7 +2273,7 @@ dependencies = [ [[package]] name = "rattler_macros" -version = "0.19.0" +version = "0.19.1" dependencies = [ "quote", "syn 2.0.52", @@ -2281,7 +2281,7 @@ dependencies = [ [[package]] name = "rattler_networking" -version = "0.19.0" +version = "0.19.1" dependencies = [ "anyhow", "async-trait", @@ -2308,7 +2308,7 @@ dependencies = [ [[package]] name = "rattler_package_streaming" -version = "0.19.0" +version = "0.19.2" dependencies = [ "bzip2", "chrono", @@ -2333,7 +2333,7 @@ dependencies = [ [[package]] name = "rattler_repodata_gateway" -version = "0.19.0" +version = "0.19.2" dependencies = [ "anyhow", "async-compression", @@ -2371,7 +2371,7 @@ dependencies = [ [[package]] name = "rattler_shell" -version = "0.19.0" +version = "0.19.2" dependencies = [ "enum_dispatch", "indexmap 2.2.5", @@ -2386,7 +2386,7 @@ dependencies = [ [[package]] name = "rattler_solve" -version = "0.19.0" +version = "0.20.1" dependencies = [ "anyhow", "chrono", @@ -2405,7 +2405,7 @@ dependencies = [ [[package]] name = "rattler_virtual_packages" -version = "0.19.0" +version = "0.19.2" dependencies = [ "cfg-if", "libloading", @@ -2441,9 +2441,9 @@ dependencies = [ [[package]] name = "reflink-copy" -version = "0.1.14" +version = "0.1.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "767be24c0da52e7448d495b8d162506a9aa125426651d547d545d6c2b4b65b62" +checksum = "52b1349400e2ffd64a9fb5ed9008e33c0b8ef86bd5bae8f73080839c7082f1d5" dependencies = [ "cfg-if", "rustix 0.38.31", @@ -3352,9 +3352,9 @@ checksum = "f3c4517f54858c779bbcbf228f4fca63d121bf85fbecb2dc578cdf4a39395690" [[package]] name = "walkdir" -version = "2.4.0" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d71d857dc86794ca4c280d616f7da00d2dbfd8cd788846559a6813e6aa4b54ee" +checksum = "29790946404f91d9c5d06f9874efddea1dc06c5efe94541a7d6863108e3a5e4b" dependencies = [ "same-file", "winapi-util", @@ -3497,11 +3497,11 @@ checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" [[package]] name = "windows" -version = "0.52.0" +version = "0.54.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e48a53791691ab099e5e2ad123536d0fff50652600abaf43bbf952894110d0be" +checksum = "9252e5725dbed82865af151df558e754e4a3c2c30818359eb17465f1346a1b49" dependencies = [ - "windows-core", + "windows-core 0.54.0", "windows-targets 0.52.4", ] @@ -3514,6 +3514,25 @@ dependencies = [ "windows-targets 0.52.4", ] +[[package]] +name = "windows-core" +version = "0.54.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "12661b9c89351d684a50a8a643ce5f608e20243b9fb84687800163429f161d65" +dependencies = [ + "windows-result", + "windows-targets 0.52.4", +] + +[[package]] +name = "windows-result" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cd19df78e5168dfb0aedc343d1d1b8d422ab2db6756d2dc3fef75035402a3f64" +dependencies = [ + "windows-targets 0.52.4", +] + [[package]] name = "windows-sys" version = "0.48.0" From 9b46004873a523cc939c3411e019d3ea561e19b9 Mon Sep 17 00:00:00 2001 From: Wackyator Date: Tue, 19 Mar 2024 20:10:18 +0530 Subject: [PATCH 06/10] fix: set tests to false in pyo3-rattler --- crates/pyo3-rattler/Cargo.toml | 1 + 1 file changed, 1 insertion(+) diff --git a/crates/pyo3-rattler/Cargo.toml b/crates/pyo3-rattler/Cargo.toml index d50be8c22..665e25703 100644 --- a/crates/pyo3-rattler/Cargo.toml +++ b/crates/pyo3-rattler/Cargo.toml @@ -6,6 +6,7 @@ edition.workspace = true [lib] name = "pyo3_rattler" path = "src/lib.rs" +test = false [features] default = ["native-tls"] From 49504aa3752719ed6228601cc09eb54e65330fe7 Mon Sep 17 00:00:00 2001 From: Wackyator Date: Tue, 19 Mar 2024 20:43:43 +0530 Subject: [PATCH 07/10] try cdylib and rlib crate-type --- crates/pyo3-rattler/Cargo.toml | 1 + 1 file changed, 1 insertion(+) diff --git a/crates/pyo3-rattler/Cargo.toml b/crates/pyo3-rattler/Cargo.toml index 665e25703..9641261dc 100644 --- a/crates/pyo3-rattler/Cargo.toml +++ b/crates/pyo3-rattler/Cargo.toml @@ -7,6 +7,7 @@ edition.workspace = true name = "pyo3_rattler" path = "src/lib.rs" test = false +crate-type = ["cdylib", "rlib"] [features] default = ["native-tls"] From 38f691542236f2c539c918266af58c0730d693b0 Mon Sep 17 00:00:00 2001 From: Wackyator Date: Tue, 19 Mar 2024 20:56:58 +0530 Subject: [PATCH 08/10] only build rlib for pyo3-rattler --- crates/pyo3-rattler/Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/pyo3-rattler/Cargo.toml b/crates/pyo3-rattler/Cargo.toml index 9641261dc..64249a41f 100644 --- a/crates/pyo3-rattler/Cargo.toml +++ b/crates/pyo3-rattler/Cargo.toml @@ -7,7 +7,7 @@ edition.workspace = true name = "pyo3_rattler" path = "src/lib.rs" test = false -crate-type = ["cdylib", "rlib"] +crate-type = ["rlib"] [features] default = ["native-tls"] From 3b20e4ef7bb4f43d4850359860d3849e32e2068d Mon Sep 17 00:00:00 2001 From: Bas Zalmstra Date: Tue, 19 Mar 2024 17:14:49 +0100 Subject: [PATCH 09/10] chore: try something --- Cargo.toml | 4 ++-- crates/pyo3-rattler/Cargo.toml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index c0838c219..9dc02c209 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -95,8 +95,8 @@ pep508_rs = { version = "0.4.2" } pin-project-lite = "0.2.13" plist = "1" purl = { version = "0.1.2", features = ["serde"] } -pyo3 = { version = "0.19.0", features = ["abi3-py38", "multiple-pymethods"] } -pyo3-asyncio = { version = "0.19.0", features = ["tokio-runtime"] } +pyo3 = { version = "0.19.0", default-features = false } +pyo3-asyncio = { version = "0.19.0", default-features = false } quote = "1.0.35" rand = "0.8.5" reflink-copy = "0.1.15" diff --git a/crates/pyo3-rattler/Cargo.toml b/crates/pyo3-rattler/Cargo.toml index 64249a41f..cb1b3a2e1 100644 --- a/crates/pyo3-rattler/Cargo.toml +++ b/crates/pyo3-rattler/Cargo.toml @@ -41,7 +41,7 @@ anyhow = { workspace = true } futures = { workspace = true } openssl = { workspace = true, optional = true } pep508_rs = { workspace = true } -pyo3 = { workspace = true, features = ["abi3-py38", "multiple-pymethods"] } +pyo3 = { workspace = true, features = ["abi3-py38", "multiple-pymethods", "generate-import-lib"] } pyo3-asyncio = { workspace = true, features = ["tokio-runtime"] } reqwest = { workspace = true, default-features = false } reqwest-middleware = { workspace = true } From 1120771fb0f0a48ab33a0d1e110a98da6c02917b Mon Sep 17 00:00:00 2001 From: Wackyator Date: Mon, 25 Mar 2024 17:11:07 +0530 Subject: [PATCH 10/10] fix: suppress clippy warning --- crates/pyo3-rattler/src/index_json.rs | 1 + crates/pyo3-rattler/src/paths_json.rs | 1 + crates/pyo3-rattler/src/run_exports_json.rs | 1 + 3 files changed, 3 insertions(+) diff --git a/crates/pyo3-rattler/src/index_json.rs b/crates/pyo3-rattler/src/index_json.rs index 1735ddbb9..7a5a909fa 100644 --- a/crates/pyo3-rattler/src/index_json.rs +++ b/crates/pyo3-rattler/src/index_json.rs @@ -56,6 +56,7 @@ impl PyIndexJson { /// For example, if the file is in JSON format, this function parses the JSON string and returns /// the resulting object. If the file is not in a parsable format, this function returns an /// error. + #[allow(clippy::should_implement_trait)] #[staticmethod] pub fn from_str(str: &str) -> PyResult { Ok(IndexJson::from_str(str) diff --git a/crates/pyo3-rattler/src/paths_json.rs b/crates/pyo3-rattler/src/paths_json.rs index 748367b50..623f042a7 100644 --- a/crates/pyo3-rattler/src/paths_json.rs +++ b/crates/pyo3-rattler/src/paths_json.rs @@ -74,6 +74,7 @@ impl PyPathsJson { /// For example, if the file is in JSON format, this function parses the JSON string and returns /// the resulting object. If the file is not in a parsable format, this function returns an /// error. + #[allow(clippy::should_implement_trait)] #[staticmethod] pub fn from_str(str: &str) -> PyResult { Ok(PathsJson::from_str(str) diff --git a/crates/pyo3-rattler/src/run_exports_json.rs b/crates/pyo3-rattler/src/run_exports_json.rs index 0213f708e..9a61db49d 100644 --- a/crates/pyo3-rattler/src/run_exports_json.rs +++ b/crates/pyo3-rattler/src/run_exports_json.rs @@ -71,6 +71,7 @@ impl PyRunExportsJson { /// For example, if the file is in JSON format, this function parses the JSON string and returns /// the resulting object. If the file is not in a parsable format, this function returns an /// error. + #[allow(clippy::should_implement_trait)] #[staticmethod] pub fn from_str(str: &str) -> PyResult { Ok(RunExportsJson::from_str(str)