diff --git a/.github/workflows/clippy.yml b/.github/workflows/clippy.yml index 91a6e165ad..43ce104a69 100644 --- a/.github/workflows/clippy.yml +++ b/.github/workflows/clippy.yml @@ -11,7 +11,7 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: dtolnay/rust-toolchain@master with: toolchain: stable diff --git a/.github/workflows/rustfmt.yml b/.github/workflows/rustfmt.yml index 416cd1d1ca..a511902c92 100644 --- a/.github/workflows/rustfmt.yml +++ b/.github/workflows/rustfmt.yml @@ -11,7 +11,7 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: dtolnay/rust-toolchain@master with: toolchain: stable diff --git a/.github/workflows/spelling.yml b/.github/workflows/spelling.yml index 375999ae4b..79ed4cfbf0 100644 --- a/.github/workflows/spelling.yml +++ b/.github/workflows/spelling.yml @@ -11,7 +11,7 @@ jobs: name: "Spell check" runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: crate-ci/typos@master with: - files: . \ No newline at end of file + files: . diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index ffd5f729a1..0158e3e431 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -12,7 +12,7 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: dtolnay/rust-toolchain@master with: toolchain: stable @@ -31,7 +31,7 @@ jobs: runs-on: macos-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: dtolnay/rust-toolchain@master with: toolchain: stable @@ -50,7 +50,7 @@ jobs: runs-on: windows-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: dtolnay/rust-toolchain@master with: toolchain: stable diff --git a/CHANGELOG.md b/CHANGELOG.md index 371864c620..a1e739decd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,13 +3,61 @@ This file contains tracks the changes landing in Rye. It includes changes that were not yet released. -## 0.34.0 + -_Unreleased_ +## 0.37.0 -- Use uv in `rye build` when uv is enabled. #978 +Released on 2024-07-20. - +* Fix verify-ssl option parsing by @taki-d in https://github.com/astral-sh/rye/pull/1208 +* Emit warning when asked to build a virtual project by @nazq in https://github.com/astral-sh/rye/pull/1227 +* Add short version `-d` for `rye remove --dev` by @nikhilweee in https://github.com/astral-sh/rye/pull/1239 +* Remove redundant alias information from CLI by @piotrgredowski in https://github.com/astral-sh/rye/pull/1237 +* Update bundled uv version to `v0.2.27` by @github-actions in https://github.com/astral-sh/rye/pull/1232 +* Update Python releases to include `3.12.4` by @github-actions in https://github.com/astral-sh/rye/pull/1230 +* Respect `.python-version` in Rye builds by @charliermarsh in https://github.com/astral-sh/rye/pull/1250 +* Update bundled Ruff version to `v0.5.4` by @charliermarsh in https://github.com/astral-sh/rye/pull/1251 + +## 0.36.0 + +Released on 2024-07-07. + +* Upgrade pyyaml to v6.0.1 by @charliermarsh in https://github.com/astral-sh/rye/pull/1170 +* Pass keyring-provider to uv sync and install by @emarsden-iso in https://github.com/astral-sh/rye/pull/1183 +* Add docs hint for packages on multiple indexes by @dennisrall in https://github.com/astral-sh/rye/pull/1188 +* Pass universal flag down to uv by @lbowenwest in https://github.com/astral-sh/rye/pull/1186 +* Use musl build for ARM Linux by @charliermarsh in https://github.com/astral-sh/rye/pull/1192 +* Bump uv to 0.2.22 by @charliermarsh in https://github.com/astral-sh/rye/pull/1192 +* Upgrade twine to v5.1.1 by @charliermarsh in https://github.com/astral-sh/rye/pull/1199 + +## 0.35.0 + +Released on 2024-06-24. + +* Enforce `--pre` when auto-syncing by @charliermarsh in https://github.com/astral-sh/rye/pull/1107 +* Move from `rye-up.com` to `rye.astral.sh` by @charliermarsh in https://github.com/astral-sh/rye/pull/1113 +* Fix install instructions on README.md for mac/linux by @timothycrosley in https://github.com/astral-sh/rye/pull/1114 +* Fix CLI deserialization of PowerShell (`powershell`) by @charliermarsh in https://github.com/astral-sh/rye/pull/1125 +* Add ability to specify option to generate hashes within pyproject.toml by @asmith26 in https://github.com/astral-sh/rye/pull/1129 +* Bump uv to 0.2.13 by @charliermarsh in https://github.com/astral-sh/rye/pull/1123 +* Improve `config.toml` error messages by @zys864 in https://github.com/astral-sh/rye/pull/1155 + +## 0.34.0 + +Released on 2024-05-20. + +* Add nushell completion support by @MilesCranmer in https://github.com/astral-sh/rye/pull/1030 +* Use uv in rye build when enabled by @bluss in https://github.com/astral-sh/rye/pull/978 +* Add short version add -d for rye add --dev by @bluss in https://github.com/astral-sh/rye/pull/1044 +* Flip uv to the default Rye backend by @charliermarsh in https://github.com/astral-sh/rye/pull/1053 +* Fix Rye not using user-chosen toolchain as default during installation by @pjdon in https://github.com/astral-sh/rye/pull/1054 +* Add keyring support for uv by @emarsden-iso in https://github.com/astral-sh/rye/pull/1016 +* Allow to generate lockfiles with hashes when using uv by @mvaled in https://github.com/astral-sh/rye/pull/1070 +* Bump ruff to 0.4.4 by @davfsa in https://github.com/astral-sh/rye/pull/1075 +* Fix TOML array formatting by @my1e5 in https://github.com/astral-sh/rye/pull/1084 +* Bump uv to 0.1.44 by @charliermarsh in https://github.com/astral-sh/rye/pull/1085 +* Discover cosmo-ified (`.com`) binaries on Windows by @mataha in https://github.com/astral-sh/rye/pull/1091 +* Write `use-uv = true` in no-prompt mode by @charliermarsh in https://github.com/astral-sh/rye/pull/1098 ## 0.33.0 diff --git a/Cargo.lock b/Cargo.lock index dc0642af75..b2a4a7d789 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -99,19 +99,28 @@ checksum = "5c6cb57a04249c6480766f7f7cef5467412af1490f8d1e243141daddada3264f" [[package]] name = "anstyle" -version = "1.0.6" +version = "1.0.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8901269c6307e8d93993578286ac0edf7f195079ffff5ebdeea6a59ffb7e36bc" +checksum = "038dfcf04a5feb68e9c60b21c9625a54c2c0616e79b72b0fd87075a056ae1d1b" [[package]] name = "anyhow" -version = "1.0.82" +version = "1.0.86" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f538837af36e6f6a9be0faa67f9a314f8119e4e4b5867c6ab40ed60360142519" +checksum = "b3d1d046238990b9cf5bcde22a3fb3584ee5cf65fb2765f454ed428c7a0063da" dependencies = [ "backtrace", ] +[[package]] +name = "arbitrary" +version = "1.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7d5a26814d8dcb93b0e5a0ff3c6d80a8843bafb21b39e8e18a6f05471870e110" +dependencies = [ + "derive_arbitrary", +] + [[package]] name = "arc-swap" version = "1.7.1" @@ -120,9 +129,9 @@ checksum = "69f7f8c3906b62b754cd5326047894316021dcfe5a194c8ea52bdd94934a3457" [[package]] name = "autocfg" -version = "1.2.0" +version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1fdabc7756949593fe60f30ec81974b613357de856987752631dea1e3394c80" +checksum = "0c4b4d0bd25bd0b74681c0ad21497610ce1b7c91b1022cd21c80c6fbdd9476b0" [[package]] name = "backtrace" @@ -151,6 +160,12 @@ version = "0.21.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9d297deb1925b89f2ccc13d7635fa0714f12c87adce1c75356b39ca9b7178567" +[[package]] +name = "base64" +version = "0.22.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6" + [[package]] name = "bech32" version = "0.9.1" @@ -223,9 +238,9 @@ dependencies = [ [[package]] name = "cc" -version = "1.0.95" +version = "1.0.98" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d32a725bc159af97c3e629873bb9f88fb8cf8a4867175f76dc987815ea07c83b" +checksum = "41c270e7540d725e65ac7f1b212ac8ce349719624d7bcff99f8e2e488e8cf03f" dependencies = [ "jobserver", "libc", @@ -348,7 +363,7 @@ dependencies = [ "heck", "proc-macro2", "quote", - "syn 2.0.60", + "syn 2.0.65", ] [[package]] @@ -396,18 +411,18 @@ dependencies = [ [[package]] name = "crc32fast" -version = "1.4.0" +version = "1.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b3855a8a784b474f333699ef2bbca9db2c4a1f6d9088a90a2d25b1eb53111eaa" +checksum = "a97769d94ddab943e4510d138150169a2758b5ef3eb191a9ee688de3e23ef7b3" dependencies = [ "cfg-if", ] [[package]] name = "crossbeam-utils" -version = "0.8.19" +version = "0.8.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "248e3bacc7dc6baa3b21e405ee045c3047101a49145e7e9eca583ab4c2ca5345" +checksum = "22ec99545bb0ed0ea7bb9b8e1e9122ea386ff8a48c0922e43f36d45ab09e0e80" [[package]] name = "crypto-common" @@ -483,7 +498,7 @@ checksum = "f46882e17999c6cc590af592290432be3bce0428cb0d5f8b6715e4dc7b383eb3" dependencies = [ "proc-macro2", "quote", - "syn 2.0.60", + "syn 2.0.65", ] [[package]] @@ -501,9 +516,9 @@ dependencies = [ [[package]] name = "data-encoding" -version = "2.5.0" +version = "2.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e962a19be5cfc3f3bf6dd8f61eb50107f356ad6270fbb3ed41476571db78be5" +checksum = "e8566979429cf69b49a5c740c60791108e86440e8be149bbea4fe54d2c32d6e2" [[package]] name = "deranged" @@ -514,11 +529,22 @@ dependencies = [ "powerfmt", ] +[[package]] +name = "derive_arbitrary" +version = "1.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "67e77553c4162a157adbf834ebae5b415acbecbeafc7a74b0e886657506a7611" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.65", +] + [[package]] name = "deunicode" -version = "1.4.4" +version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "322ef0094744e63628e6f0eb2295517f79276a5b342a4c2ff3042566ca181d4e" +checksum = "339544cc9e2c4dc3fc7149fd630c5f22263a4fdf18a98afd0075784968b5cf00" [[package]] name = "dialoguer" @@ -551,7 +577,7 @@ checksum = "487585f4d0c6655fe74905e2504d8ad6908e4db67f744eb140876906c2f3175d" dependencies = [ "proc-macro2", "quote", - "syn 2.0.60", + "syn 2.0.65", ] [[package]] @@ -562,9 +588,9 @@ checksum = "1aaf95b3e5c8f23aa320147307562d361db0ae0d51242340f558153b4eb2439b" [[package]] name = "either" -version = "1.11.0" +version = "1.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a47c1c47d2f5964e29c61246e81db715514cd532db6b5116a25ea3c03d6780a2" +checksum = "3dca9240753cf90908d7e4aac30f630662b02aebaa1b58a3cadabdb23385b58b" [[package]] name = "encode_unicode" @@ -589,9 +615,9 @@ checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" [[package]] name = "errno" -version = "0.3.8" +version = "0.3.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a258e46cdc063eb8519c00b9fc845fc47bcfca4130e2f08e88665ceda8474245" +checksum = "534c5cf6194dfab3db3242765c03bbe257cf92f22b38f6bc0c58d59108a820ba" dependencies = [ "libc", "windows-sys 0.52.0", @@ -608,15 +634,15 @@ dependencies = [ [[package]] name = "fastrand" -version = "2.0.2" +version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "658bd65b1cf4c852a3cc96f18a8ce7b5640f6b703f905c7d74532294c2a63984" +checksum = "9fc0510504f03c51ada170672ac806f1f105a88aa97a5281117e1ddc3368e51a" [[package]] name = "fiat-crypto" -version = "0.2.8" +version = "0.2.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38793c55593b33412e3ae40c2c9781ffaa6f438f6f8c10f24e71846fbd7ae01e" +checksum = "28dea519a9695b9977216879a3ebfddf92f1c08c05d984f8996aecd6ecdc811d" [[package]] name = "filetime" @@ -626,7 +652,7 @@ checksum = "1ee447700ac8aa0b2f2bd7bc4462ad686ba06baa6727ac149a2d6277f0d240fd" dependencies = [ "cfg-if", "libc", - "redox_syscall", + "redox_syscall 0.4.1", "windows-sys 0.52.0", ] @@ -641,9 +667,9 @@ dependencies = [ [[package]] name = "flate2" -version = "1.0.28" +version = "1.0.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "46303f565772937ffe1d394a4fac6f411c6013172fadde9dcdb1e147a086940e" +checksum = "5f54427cfd1c7829e2a139fcefea601bf088ebca651d2bf53ebc600eac295dae" dependencies = [ "crc32fast", "miniz_oxide", @@ -651,9 +677,9 @@ dependencies = [ [[package]] name = "fluent" -version = "0.16.0" +version = "0.16.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61f69378194459db76abd2ce3952b790db103ceb003008d3d50d97c41ff847a7" +checksum = "bb74634707bebd0ce645a981148e8fb8c7bccd4c33c652aeffd28bf2f96d555a" dependencies = [ "fluent-bundle", "unic-langid", @@ -661,9 +687,9 @@ dependencies = [ [[package]] name = "fluent-bundle" -version = "0.15.2" +version = "0.15.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e242c601dec9711505f6d5bbff5bedd4b61b2469f2e8bb8e57ee7c9747a87ffd" +checksum = "7fe0a21ee80050c678013f82edf4b705fe2f26f1f9877593d13198612503f493" dependencies = [ "fluent-langneg", "fluent-syntax", @@ -686,9 +712,9 @@ dependencies = [ [[package]] name = "fluent-syntax" -version = "0.11.0" +version = "0.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c0abed97648395c902868fee9026de96483933faa54ea3b40d652f7dfe61ca78" +checksum = "2a530c4694a6a8d528794ee9bbd8ba0122e779629ac908d15ad5a7ae7763a33d" dependencies = [ "thiserror", ] @@ -787,7 +813,7 @@ checksum = "87750cf4b7a4c0625b1529e4c543c2182106e4dedc60a2a6455e00d212c489ac" dependencies = [ "proc-macro2", "quote", - "syn 2.0.60", + "syn 2.0.65", ] [[package]] @@ -832,9 +858,9 @@ dependencies = [ [[package]] name = "getrandom" -version = "0.2.14" +version = "0.2.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "94b22e06ecb0110981051723910cbf0b5f5e09a2062dd7663334ee79a9d1286c" +checksum = "c4567c8db10ae91089c99af84c68c38da3ec2f087c3f82960bcdbf3656b6f4d7" dependencies = [ "cfg-if", "libc", @@ -865,7 +891,7 @@ dependencies = [ "log", "proc-macro2", "quote", - "syn 2.0.60", + "syn 2.0.65", "time", ] @@ -884,9 +910,9 @@ dependencies = [ [[package]] name = "hashbrown" -version = "0.14.3" +version = "0.14.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "290f1a1d9242c78d09ce40a5e87e7554ee637af1351968159f4952f028f75604" +checksum = "e5274423e17b7c9fc20b6e7e208532f9b19825d82dfd615708b70edd83df41f1" dependencies = [ "ahash", "allocator-api2", @@ -941,7 +967,7 @@ dependencies = [ "serde", "serde_derive", "thiserror", - "toml 0.8.12", + "toml 0.8.13", "unic-langid", ] @@ -983,7 +1009,7 @@ dependencies = [ "proc-macro2", "quote", "strsim", - "syn 2.0.60", + "syn 2.0.65", "unic-langid", ] @@ -997,7 +1023,7 @@ dependencies = [ "i18n-config", "proc-macro2", "quote", - "syn 2.0.60", + "syn 2.0.65", ] [[package]] @@ -1044,9 +1070,9 @@ dependencies = [ [[package]] name = "insta" -version = "1.38.0" +version = "1.39.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3eab73f58e59ca6526037208f0e98851159ec1633cf17b6cd2e1f2c3fd5d53cc" +checksum = "810ae6042d48e2c9e9215043563a58a80b877bc863228a74cf10c49d4620a6f5" dependencies = [ "console", "lazy_static", @@ -1069,18 +1095,18 @@ dependencies = [ [[package]] name = "instant" -version = "0.1.12" +version = "0.1.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a5bbe824c507c5da5956355e86a746d82e0e1464f65d862cc5e71da70e94b2c" +checksum = "e0242819d153cba4b4b05a5a8f2a7e9bbf97b6055b2a002b395c96b5ff3c0222" dependencies = [ "cfg-if", ] [[package]] name = "intl-memoizer" -version = "0.5.1" +version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c310433e4a310918d6ed9243542a6b83ec1183df95dff8f23f87bb88a264a66f" +checksum = "fe22e020fce238ae18a6d5d8c502ee76a52a6e880d99477657e6acc30ec57bda" dependencies = [ "type-map", "unic-langid", @@ -1118,12 +1144,12 @@ dependencies = [ [[package]] name = "junction" -version = "1.0.0" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca39ef0d69b18e6a2fd14c2f0a1d593200f4a4ed949b240b5917ab51fac754cb" +checksum = "1c9c415a9b7b1e86cd5738f39d34c9e78c765da7fb1756dbd7d31b3b0d2e7afa" dependencies = [ "scopeguard", - "winapi", + "windows-sys 0.52.0", ] [[package]] @@ -1134,9 +1160,9 @@ checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" [[package]] name = "libc" -version = "0.2.153" +version = "0.2.155" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c198f91728a82281a64e1f4f9eeb25d82cb32a5de251c6bd1b5154d63a8e7bd" +checksum = "97b3888a4aecf77e811145cadf6eef5901f4782c53886191b2f693f24761847c" [[package]] name = "libz-sys" @@ -1169,15 +1195,15 @@ checksum = "0717cef1bc8b636c6e1c1bbdefc09e6322da8a9321966e8928ef80d20f7f770f" [[package]] name = "linux-raw-sys" -version = "0.4.13" +version = "0.4.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "01cda141df6706de531b6c46c3a33ecca755538219bd484262fa09410c13539c" +checksum = "78b3ae25bc7c8c38cec158d1f2757ee79e9b3740fbc7ccf0e59e4b08d793fa89" [[package]] name = "lock_api" -version = "0.4.11" +version = "0.4.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c168f8615b12bc01f9c17e2eb0cc07dcae1940121185446edc3744920e8ef45" +checksum = "07af8b9cdd281b7915f413fa73f29ebd5d55d0d3f0155584dade1ff18cea1b17" dependencies = [ "autocfg", "scopeguard", @@ -1191,13 +1217,13 @@ checksum = "90ed8c1e510134f979dbc4f070f87d4313098b704861a105fe34231c70a3901c" [[package]] name = "mailparse" -version = "0.14.1" +version = "0.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2d096594926cab442e054e047eb8c1402f7d5b2272573b97ba68aa40629f9757" +checksum = "3da03d5980411a724e8aaf7b61a7b5e386ec55a7fb49ee3d0ff79efc7e5e7c7e" dependencies = [ "charset", "data-encoding", - "quoted_printable 0.5.0", + "quoted_printable", ] [[package]] @@ -1224,9 +1250,9 @@ checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" [[package]] name = "miniz_oxide" -version = "0.7.2" +version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d811f3e15f28568be3407c8e7fdb6514c1cda3cb30683f15b6a1a1dc4ea14a7" +checksum = "87dfd01fe195c66b572b37921ad8803d010623c0aca821bea2302239d155cdae" dependencies = [ "adler", ] @@ -1248,7 +1274,7 @@ dependencies = [ "target-lexicon", "tempfile", "thiserror", - "toml 0.8.12", + "toml 0.8.13", "tracing", "unscanny", "ureq", @@ -1340,9 +1366,9 @@ dependencies = [ [[package]] name = "parking_lot" -version = "0.12.1" +version = "0.12.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3742b2c103b9f06bc9fff0a37ff4912935851bee6d36f3c02bcc755bcfec228f" +checksum = "7e4af0ca4f6caed20e900d564c242b8e5d4903fdacf31d3daf527b66fe6f42fb" dependencies = [ "lock_api", "parking_lot_core", @@ -1350,15 +1376,15 @@ dependencies = [ [[package]] name = "parking_lot_core" -version = "0.9.9" +version = "0.9.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c42a9226546d68acdd9c0a280d17ce19bfe27a46bf68784e4066115788d008e" +checksum = "1e401f977ab385c9e4e3ab30627d6f26d00e2c73eef317493c4ec6d468726cf8" dependencies = [ "cfg-if", "libc", - "redox_syscall", + "redox_syscall 0.5.1", "smallvec", - "windows-targets 0.48.5", + "windows-targets 0.52.5", ] [[package]] @@ -1428,7 +1454,7 @@ checksum = "2f38a4412a78282e09a2cf38d195ea5420d15ba0602cb375210efbc877243965" dependencies = [ "proc-macro2", "quote", - "syn 2.0.60", + "syn 2.0.65", ] [[package]] @@ -1510,9 +1536,9 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.81" +version = "1.0.83" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d1597b0c024618f09a9c3b8655b7e430397a36d23fdafec26d6965e9eec3eba" +checksum = "0b33eb56c327dec362a9e55b3ad14f9d2f0904fb5a5b03b513ab5465399e9f43" dependencies = [ "unicode-ident", ] @@ -1528,9 +1554,9 @@ dependencies = [ [[package]] name = "python-pkginfo" -version = "0.6.0" +version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "037469c164f08c891bf6d69ca02f1d56210011451e229618669777df82124cfa" +checksum = "85f2c5f010e6a63cabc4abcd60d8a61f8f8c450ac60ff0f4ae32a23b2c17d626" dependencies = [ "flate2", "fs-err", @@ -1539,7 +1565,7 @@ dependencies = [ "serde", "tar", "thiserror", - "zip", + "zip 1.3.0", ] [[package]] @@ -1551,12 +1577,6 @@ dependencies = [ "proc-macro2", ] -[[package]] -name = "quoted_printable" -version = "0.4.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a3866219251662ec3b26fc217e3e05bf9c4f84325234dfb96bf0bf840889e49" - [[package]] name = "quoted_printable" version = "0.5.0" @@ -1602,6 +1622,15 @@ dependencies = [ "bitflags 1.3.2", ] +[[package]] +name = "redox_syscall" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "469052894dcb553421e483e4209ee581a45100d31b4018de03e5a7ad86374a7e" +dependencies = [ + "bitflags 2.5.0", +] + [[package]] name = "regex" version = "1.10.4" @@ -1642,15 +1671,15 @@ dependencies = [ [[package]] name = "rfc2047-decoder" -version = "0.2.2" +version = "1.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61fc4b4e52897c3e30b12b7e9b04461215b647fbe66f6def60dd8edbce14ec2e" +checksum = "e90a668c463c412c3118ae1883e18b53d812c349f5af7a06de3ba4bb0c17cc73" dependencies = [ "base64 0.21.7", "charset", "chumsky", "memchr", - "quoted_printable 0.4.8", + "quoted_printable", "thiserror", ] @@ -1671,9 +1700,9 @@ dependencies = [ [[package]] name = "rust-embed" -version = "8.3.0" +version = "8.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fb78f46d0066053d16d4ca7b898e9343bc3530f71c61d5ad84cd404ada068745" +checksum = "19549741604902eb99a7ed0ee177a0663ee1eda51a29f71401f166e47e77806a" dependencies = [ "rust-embed-impl", "rust-embed-utils", @@ -1682,22 +1711,22 @@ dependencies = [ [[package]] name = "rust-embed-impl" -version = "8.3.0" +version = "8.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b91ac2a3c6c0520a3fb3dd89321177c3c692937c4eb21893378219da10c44fc8" +checksum = "cb9f96e283ec64401f30d3df8ee2aaeb2561f34c824381efa24a35f79bf40ee4" dependencies = [ "proc-macro2", "quote", "rust-embed-utils", - "syn 2.0.60", + "syn 2.0.65", "walkdir", ] [[package]] name = "rust-embed-utils" -version = "8.3.0" +version = "8.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "86f69089032567ffff4eada41c573fc43ff466c7db7c5688b2e7969584345581" +checksum = "38c74a686185620830701348de757fd36bef4aa9680fd23c49fc539ddcc1af32" dependencies = [ "sha2", "walkdir", @@ -1705,9 +1734,9 @@ dependencies = [ [[package]] name = "rustc-demangle" -version = "0.1.23" +version = "0.1.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d626bb9dae77e28219937af045c257c28bfd3f69333c512553507f5f9798cb76" +checksum = "719b953e2095829ee67db738b3bfa9fa368c94900df327b3f07fe6e794d2fe1f" [[package]] name = "rustc-hash" @@ -1753,15 +1782,15 @@ dependencies = [ [[package]] name = "rustls-pki-types" -version = "1.5.0" +version = "1.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "beb461507cee2c2ff151784c52762cf4d9ff6a61f3e80968600ed24fa837fa54" +checksum = "976295e77ce332211c0d24d92c0e83e50f5c5f046d11082cea19f3df13a3562d" [[package]] name = "rustls-webpki" -version = "0.102.3" +version = "0.102.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f3bce581c0dd41bce533ce695a1437fa16a7ab5ac3ccfa99fe1a620a7885eabf" +checksum = "ff448f7e92e913c4b7d4c6d8e4540a1724b319b4152b8aef6d4cf8339712b33e" dependencies = [ "ring", "rustls-pki-types", @@ -1770,7 +1799,7 @@ dependencies = [ [[package]] name = "rye" -version = "0.34.0" +version = "0.37.0" dependencies = [ "age", "anyhow", @@ -1820,15 +1849,15 @@ dependencies = [ "winapi", "winreg", "xattr", - "zip", + "zip 0.6.6", "zstd", ] [[package]] name = "ryu" -version = "1.0.17" +version = "1.0.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e86697c916019a8588c99b5fac3cead74ec0b4b819707a682fd4d23fa0ce1ba1" +checksum = "f3cb5ba0dc43242ce17de99c180e96db90b235b8a9fdc9543c96d2209116bd9f" [[package]] name = "salsa20" @@ -1900,46 +1929,46 @@ version = "0.10.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e14e4d63b804dc0c7ec4a1e52bcb63f02c7ac94476755aa579edac21e01f915d" dependencies = [ - "self_cell 1.0.3", + "self_cell 1.0.4", ] [[package]] name = "self_cell" -version = "1.0.3" +version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "58bf37232d3bb9a2c4e641ca2a11d83b5062066f88df7fed36c28772046d65ba" +checksum = "d369a96f978623eb3dc28807c4852d6cc617fed53da5d3c400feff1ef34a714a" [[package]] name = "semver" -version = "1.0.22" +version = "1.0.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "92d43fe69e652f3df9bdc2b85b2854a0825b86e4fb76bc44d945137d053639ca" +checksum = "61697e0a1c7e512e84a621326239844a24d8207b4669b41bc18b32ea5cbf988b" [[package]] name = "serde" -version = "1.0.198" +version = "1.0.202" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9846a40c979031340571da2545a4e5b7c4163bdae79b301d5f86d03979451fcc" +checksum = "226b61a0d411b2ba5ff6d7f73a476ac4f8bb900373459cd00fab8512828ba395" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.198" +version = "1.0.202" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e88edab869b01783ba905e7d0153f9fc1a6505a96e4ad3018011eedb838566d9" +checksum = "6048858004bcff69094cd972ed40a32500f153bd3be9f716b2eed2e8217c4838" dependencies = [ "proc-macro2", "quote", - "syn 2.0.60", + "syn 2.0.65", ] [[package]] name = "serde_json" -version = "1.0.116" +version = "1.0.117" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3e17db7126d17feb94eb3fad46bf1a96b034e8aacbc2e775fe81505f8b0b2813" +checksum = "455182ea6142b14f93f4bc5320a2b31c1f266b66a4a5c858b013302a5d8cbfc3" dependencies = [ "itoa", "ryu", @@ -1948,9 +1977,9 @@ dependencies = [ [[package]] name = "serde_spanned" -version = "0.6.5" +version = "0.6.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eb3622f419d1296904700073ea6cc23ad690adbd66f13ea683df73298736f0c1" +checksum = "79e674e01f999af37c49f70a6ede167a8a60b2503e56c5599532a65baa5969a0" dependencies = [ "serde", ] @@ -2011,9 +2040,9 @@ checksum = "3c5e1a9a646d36c3599cd173a41282daf47c44583ad367b8e6837255952e5c67" [[package]] name = "socket2" -version = "0.5.6" +version = "0.5.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05ffd9c0a93b7543e062e759284fcf5f5e3b098501104bfbdde4d404db792871" +checksum = "ce305eb0b4296696835b71df73eb912e0f1ffd2556a501fcede6e0c50349191c" dependencies = [ "libc", "windows-sys 0.52.0", @@ -2068,9 +2097,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.60" +version = "2.0.65" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "909518bc7b1c9b779f1bbf07f2929d35af9f0f37e47c6e9ef7f9dddc1e1821f3" +checksum = "d2863d96a84c6439701d7a38f9de935ec562c8832cc55d1dde0f513b52fad106" dependencies = [ "proc-macro2", "quote", @@ -2101,7 +2130,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "85b77fafb263dd9d05cbeac119526425676db3784113aa9295c88498cbf8bff1" dependencies = [ "cfg-if", - "fastrand 2.0.2", + "fastrand 2.1.0", "rustix", "windows-sys 0.52.0", ] @@ -2118,22 +2147,22 @@ dependencies = [ [[package]] name = "thiserror" -version = "1.0.59" +version = "1.0.61" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f0126ad08bff79f29fc3ae6a55cc72352056dfff61e3ff8bb7129476d44b23aa" +checksum = "c546c80d6be4bc6a00c0f01730c08df82eaa7a7a61f11d656526506112cc1709" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.59" +version = "1.0.61" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d1cd413b5d558b4c5bf3680e324a6fa5014e7b7c067a51e69dbdf47eb7148b66" +checksum = "46c3384250002a6d5af4d114f2845d37b57521033f30d5c3f46c4d70e1197533" dependencies = [ "proc-macro2", "quote", - "syn 2.0.60", + "syn 2.0.65", ] [[package]] @@ -2202,9 +2231,9 @@ dependencies = [ [[package]] name = "toml" -version = "0.8.12" +version = "0.8.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e9dd1545e8208b4a5af1aa9bbd0b4cf7e9ea08fabc5d0a5c67fcaafa17433aa3" +checksum = "a4e43f8cc456c9704c851ae29c67e17ef65d2c30017c17a9765b89c382dc8bba" dependencies = [ "serde", "serde_spanned", @@ -2214,18 +2243,18 @@ dependencies = [ [[package]] name = "toml_datetime" -version = "0.6.5" +version = "0.6.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3550f4e9685620ac18a50ed434eb3aec30db8ba93b0287467bca5826ea25baf1" +checksum = "4badfd56924ae69bcc9039335b2e017639ce3f9b001c393c1b2d1ef846ce2cbf" dependencies = [ "serde", ] [[package]] name = "toml_edit" -version = "0.22.12" +version = "0.22.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3328d4f68a705b2a4498da1d580585d39a6510f98318a2cec3018a7ec61ddef" +checksum = "c127785850e8c20836d49732ae6abfa47616e60bf9d9f57c43c250361a9db96c" dependencies = [ "indexmap", "serde", @@ -2254,7 +2283,7 @@ checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.60", + "syn 2.0.65", ] [[package]] @@ -2268,9 +2297,9 @@ dependencies = [ [[package]] name = "type-map" -version = "0.4.0" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6d3364c5e96cb2ad1603037ab253ddd34d7fb72a58bdddf4b7350760fc69a46" +checksum = "deb68604048ff8fa93347f02441e4487594adc20bb8a084f9e564d2b827a0a9f" dependencies = [ "rustc-hash", ] @@ -2283,18 +2312,18 @@ checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825" [[package]] name = "unic-langid" -version = "0.9.4" +version = "0.9.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "238722e6d794ed130f91f4ea33e01fcff4f188d92337a21297892521c72df516" +checksum = "23dd9d1e72a73b25e07123a80776aae3e7b0ec461ef94f9151eed6ec88005a44" dependencies = [ "unic-langid-impl", ] [[package]] name = "unic-langid-impl" -version = "0.9.4" +version = "0.9.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4bd55a2063fdea4ef1f8633243a7b0524cbeef1905ae04c31a1c9b9775c55bc6" +checksum = "0a5422c1f65949306c99240b81de9f3f15929f5a8bfe05bb44b034cc8bf593e5" dependencies = [ "serde", "tinystr", @@ -2329,9 +2358,9 @@ checksum = "d4c87d22b6e3f4a18d4d40ef354e97c90fcb14dd91d7dc0aa9d8a1172ebf7202" [[package]] name = "unicode-width" -version = "0.1.11" +version = "0.1.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e51733f11c9c4f72aa0c160008246859e340b00807569a0da0e7a1079b27ba85" +checksum = "68f5e5f3158ecfd4b8ff6fe086db7c8467a2dfdac97fe420f2b7c4aa97af66d6" [[package]] name = "universal-hash" @@ -2357,11 +2386,11 @@ checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1" [[package]] name = "ureq" -version = "2.9.6" +version = "2.9.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "11f214ce18d8b2cbe84ed3aa6486ed3f5b285cf8d8fbdbce9f3f767a724adc35" +checksum = "d11a831e3c0b56e438a28308e7c810799e3c118417f342d30ecec080105395cd" dependencies = [ - "base64 0.21.7", + "base64 0.22.1", "flate2", "log", "once_cell", @@ -2435,7 +2464,7 @@ dependencies = [ "once_cell", "proc-macro2", "quote", - "syn 2.0.60", + "syn 2.0.65", "wasm-bindgen-shared", ] @@ -2457,7 +2486,7 @@ checksum = "e94f17b526d0a461a191c78ea52bbce64071ed5c04c9ffe424dcb38f74171bb7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.60", + "syn 2.0.65", "wasm-bindgen-backend", "wasm-bindgen-shared", ] @@ -2507,9 +2536,9 @@ checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" [[package]] name = "winapi-util" -version = "0.1.7" +version = "0.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "134306a13c5647ad6453e8deaec55d3a44d6021970129e6188735e74bf546697" +checksum = "4d4cc384e1e73b93bafa6fb4f1df8c41695c8a91cf9c4c64358067d15a7b6c6b" dependencies = [ "windows-sys 0.52.0", ] @@ -2661,9 +2690,9 @@ checksum = "bec47e5bfd1bff0eeaf6d8b485cc1074891a197ab4225d504cb7a1ab88b02bf0" [[package]] name = "winnow" -version = "0.6.6" +version = "0.6.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f0c976aaaa0e1f90dbb21e9587cdaf1d9679a1cde8875c0d6bd83ab96a208352" +checksum = "c3c52e9c97a68071b23e836c9380edae937f17b9c4667bd021973efc689f618d" dependencies = [ "memchr", ] @@ -2709,29 +2738,29 @@ dependencies = [ [[package]] name = "zerocopy" -version = "0.7.32" +version = "0.7.34" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "74d4d3961e53fa4c9a25a8637fc2bfaf2595b3d3ae34875568a5cf64787716be" +checksum = "ae87e3fcd617500e5d106f0380cf7b77f3c6092aae37191433159dda23cfb087" dependencies = [ "zerocopy-derive", ] [[package]] name = "zerocopy-derive" -version = "0.7.32" +version = "0.7.34" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ce1b18ccd8e73a9321186f97e46f9f04b778851177567b1975109d26a08d2a6" +checksum = "15e934569e47891f7d9411f1a451d947a60e000ab3bd24fbb970f000387d1b3b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.60", + "syn 2.0.65", ] [[package]] name = "zeroize" -version = "1.8.0" +version = "1.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "63381fa6624bf92130a6b87c0d07380116f80b565c42cf0d754136f0238359ef" +checksum = "525b4ec142c6b68a2d10f01f7bbf6755599ca3f81ea53b8431b7dd348f5fdb2d" dependencies = [ "zeroize_derive", ] @@ -2744,7 +2773,7 @@ checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" dependencies = [ "proc-macro2", "quote", - "syn 2.0.60", + "syn 2.0.65", ] [[package]] @@ -2754,10 +2783,25 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "760394e246e4c28189f19d488c058bf16f564016aefac5d32bb1f3b51d5e9261" dependencies = [ "byteorder", + "crc32fast", + "crossbeam-utils", + "flate2", +] + +[[package]] +name = "zip" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f1f4a27345eb6f7aa7bd015ba7eb4175fa4e1b462a29874b779e0bbcf96c6ac7" +dependencies = [ + "arbitrary", "bzip2", "crc32fast", "crossbeam-utils", + "displaydoc", "flate2", + "indexmap", + "thiserror", "time", ] diff --git a/README.md b/README.md index 0b3929bfc4..b38b6d8ef8 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ ----
-[![Rye](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/rye/main/artwork/badge.json)](https://rye-up.com) +[![Rye](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/rye/main/artwork/badge.json)](https://rye.astral.sh) [![](https://dcbadge.vercel.app/api/server/drbkcdtSbg?style=flat)](https://discord.gg/drbkcdtSbg)
@@ -47,21 +47,21 @@ The installation takes just a minute: * **Linux and macOS:** ``` - curl -sSf https://rye-up.com/get | bash + curl -sSf https://rye.astral.sh/get | bash ``` * **Windows:** - Download and run the installer ([64bit Intel](https://github.com/astral-sh/rye/releases/latest/download/rye-x86_64-windows.exe) or [32bit Intel](https://github.com/astral-sh/rye/releases/latest/download/rye-x86-windows.exe)). + Download and run the installer ([64-bit (x86-64)](https://github.com/astral-sh/rye/releases/latest/download/rye-x86_64-windows.exe) or [32-bit (x86)](https://github.com/astral-sh/rye/releases/latest/download/rye-x86-windows.exe)). -For more details and other options, refer to the [installation instructions](https://rye-up.com/guide/installation/). +For more details and other options, refer to the [installation instructions](https://rye.astral.sh/guide/installation/). ## Learn More Did I spark your interest? -* [Visit the Website](https://rye-up.com/) -* [Read the Documentation](https://rye-up.com/guide/) +* [Visit the Website](https://rye.astral.sh/) +* [Read the Documentation](https://rye.astral.sh/guide/) * [Report Problems in the Issue Tracker](https://github.com/astral-sh/rye/issues) ## More @@ -70,5 +70,5 @@ Did I spark your interest? on GitHub * [Discord](https://discord.gg/drbkcdtSbg), for conversations with other developers in text form * [Issue Tracker](https://github.com/astral-sh/rye/issues), if you run into bugs or have suggestions -* [Badges](https://rye-up.com/community/#badges), if you want to show that you use Rye +* [Badges](https://rye.astral.sh/community/#badges), if you want to show that you use Rye * License: MIT diff --git a/docs/.includes/curl-to-bash-options.md b/docs/.includes/curl-to-bash-options.md index 9fec62be05..9c67a60039 100644 --- a/docs/.includes/curl-to-bash-options.md +++ b/docs/.includes/curl-to-bash-options.md @@ -14,5 +14,5 @@ variables: This for instance installs a specific version of Rye without asking questions: ```bash -curl -sSf https://rye-up.com/get | RYE_VERSION="0.4.0" RYE_INSTALL_OPTION="--yes" bash +curl -sSf https://rye.astral.sh/get | RYE_VERSION="0.4.0" RYE_INSTALL_OPTION="--yes" bash ``` \ No newline at end of file diff --git a/docs/.includes/quick-install.md b/docs/.includes/quick-install.md index 1ae5b317b0..383c9116b6 100644 --- a/docs/.includes/quick-install.md +++ b/docs/.includes/quick-install.md @@ -4,14 +4,14 @@ operating system and CPU architecture and install it: ```bash - curl -sSf https://rye-up.com/get | bash + curl -sSf https://rye.astral.sh/get | bash ``` Alternatively if you don't trust this approach, you can download the latest release binary. On first run it will install itself. - * [rye-x86_64-linux.gz](https://github.com/astral-sh/rye/releases/latest/download/rye-x86_64-linux.gz) for 64bit Intel computers - * [rye-aarch64-linux.gz](https://github.com/astral-sh/rye/releases/latest/download/rye-aarch64-linux.gz) for 64bit ARM computers + * [rye-x86_64-linux.gz](https://github.com/astral-sh/rye/releases/latest/download/rye-x86_64-linux.gz) Intel/AMD (x86-64). + * [rye-aarch64-linux.gz](https://github.com/astral-sh/rye/releases/latest/download/rye-aarch64-linux.gz) for ARM64. ```bash gunzip rye-x86_64-linux.gz @@ -25,14 +25,14 @@ operating system and CPU architecture and install it: ```bash - curl -sSf https://rye-up.com/get | bash + curl -sSf https://rye.astral.sh/get | bash ``` Alternatively if you don't trust this approach, you can download the latest release binary. On first run it will install itself. - * [rye-aarch64-macos.gz](https://github.com/astral-sh/rye/releases/latest/download/rye-aarch64-macos.gz) for M1/M2 Macs - * [rye-x86_64-macos.gz](https://github.com/astral-sh/rye/releases/latest/download/rye-x86_64-macos.gz) for Intel Macs + * [rye-aarch64-macos.gz](https://github.com/astral-sh/rye/releases/latest/download/rye-aarch64-macos.gz) for Apple Silicon (M1/M2/M3) (ARM64). + * [rye-x86_64-macos.gz](https://github.com/astral-sh/rye/releases/latest/download/rye-x86_64-macos.gz) for Intel processors (x86-64). ```bash gunzip rye-aarch64-macos.gz @@ -47,8 +47,8 @@ to have "Developer Mode" activated when using Rye and before starting the installation. [Learn more](../guide/faq.md). - * [rye-x86_64-windows.exe](https://github.com/astral-sh/rye/releases/latest/download/rye-x86_64-windows.exe) for 64bit Intel Windows - * [rye-x86-windows.exe](https://github.com/astral-sh/rye/releases/latest/download/rye-x86-windows.exe) for 32bit Intel Windows + * [rye-x86_64-windows.exe](https://github.com/astral-sh/rye/releases/latest/download/rye-x86_64-windows.exe) for 64-bit (x86-64). + * [rye-x86-windows.exe](https://github.com/astral-sh/rye/releases/latest/download/rye-x86-windows.exe) for 32-bit (x86). !!!Note diff --git a/docs/CNAME b/docs/CNAME index ced6063925..0c6d7c3fb4 100644 --- a/docs/CNAME +++ b/docs/CNAME @@ -1 +1 @@ -rye-up.com +rye.astral.sh diff --git a/docs/community.md b/docs/community.md index b82ef2bc8a..ec394f8ce0 100644 --- a/docs/community.md +++ b/docs/community.md @@ -22,21 +22,21 @@ You can also reach out [via Twitter](https://twitter.com/mitsuhiko) or Want to show that you are using Rye? Why not throw a badge into your project's `README.md`: ```md -[![Rye](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/rye/main/artwork/badge.json)](https://rye-up.com) +[![Rye](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/rye/main/artwork/badge.json)](https://rye.astral.sh) ``` ... or `README.rst`: ```rst .. image:: https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/rye/main/artwork/badge.json - :target: https://rye-up.com + :target: https://rye.astral.sh :alt: Rye ``` ... or, as HTML: ```html -Rye +Rye ``` -[![Rye](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/rye/main/artwork/badge.json)](https://rye-up.com) +[![Rye](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/rye/main/artwork/badge.json)](https://rye.astral.sh) diff --git a/docs/guide/commands/add.md b/docs/guide/commands/add.md index 816cd154a3..4c51c7a7c8 100644 --- a/docs/guide/commands/add.md +++ b/docs/guide/commands/add.md @@ -73,7 +73,7 @@ Added packagename @ file:///path/to/packagename as regular dependency * `--pre`: Include pre-releases when finding a package version -* `--pin `: Overrides the pin operator [possible values: `equal`, `tilde-equal``, `greater-than-equal``] +* `--pin `: Overrides the pin operator [possible values: `equal`, `tilde-equal`, `greater-than-equal`] * `--sync`: Runs `sync` automatically even if auto-sync is disabled. @@ -83,4 +83,4 @@ Added packagename @ file:///path/to/packagename as regular dependency * `-q, --quiet`: Turns off all output -* `-h, --help`: Print help (see a summary with '-h') \ No newline at end of file +* `-h, --help`: Print help (see a summary with `-h`) diff --git a/docs/guide/commands/build.md b/docs/guide/commands/build.md index a8dff8a1d9..46d7498031 100644 --- a/docs/guide/commands/build.md +++ b/docs/guide/commands/build.md @@ -46,7 +46,7 @@ By default you will find the artifacts in the `dist` folder. * `-o, --out `: An output directory (defaults to `workspace/dist`) -* `--pyproject `: Use this `pyproject.toml`` file +* `--pyproject `: Use this `pyproject.toml` file * `-c, --clean`: Clean the output directory first @@ -54,4 +54,4 @@ By default you will find the artifacts in the `dist` folder. * `-q, --quiet`: Turns off all output -* `-h, --help`: Print help \ No newline at end of file +* `-h, --help`: Print help diff --git a/docs/guide/commands/lock.md b/docs/guide/commands/lock.md index 374e0744b6..079f69363d 100644 --- a/docs/guide/commands/lock.md +++ b/docs/guide/commands/lock.md @@ -3,7 +3,7 @@ Updates the lockfiles without installing dependencies. Usually one would use the [`sync`](sync.md) command instead which both locks and installs dependencies. -For more information see [Synching and Locking](../sync.md). +For more information see [Syncing and Locking](../sync.md). ## Example @@ -30,6 +30,8 @@ Done! * `--all-features`: Enables all features +* `--generate-hashes`: Set to true to lock with hashes in the lockfile + * `--with-sources`: Set to true to lock with sources in the lockfile * `--pyproject `: Use this pyproject.toml file diff --git a/docs/guide/commands/sync.md b/docs/guide/commands/sync.md index f1306264cb..df85869325 100644 --- a/docs/guide/commands/sync.md +++ b/docs/guide/commands/sync.md @@ -2,7 +2,7 @@ Updates the lockfiles and installs the dependencies into the virtualenv. -For more information see [Synching and Locking](../sync.md). +For more information see [Syncing and Locking](../sync.md). ## Example @@ -53,6 +53,8 @@ To exit the sub shell run `exit`. * `--all-features`: Enables all features +* `--generate-hashes`: Set to true to lock with hashes in the lockfile + * `--with-sources`: Set to true to lock with sources in the lockfile * `--pyproject `: Use this pyproject.toml file diff --git a/docs/guide/faq.md b/docs/guide/faq.md index 9e72463b2d..b5b83482ed 100644 --- a/docs/guide/faq.md +++ b/docs/guide/faq.md @@ -92,7 +92,7 @@ the default one higher priority in the `PATH: ``` export PATH="/usr/bin:$PATH" -curl -sSf https://rye-up.com/get | bash +curl -sSf https://rye.astral.sh/get | bash ``` ## References to Build-Time Paths @@ -102,7 +102,7 @@ accommodating to portable builds there are various limitations still with this approach. One of them is that built Python distributions capture some absolute paths and other build-time configuration. These file paths are then often used by build tools to invoke C compilers. For instance you might run into a compiler -error like ``error: stdio.h: No such file or directory`` when building C +error like `error: stdio.h: No such file or directory` when building C extensions. There is no known solution to this problem today other than [registering a non portable toolchain](toolchains/index.md#registering-toolchains). @@ -133,7 +133,7 @@ due to limitations in `libedit`. In some cases though you might also discover t the backspace key does not work or arrow keys don't work as expected. This can be because the _terminfo_ database cannot be found. -For solutions to this issue, read the [behavior quirks guide](https://python-build-standalone.readthedocs.io/en/latest/quirks.html) in the +For solutions to this issue, read the [behavior quirks guide](https://gregoryszorc.com/docs/python-build-standalone/main/quirks.html) in the Standalone Python Builds documentation for solutions. ## Can I use Rye Alongside Other Python Installations? diff --git a/docs/guide/pyproject.md b/docs/guide/pyproject.md index 34db616b37..7c5a6bcc72 100644 --- a/docs/guide/pyproject.md +++ b/docs/guide/pyproject.md @@ -60,6 +60,33 @@ pulled in as indirect dependencies. These are added here automatically with `ry excluded-dependencies = ["cffi"] ``` +## `tool.rye.universal` + ++++ 0.36.0 + +When this flag is enabled all `lock` and `sync` operations in the project or workspace +operate as if `--universal` is passed. This means that the dependency resolver will +attempt to generate a resolution that's valid on all platforms, operating systems, and +architectures, rather than a resolution that's specific to the current platform. + +```toml +[tool.rye] +universal = true +``` + +## `tool.rye.generate-hashes` + ++++ 0.35.0 + +When this flag is enabled all `lock` and `sync` operations in the project or workspace +operate as if `--generate-hashes` is passed. This means that all dependencies in all +lock files will include a hash. + +```toml +[tool.rye] +generate-hashes = true +``` + ## `tool.rye.lock-with-sources` +++ 0.18.0 diff --git a/docs/guide/sources.md b/docs/guide/sources.md index cae24beb75..4371da8942 100644 --- a/docs/guide/sources.md +++ b/docs/guide/sources.md @@ -85,6 +85,9 @@ This is a [PEP 503](https://www.python.org/dev/peps/pep-0503/) type index as pro by tools such as PyPI or [devpi](https://github.com/devpi/devpi). It corresponds to the arguments `--index-url` or `--extra-index-url` in pip. +Note: see the [`uv` documentation](https://github.com/astral-sh/uv/blob/main/PIP_COMPATIBILITY.md#packages-that-exist-on-multiple-indexes) +for more on the use of multiple indexes. + ### `find-links` This is a source that can be of a variety of types and has to point to a file path diff --git a/docs/guide/toolchains/cpython.md b/docs/guide/toolchains/cpython.md index b676b6d609..e78bdade18 100644 --- a/docs/guide/toolchains/cpython.md +++ b/docs/guide/toolchains/cpython.md @@ -37,8 +37,8 @@ The following changes to a regular Python versions you should be aware of: Additionally due to how these builds are created, there are some other quirks you might run into related to terminal support or TKinter. Some of these -issues are collected in the [FAQ](../faq.md). Additionally the Python -Standalone Builds have a [Behavior Quirks](https://python-build-standalone.readthedocs.io/en/latest/quirks.html) +issues are collected in the [FAQ](../faq.md). Additionally, the Python +Standalone Builds have a [Behavior Quirks](https://gregoryszorc.com/docs/python-build-standalone/main/quirks.html) page. ## Sources diff --git a/docs/guide/virtual.md b/docs/guide/virtual.md index ee0533db13..133ae885c9 100644 --- a/docs/guide/virtual.md +++ b/docs/guide/virtual.md @@ -18,11 +18,11 @@ rye run mkdocs ``` This will create a `pyproject.toml` but does not actually declare any python code itself. -Yet when synching you will end up with mkdocs in your project. +Yet when syncing you will end up with mkdocs in your project. ## Behavior Changes -When synching the project itself is never installed into the virtualenv as it's not +When syncing the project itself is never installed into the virtualenv as it's not considered to be a valid package. Likewise you cannot publish virtual packages to PyPI or another index. diff --git a/requirements-dev.lock b/requirements-dev.lock index df89841004..70c818ffe0 100644 --- a/requirements-dev.lock +++ b/requirements-dev.lock @@ -6,17 +6,18 @@ # features: [] # all-features: false # with-sources: false +# generate-hashes: false -e file:rye-devtools -anyio==4.2.0 +anyio==4.4.0 # via httpx -certifi==2023.5.7 +certifi==2024.6.2 # via httpcore # via httpx # via requests -charset-normalizer==3.1.0 +charset-normalizer==3.3.2 # via requests -click==8.1.3 +click==8.1.7 # via mkdocs colorama==0.4.6 # via mkdocs-material @@ -24,17 +25,17 @@ ghp-import==2.1.0 # via mkdocs h11==0.14.0 # via httpcore -httpcore==1.0.2 +httpcore==1.0.5 # via httpx -httpx==0.26.0 +httpx==0.27.0 # via rye-devtools -idna==3.4 +idna==3.7 # via anyio # via httpx # via requests iniconfig==2.0.0 # via pytest -jinja2==3.1.2 +jinja2==3.1.4 # via mkdocs # via mkdocs-material markdown==3.3.7 @@ -42,50 +43,50 @@ markdown==3.3.7 # via mkdocs # via mkdocs-material # via pymdown-extensions -markupsafe==2.1.2 +markupsafe==2.1.5 # via jinja2 -mdx-gh-links==0.3 +mdx-gh-links==0.4 mergedeep==1.3.4 # via mkdocs mkdocs==1.4.3 # via mkdocs-material # via mkdocs-simple-hooks mkdocs-include-markdown-plugin==4.0.4 -mkdocs-material==9.1.12 -mkdocs-material-extensions==1.1.1 +mkdocs-material==9.1.20 +mkdocs-material-extensions==1.3.1 # via mkdocs-material mkdocs-simple-hooks==0.1.5 mkdocs-version-annotations==1.0.0 -packaging==23.1 +packaging==24.1 # via mkdocs # via pytest -pluggy==1.4.0 +pluggy==1.5.0 # via pytest -pygments==2.15.1 +pygments==2.18.0 # via mkdocs-material pymdown-extensions==9.11 # via mkdocs-material pytest==8.0.2 -python-dateutil==2.8.2 +python-dateutil==2.9.0.post0 # via ghp-import -pyyaml==6.0 +pyyaml==6.0.1 # via mkdocs # via pymdown-extensions # via pyyaml-env-tag pyyaml-env-tag==0.1 # via mkdocs -regex==2023.5.5 +regex==2024.5.15 # via mkdocs-material -requests==2.31.0 +requests==2.32.3 # via mkdocs-material six==1.16.0 # via python-dateutil -sniffio==1.3.0 +sniffio==1.3.1 # via anyio # via httpx socksio==1.0.0 # via httpx -urllib3==2.0.2 +urllib3==2.2.2 # via requests -watchdog==3.0.0 +watchdog==4.0.1 # via mkdocs diff --git a/requirements.lock b/requirements.lock index c18881bfc2..c2cd892a2d 100644 --- a/requirements.lock +++ b/requirements.lock @@ -6,17 +6,18 @@ # features: [] # all-features: false # with-sources: false +# generate-hashes: false -e file:rye-devtools -anyio==4.2.0 +anyio==4.4.0 # via httpx -certifi==2023.5.7 +certifi==2024.6.2 # via httpcore # via httpx # via requests -charset-normalizer==3.1.0 +charset-normalizer==3.3.2 # via requests -click==8.1.3 +click==8.1.7 # via mkdocs colorama==0.4.6 # via mkdocs-material @@ -24,15 +25,15 @@ ghp-import==2.1.0 # via mkdocs h11==0.14.0 # via httpcore -httpcore==1.0.2 +httpcore==1.0.5 # via httpx -httpx==0.26.0 +httpx==0.27.0 # via rye-devtools -idna==3.4 +idna==3.7 # via anyio # via httpx # via requests -jinja2==3.1.2 +jinja2==3.1.4 # via mkdocs # via mkdocs-material markdown==3.3.7 @@ -40,46 +41,46 @@ markdown==3.3.7 # via mkdocs # via mkdocs-material # via pymdown-extensions -markupsafe==2.1.2 +markupsafe==2.1.5 # via jinja2 -mdx-gh-links==0.3 +mdx-gh-links==0.4 mergedeep==1.3.4 # via mkdocs mkdocs==1.4.3 # via mkdocs-material # via mkdocs-simple-hooks mkdocs-include-markdown-plugin==4.0.4 -mkdocs-material==9.1.12 -mkdocs-material-extensions==1.1.1 +mkdocs-material==9.1.20 +mkdocs-material-extensions==1.3.1 # via mkdocs-material mkdocs-simple-hooks==0.1.5 mkdocs-version-annotations==1.0.0 -packaging==23.1 +packaging==24.1 # via mkdocs -pygments==2.15.1 +pygments==2.18.0 # via mkdocs-material pymdown-extensions==9.11 # via mkdocs-material -python-dateutil==2.8.2 +python-dateutil==2.9.0.post0 # via ghp-import -pyyaml==6.0 +pyyaml==6.0.1 # via mkdocs # via pymdown-extensions # via pyyaml-env-tag pyyaml-env-tag==0.1 # via mkdocs -regex==2023.5.5 +regex==2024.5.15 # via mkdocs-material -requests==2.31.0 +requests==2.32.3 # via mkdocs-material six==1.16.0 # via python-dateutil -sniffio==1.3.0 +sniffio==1.3.1 # via anyio # via httpx socksio==1.0.0 # via httpx -urllib3==2.0.2 +urllib3==2.2.2 # via requests -watchdog==3.0.0 +watchdog==4.0.1 # via mkdocs diff --git a/rye-devtools/src/rye_devtools/find_uv_downloads.py b/rye-devtools/src/rye_devtools/find_uv_downloads.py index bc355a348b..15d3f7b87d 100644 --- a/rye-devtools/src/rye_devtools/find_uv_downloads.py +++ b/rye-devtools/src/rye_devtools/find_uv_downloads.py @@ -35,9 +35,15 @@ class UvDownloads: "aarch64": "aarch64", } + GLIBC = { + "x86_64": "gnu", + "i686": "gnu", + "aarch64": "musl", + } + PLATFORM_ENV = { "unknown-linux-gnu": ("linux", "gnu"), - # "unknown-linux-musl": ("linux", "musl"), + "unknown-linux-musl": ("linux", "musl"), "apple-darwin": ("macos", None), "pc-windows-msvc": ("windows", None), } @@ -81,9 +87,10 @@ def parse_triple(cls, url: str) -> PlatformTriple | None: if arch_str in cls.ARCH and plat_env_str in cls.PLATFORM_ENV: arch = cls.ARCH[arch_str] plat, env = cls.PLATFORM_ENV[plat_env_str] - return PlatformTriple( - arch=arch, platform=plat, environment=env, flavor=None - ) + if env is None or env == cls.GLIBC[arch_str]: + return PlatformTriple( + arch=arch, platform=plat, environment=env, flavor=None + ) return None @@ -125,8 +132,6 @@ async def async_main(): "Authorization": "Bearer " + token, } - downloads = [] - log("Fetching all uv downloads.") async with httpx.AsyncClient(follow_redirects=True, headers=headers) as client: finder = UvDownloads(client) diff --git a/rye/Cargo.toml b/rye/Cargo.toml index 204f3006d1..2194a97456 100644 --- a/rye/Cargo.toml +++ b/rye/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "rye" -version = "0.34.0" +version = "0.37.0" edition = "2021" license = "MIT" @@ -60,7 +60,7 @@ dotenvy = "0.15.7" xattr = "1.3.1" [target."cfg(windows)".dependencies] -winapi = { version = "0.3.9", default-features = false, features = ["winuser"] } +winapi = { version = "0.3.9", default-features = false, features = ["winuser", "winioctl", "ioapiset"] } winreg = "0.52.0" [target."cfg(windows)".build-dependencies] diff --git a/rye/src/bootstrap.rs b/rye/src/bootstrap.rs index 7efed5d2f2..da001ea343 100644 --- a/rye/src/bootstrap.rs +++ b/rye/src/bootstrap.rs @@ -33,9 +33,9 @@ pub const SELF_PYTHON_TARGET_VERSION: PythonVersionRequest = PythonVersionReques suffix: None, }; -const SELF_VERSION: u64 = 18; +const SELF_VERSION: u64 = 21; -const SELF_REQUIREMENTS: &str = r#" +pub const SELF_REQUIREMENTS: &str = r#" build==1.2.1 certifi==2024.2.2 charset-normalizer==3.3.2 @@ -48,11 +48,11 @@ platformdirs==4.0.0 pyproject_hooks==1.0.0 requests==2.31.0 tomli==2.0.1 -twine==4.0.2 +twine==5.1.1 unearth==0.14.0 urllib3==2.0.7 virtualenv==20.25.0 -ruff==0.3.0 +ruff==0.5.4 "#; static FORCED_TO_UPDATE: AtomicBool = AtomicBool::new(false); @@ -618,6 +618,6 @@ fn validate_shared_libraries(py: &Path) -> Result<(), Error> { } bail!( "Python installation is unable to run on this machine due to missing libraries.\n\ - Visit https://rye-up.com/guide/faq/#missing-shared-libraries-on-linux for next steps." + Visit https://rye.astral.sh/guide/faq/#missing-shared-libraries-on-linux for next steps." ); } diff --git a/rye/src/cli/add.rs b/rye/src/cli/add.rs index 3e357c9b0b..9fa56f2ad2 100644 --- a/rye/src/cli/add.rs +++ b/rye/src/cli/add.rs @@ -208,15 +208,9 @@ pub struct Args { /// Add this to an optional dependency group. #[arg(long, conflicts_with = "dev", conflicts_with = "excluded")] optional: Option, - /// Include pre-releases when finding a package version. - #[arg(long)] - pre: bool, /// Overrides the pin operator #[arg(long)] pin: Option, - /// Attempt to use `keyring` for authentication for index URLs. - #[arg(long, value_enum, default_value_t)] - keyring_provider: KeyringProvider, /// Runs `sync` even if auto-sync is disabled. #[arg(long)] sync: bool, @@ -229,6 +223,19 @@ pub struct Args { /// Turns off all output. #[arg(short, long, conflicts_with = "verbose")] quiet: bool, + + /// Include pre-releases when finding a package version and automatically syncing the workspace. + #[arg(long)] + pre: bool, + /// Set to `true` to lock with sources in the lockfile when automatically syncing the workspace. + #[arg(long)] + with_sources: bool, + /// Set to `true` to lock with hashes in the lockfile when automatically syncing the workspace. + #[arg(long)] + generate_hashes: bool, + /// Attempt to use `keyring` for authentication for index URLs. + #[arg(long, value_enum, default_value_t)] + keyring_provider: KeyringProvider, } pub fn execute(cmd: Args) -> Result<(), Error> { @@ -264,8 +271,6 @@ pub fn execute(cmd: Args) -> Result<(), Error> { requirements.push(requirement); } - let keyring_provider = cmd.keyring_provider; - if !cmd.excluded { if cfg.use_uv() { sync(SyncOptions::python_only().pyproject(None)) @@ -277,10 +282,10 @@ pub fn execute(cmd: Args) -> Result<(), Error> { cmd.pre, output, &default_operator, - keyring_provider, + cmd.keyring_provider, )?; } else { - if keyring_provider != KeyringProvider::Disabled { + if cmd.keyring_provider != KeyringProvider::Disabled { bail!("`--keyring-provider` option requires the uv backend"); } for requirement in &mut requirements { @@ -314,7 +319,14 @@ pub fn execute(cmd: Args) -> Result<(), Error> { } if (cfg.autosync() && !cmd.no_sync) || cmd.sync { - autosync(&pyproject_toml, output, keyring_provider)?; + autosync( + &pyproject_toml, + output, + cmd.pre, + cmd.with_sources, + cmd.generate_hashes, + cmd.keyring_provider, + )?; } Ok(()) diff --git a/rye/src/cli/build.rs b/rye/src/cli/build.rs index 6e94f76e25..0d312fde13 100644 --- a/rye/src/cli/build.rs +++ b/rye/src/cli/build.rs @@ -2,12 +2,14 @@ use std::fs; use std::path::PathBuf; use std::process::{Command, Stdio}; -use anyhow::{anyhow, bail, Error}; +use anyhow::{anyhow, bail, Context, Error}; use clap::Parser; use console::style; -use crate::bootstrap::ensure_self_venv; +use crate::bootstrap::{fetch, FetchOptions}; use crate::config::Config; + +use crate::platform::get_toolchain_python_bin; use crate::pyproject::{locate_projects, PyProject}; use crate::utils::{get_venv_python_bin, prepend_path_to_path_env, CommandOutput, IoPathContext}; use crate::uv::UvBuilder; @@ -46,8 +48,8 @@ pub struct Args { pub fn execute(cmd: Args) -> Result<(), Error> { let output = CommandOutput::from_quiet_and_verbose(cmd.quiet, cmd.verbose); - let self_venv = ensure_self_venv(output)?; let project = PyProject::load_or_discover(cmd.pyproject.as_deref())?; + let py_ver = project.venv_python_version()?; let out = match cmd.out { Some(path) => path, @@ -66,6 +68,32 @@ pub fn execute(cmd: Args) -> Result<(), Error> { let use_uv = Config::current().use_uv(); let projects = locate_projects(project, cmd.all, &cmd.package[..])?; + let all_virtual = projects.iter().all(|p| p.is_virtual()); + if all_virtual { + warn!("skipping build, all projects are virtual"); + return Ok(()); + } + + // Make sure we have a compatible Python version. + let py_ver = fetch(&py_ver.into(), FetchOptions::with_output(output)) + .context("failed fetching toolchain ahead of sync")?; + echo!(if output, "Python version: {}", style(&py_ver).cyan()); + let py_bin = get_toolchain_python_bin(&py_ver)?; + + // Create a virtual environment in which to perform the builds. + let uv = UvBuilder::new() + .with_output(CommandOutput::Quiet) + .ensure_exists()?; + let venv_dir = tempfile::tempdir().context("failed to create temporary directory")?; + let uv_venv = uv + .venv(venv_dir.path(), &py_bin, &py_ver, None) + .context("failed to create build environment")?; + uv_venv.write_marker()?; + uv_venv.bootstrap()?; + + // Respect the output level for the actual builds. + let uv = uv.with_output(output); + for project in projects { // skip over virtual packages on build if project.is_virtual() { @@ -78,7 +106,7 @@ pub fn execute(cmd: Args) -> Result<(), Error> { style(project.normalized_name()?).cyan() ); - let mut build_cmd = Command::new(get_venv_python_bin(&self_venv)); + let mut build_cmd = Command::new(get_venv_python_bin(venv_dir.path())); build_cmd .arg("-mbuild") .env("NO_COLOR", "1") @@ -87,8 +115,6 @@ pub fn execute(cmd: Args) -> Result<(), Error> { .arg(&*project.root_path()); if use_uv { - // we need to ensure uv is available to use without installing it into self_venv - let uv = UvBuilder::new().with_output(output).ensure_exists()?; let uv_dir = uv .uv_bin() .parent() @@ -118,6 +144,5 @@ pub fn execute(cmd: Args) -> Result<(), Error> { bail!("failed to build dist"); } } - Ok(()) } diff --git a/rye/src/cli/fetch.rs b/rye/src/cli/fetch.rs index a99d6b0e22..dfbd2284c4 100644 --- a/rye/src/cli/fetch.rs +++ b/rye/src/cli/fetch.rs @@ -10,7 +10,7 @@ use crate::pyproject::PyProject; use crate::sources::py::PythonVersionRequest; use crate::utils::CommandOutput; -/// Fetches a Python interpreter for the local machine. This is an alias of `rye toolchain fetch`. +/// Fetches a Python interpreter for the local machine. #[derive(Parser, Debug)] pub struct Args { /// The version of Python to fetch. diff --git a/rye/src/cli/install.rs b/rye/src/cli/install.rs index 64aeb49d8a..aae1632584 100644 --- a/rye/src/cli/install.rs +++ b/rye/src/cli/install.rs @@ -7,10 +7,11 @@ use pep508_rs::Requirement; use crate::cli::add::ReqExtras; use crate::config::Config; use crate::installer::{install, resolve_local_requirement}; +use crate::lock::KeyringProvider; use crate::sources::py::PythonVersionRequest; use crate::utils::CommandOutput; -/// Installs a package as global tool. This is an alias of `rye tools install`. +/// Installs a package as global tool. #[derive(Parser, Debug)] pub struct Args { /// The name of the package to install. @@ -29,6 +30,9 @@ pub struct Args { /// Force install the package even if it's already there. #[arg(short, long)] force: bool, + /// Attempt to use `keyring` for authentication for index URLs. + #[arg(long, value_enum, default_value_t)] + keyring_provider: KeyringProvider, /// Enables verbose diagnostics. #[arg(short, long)] verbose: bool, @@ -74,6 +78,7 @@ pub fn execute(mut cmd: Args) -> Result<(), Error> { &cmd.include_dep, &extra_requirements, output, + cmd.keyring_provider, )?; Ok(()) } diff --git a/rye/src/cli/lock.rs b/rye/src/cli/lock.rs index ecbeef1316..31b3b16292 100644 --- a/rye/src/cli/lock.rs +++ b/rye/src/cli/lock.rs @@ -37,15 +37,18 @@ pub struct Args { /// Attempt to use `keyring` for authentication for index URLs. #[arg(long, value_enum, default_value_t)] keyring_provider: KeyringProvider, + /// Set to true to lock with hashes in the lockfile. + #[arg(long)] + generate_hashes: bool, + /// Use universal lock files. + #[arg(long)] + universal: bool, /// Reset prior lock options. #[arg(long)] reset: bool, - /// Use this pyproject.toml file + /// Use this pyproject.toml file. #[arg(long, value_name = "PYPROJECT_TOML")] pyproject: Option, - /// Set to true to lock with hashes in the lockfile. - #[arg(long)] - generate_hashes: bool, } pub fn execute(cmd: Args) -> Result<(), Error> { @@ -62,6 +65,7 @@ pub fn execute(cmd: Args) -> Result<(), Error> { with_sources: cmd.with_sources, reset: cmd.reset, generate_hashes: cmd.generate_hashes, + universal: cmd.universal, }, pyproject: cmd.pyproject, keyring_provider: cmd.keyring_provider, diff --git a/rye/src/cli/remove.rs b/rye/src/cli/remove.rs index f47812b652..3ded3a76bb 100644 --- a/rye/src/cli/remove.rs +++ b/rye/src/cli/remove.rs @@ -17,7 +17,7 @@ pub struct Args { #[arg(required = true)] requirements: Vec, /// Remove this from dev dependencies. - #[arg(long)] + #[arg(short, long)] dev: bool, /// Remove this from an optional dependency group. #[arg(long, conflicts_with = "dev")] @@ -28,15 +28,25 @@ pub struct Args { /// Does not run `sync` even if auto-sync is enabled. #[arg(long, conflicts_with = "sync")] no_sync: bool, - /// Attempt to use `keyring` for authentication for index URLs. - #[arg(long, value_enum, default_value_t)] - keyring_provider: KeyringProvider, /// Enables verbose diagnostics. #[arg(short, long)] verbose: bool, /// Turns off all output. #[arg(short, long, conflicts_with = "verbose")] quiet: bool, + + /// Include pre-releases when automatically syncing the workspace. + #[arg(long)] + pre: bool, + /// Set to `true` to lock with sources in the lockfile when automatically syncing the workspace. + #[arg(long)] + with_sources: bool, + /// Set to `true` to lock with hashes in the lockfile when automatically syncing the workspace. + #[arg(long)] + generate_hashes: bool, + /// Attempt to use `keyring` for authentication for index URLs. + #[arg(long, value_enum, default_value_t)] + keyring_provider: KeyringProvider, } pub fn execute(cmd: Args) -> Result<(), Error> { @@ -69,7 +79,14 @@ pub fn execute(cmd: Args) -> Result<(), Error> { } if (Config::current().autosync() && !cmd.no_sync) || cmd.sync { - autosync(&pyproject_toml, output, cmd.keyring_provider)?; + autosync( + &pyproject_toml, + output, + cmd.pre, + cmd.with_sources, + cmd.generate_hashes, + cmd.keyring_provider, + )?; } Ok(()) diff --git a/rye/src/cli/run.rs b/rye/src/cli/run.rs index 7db917d72b..d69433c2f4 100644 --- a/rye/src/cli/run.rs +++ b/rye/src/cli/run.rs @@ -35,7 +35,7 @@ enum Cmd { } pub fn execute(cmd: Args) -> Result<(), Error> { - let _guard = redirect_to_stderr(true); + let guard = redirect_to_stderr(true); let pyproject = PyProject::load_or_discover(cmd.pyproject.as_deref())?; // make sure we have the minimal virtualenv. @@ -43,6 +43,7 @@ pub fn execute(cmd: Args) -> Result<(), Error> { .context("failed to sync ahead of run")?; if cmd.list || cmd.cmd.is_none() { + drop(guard); return list_scripts(&pyproject); } let args = match cmd.cmd { diff --git a/rye/src/cli/rye.rs b/rye/src/cli/rye.rs index 72d7ca357f..b744bb0b7c 100644 --- a/rye/src/cli/rye.rs +++ b/rye/src/cli/rye.rs @@ -7,6 +7,7 @@ use std::sync::Arc; use std::{env, fs}; use anyhow::{anyhow, bail, Context, Error}; +use clap::builder::PossibleValue; use clap::{CommandFactory, Parser, ValueEnum}; use clap_complete::{Generator, Shell}; use clap_complete_nushell::Nushell; @@ -53,7 +54,7 @@ pub struct Args { command: SubCommand, } -#[derive(Clone, Debug, ValueEnum)] +#[derive(Clone, Debug)] enum ShellCompletion { /// Bourne Again SHell (bash) Bash, @@ -69,6 +70,32 @@ enum ShellCompletion { Nushell, } +impl ValueEnum for ShellCompletion { + /// Returns the variants for the shell completion. + fn value_variants<'a>() -> &'a [Self] { + &[ + ShellCompletion::Bash, + ShellCompletion::Elvish, + ShellCompletion::Fish, + ShellCompletion::PowerShell, + ShellCompletion::Zsh, + ShellCompletion::Nushell, + ] + } + + /// Returns the possible value for the shell completion. + fn to_possible_value<'a>(&self) -> Option { + Some(match self { + ShellCompletion::Bash => PossibleValue::new("bash"), + ShellCompletion::Elvish => PossibleValue::new("elvish"), + ShellCompletion::Fish => PossibleValue::new("fish"), + ShellCompletion::PowerShell => PossibleValue::new("powershell"), + ShellCompletion::Zsh => PossibleValue::new("zsh"), + ShellCompletion::Nushell => PossibleValue::new("nushell"), + }) + } +} + impl Generator for ShellCompletion { /// Generate the file name for the completion script. fn file_name(&self, name: &str) -> String { @@ -533,7 +560,7 @@ fn perform_install( echo!("automatically started the installer for you. For more information"); echo!( "read {}", - style("https://rye-up.com/guide/installation/").yellow() + style("https://rye.astral.sh/guide/installation/").yellow() ); } @@ -571,7 +598,7 @@ fn perform_install( echo!("enable symlinks. You need to enable this before continuing the setup."); echo!( "Learn more at {}", - style("https://rye-up.com/guide/faq/#windows-developer-mode").yellow() + style("https://rye.astral.sh/guide/faq/#windows-developer-mode").yellow() ); } @@ -590,15 +617,15 @@ fn perform_install( .get("behavior") .and_then(|x| x.get("use-uv")) .is_none() - && !matches!(mode, InstallMode::NoPrompts) { - let use_uv = dialoguer::Select::with_theme(tui_theme()) - .with_prompt("Select the preferred package installer") - .item("uv (fast, recommended)") - .item("pip-tools (slow, higher compatibility)") - .default(0) - .interact()? - == 0; + let use_uv = matches!(mode, InstallMode::NoPrompts) + || dialoguer::Select::with_theme(tui_theme()) + .with_prompt("Select the preferred package installer") + .item("uv (fast, recommended)") + .item("pip-tools (slow, higher compatibility)") + .default(0) + .interact()? + == 0; toml::ensure_table(config_doc, "behavior")["use-uv"] = toml_edit::value(use_uv); } @@ -782,7 +809,7 @@ fn add_rye_to_path(mode: &InstallMode, shims: &Path, ask: bool) -> Result<(), Er ); echo!(); } - echo!("For more information read https://rye-up.com/guide/installation/"); + echo!("For more information read https://rye.astral.sh/guide/installation/"); } } // On Windows, we add the rye directory to the user's PATH unconditionally. diff --git a/rye/src/cli/shim.rs b/rye/src/cli/shim.rs index 2592372b17..aa8bb16a4c 100644 --- a/rye/src/cli/shim.rs +++ b/rye/src/cli/shim.rs @@ -187,7 +187,7 @@ fn get_shim_target( ) -> Result>, Error> { // if we can find a project, we always look for a local virtualenv first for shims. if let Some(pyproject) = pyproject { - // However we only allow automatic synching, if we are rye managed. + // However we only allow automatic syncing, if we are rye managed. if pyproject.rye_managed() { let _guard = redirect_to_stderr(true); sync(SyncOptions::python_only()).context("sync ahead of shim resolution failed")?; @@ -327,7 +327,7 @@ pub fn execute_shim(args: &[OsString]) -> Result<(), Error> { "Target Python binary '{}' not found.\nYou are currently outside of a project. \ To resolve this, consider enabling global shims. \ Global shims allow for a Rye-managed Python installation.\n\ - For more information: https://rye-up.com/guide/shims/#global-shims", shim_name + For more information: https://rye.astral.sh/guide/shims/#global-shims", shim_name ); } } else { diff --git a/rye/src/cli/show.rs b/rye/src/cli/show.rs index adaeeb0142..1c5105db40 100644 --- a/rye/src/cli/show.rs +++ b/rye/src/cli/show.rs @@ -40,7 +40,7 @@ pub fn execute(cmd: Args) -> Result<(), Error> { echo!("venv python: {}", style(&ver).cyan()); if let Some(actual) = get_current_venv_python_version(&project.venv_path()) { if actual != ver { - echo!("last synched venv python: {}", style(&actual).red()); + echo!("last synced venv python: {}", style(&actual).red()); } } } diff --git a/rye/src/cli/sync.rs b/rye/src/cli/sync.rs index 15b12bec76..e324d8ed2e 100644 --- a/rye/src/cli/sync.rs +++ b/rye/src/cli/sync.rs @@ -34,7 +34,7 @@ pub struct Args { /// Update to pre-release versions #[arg(long)] pre: bool, - /// Extras/features to enable when synching the workspace. + /// Extras/features to enable when syncing the workspace. #[arg(long)] features: Vec, /// Enables all features. @@ -46,15 +46,18 @@ pub struct Args { /// Attempt to use `keyring` for authentication for index URLs. #[arg(long, value_enum, default_value_t)] keyring_provider: KeyringProvider, + /// Set to true to lock with hashes in the lockfile. + #[arg(long)] + generate_hashes: bool, /// Use this pyproject.toml file #[arg(long, value_name = "PYPROJECT_TOML")] pyproject: Option, /// Do not reuse (reset) prior lock options. #[arg(long)] reset: bool, - /// Set to true to lock with hashes in the lockfile. + /// Use universal lock files #[arg(long)] - generate_hashes: bool, + universal: bool, } pub fn execute(cmd: Args) -> Result<(), Error> { @@ -78,6 +81,7 @@ pub fn execute(cmd: Args) -> Result<(), Error> { with_sources: cmd.with_sources, reset: cmd.reset, generate_hashes: cmd.generate_hashes, + universal: cmd.universal, }, keyring_provider: cmd.keyring_provider, pyproject: cmd.pyproject, diff --git a/rye/src/cli/test.rs b/rye/src/cli/test.rs index 5221121ce7..bb2a0042b1 100644 --- a/rye/src/cli/test.rs +++ b/rye/src/cli/test.rs @@ -29,10 +29,7 @@ pub struct Args { /// Use this pyproject.toml file #[arg(long, value_name = "PYPROJECT_TOML")] pyproject: Option, - /// Attempt to use `keyring` for authentication for index URLs. - #[arg(long, value_enum, default_value_t)] - keyring_provider: KeyringProvider, - // Disable test output capture to stdout + /// Disable test output capture to stdout. #[arg(long = "no-capture", short = 's')] no_capture: bool, /// Enables verbose diagnostics. @@ -44,6 +41,19 @@ pub struct Args { /// Extra arguments to pytest #[arg(last = true)] extra_args: Vec, + + /// Include pre-releases when automatically syncing the workspace. + #[arg(long)] + pre: bool, + /// Set to `true` to lock with sources in the lockfile when automatically syncing the workspace. + #[arg(long)] + with_sources: bool, + /// Set to `true` to lock with hashes in the lockfile when automatically syncing the workspace. + #[arg(long)] + generate_hashes: bool, + /// Attempt to use `keyring` for authentication for index URLs. + #[arg(long, value_enum, default_value_t)] + keyring_provider: KeyringProvider, } pub fn execute(cmd: Args) -> Result<(), Error> { @@ -77,7 +87,14 @@ pub fn execute(cmd: Args) -> Result<(), Error> { let has_pytest = has_pytest_dependency(&projects)?; if has_pytest { if Config::current().autosync() { - autosync(&projects[0], output, cmd.keyring_provider)?; + autosync( + &projects[0], + output, + cmd.pre, + cmd.with_sources, + cmd.generate_hashes, + cmd.keyring_provider, + )?; } else { bail!("pytest not installed but in dependencies. Run `rye sync`.") } diff --git a/rye/src/cli/uninstall.rs b/rye/src/cli/uninstall.rs index 7039b30162..a4a689abeb 100644 --- a/rye/src/cli/uninstall.rs +++ b/rye/src/cli/uninstall.rs @@ -4,10 +4,10 @@ use clap::Parser; use crate::installer::uninstall; use crate::utils::CommandOutput; -/// Uninstalls a global tool. This is an alias of `rye tools uninstall`. +/// Uninstalls a global tool. #[derive(Parser, Debug)] pub struct Args { - /// The package to uninstall + /// The package to uninstall. name: String, /// Enables verbose diagnostics. #[arg(short, long)] diff --git a/rye/src/config.rs b/rye/src/config.rs index 2d151d9966..dd173268d6 100644 --- a/rye/src/config.rs +++ b/rye/src/config.rs @@ -232,7 +232,8 @@ impl Config { if let Some(sources) = self.doc.get("sources").map(|x| toml::iter_tables(x)) { for source in sources { let source = source.context("invalid value for source in config.toml")?; - let source_ref = SourceRef::from_toml_table(source)?; + let source_ref = SourceRef::from_toml_table(source) + .context("invalid source definition in config.toml")?; if source_ref.name == "default" { need_default = false; } diff --git a/rye/src/installer.rs b/rye/src/installer.rs index d93adda388..55fd8f4e51 100644 --- a/rye/src/installer.rs +++ b/rye/src/installer.rs @@ -14,6 +14,7 @@ use url::Url; use crate::bootstrap::{ensure_self_venv, fetch, FetchOptions}; use crate::config::Config; use crate::consts::VENV_BIN; +use crate::lock::KeyringProvider; use crate::platform::get_app_dir; use crate::pyproject::{normalize_package_name, read_venv_marker, ExpandedSources}; use crate::sources::py::PythonVersionRequest; @@ -109,6 +110,7 @@ pub fn install( include_deps: &[String], extra_requirements: &[Requirement], output: CommandOutput, + keyring_provider: KeyringProvider, ) -> Result<(), Error> { let config = Config::current(); let sources = ExpandedSources::from_sources(&config.sources()?)?; @@ -154,6 +156,7 @@ pub fn install( importlib_workaround: py_ver.major == 3 && py_ver.minor == 7, extras: extra_requirements.to_vec(), refresh: force, + keyring_provider, }, ); if result.is_err() { diff --git a/rye/src/lock.rs b/rye/src/lock.rs index d910401274..fc97bc9063 100644 --- a/rye/src/lock.rs +++ b/rye/src/lock.rs @@ -37,10 +37,12 @@ static REQUIREMENTS_HEADER: &str = r#"# generated by rye # all-features: {{ lock_options.all_features|tojson }} # with-sources: {{ lock_options.with_sources|tojson }} # generate-hashes: {{ lock_options.generate_hashes|tojson }} +# universal: {{ lock_options.universal|tojson }} "#; -static PARAM_RE: Lazy = - Lazy::new(|| Regex::new(r"^# (pre|features|all-features|with-sources):\s*(.*?)$").unwrap()); +static PARAM_RE: Lazy = Lazy::new(|| { + Regex::new(r"^# (pre|features|all-features|with-sources|universal):\s*(.*?)$").unwrap() +}); #[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord)] pub enum LockMode { @@ -73,6 +75,17 @@ pub enum KeyringProvider { Subprocess, } +impl KeyringProvider { + pub fn add_as_pip_args(self, cmd: &mut Command) { + match self { + KeyringProvider::Disabled => {} + KeyringProvider::Subprocess => { + cmd.arg("--keyring-provider").arg("subprocess"); + } + } + } +} + /// Controls how locking should work. #[derive(Debug, Clone, Default, Serialize)] pub struct LockOptions { @@ -92,6 +105,8 @@ pub struct LockOptions { pub reset: bool, /// Generate hashes in the lock file. pub generate_hashes: bool, + /// Use universal lock files. + pub universal: bool, } impl LockOptions { @@ -130,6 +145,7 @@ impl LockOptions { "with-sources" => { rv.with_sources = rv.with_sources || serde_json::from_str(value)? } + "universal" => rv.universal = rv.universal || serde_json::from_str(value)?, _ => unreachable!(), } } @@ -434,6 +450,7 @@ fn generate_lockfile( upgrade, keyring_provider, lock_options.generate_hashes, + lock_options.universal, )?; } else { if keyring_provider != KeyringProvider::Disabled { diff --git a/rye/src/pyproject.rs b/rye/src/pyproject.rs index bf32b073f4..d1865bd92f 100644 --- a/rye/src/pyproject.rs +++ b/rye/src/pyproject.rs @@ -152,14 +152,15 @@ impl SourceRef { .get("name") .and_then(|x| x.as_str()) .map(|x| x.to_string()) - .ok_or_else(|| anyhow!("expected name"))?; + .ok_or_else(|| anyhow!("expected source.name"))?; let url = source .get("url") .and_then(|x| x.as_str()) .map(|x| x.to_string()) - .ok_or_else(|| anyhow!("expected url"))?; + .ok_or_else(|| anyhow!("expected source.url"))?; let verify_ssl = source .get("verify_ssl") + .or_else(|| source.get("verify-ssl")) .and_then(|x| x.as_bool()) .unwrap_or(true); let username = source @@ -174,7 +175,7 @@ impl SourceRef { .get("type") .and_then(|x| x.as_str()) .map_or(Ok(SourceRefType::Index), |x| x.parse::()) - .context("invalid value for type")?; + .context("invalid value for source.type")?; Ok(SourceRef { name, url, @@ -535,6 +536,16 @@ impl Workspace { is_rye_managed(&self.doc) } + /// Should requirements.txt based locking include generating hashes? + pub fn generate_hashes(&self) -> bool { + generate_hashes(&self.doc) + } + + /// Should requirements.txt based locking be universal + pub fn universal(&self) -> bool { + universal(&self.doc) + } + /// Should requirements.txt based locking include a find-links reference? pub fn lock_with_sources(&self) -> bool { lock_with_sources(&self.doc) @@ -568,6 +579,13 @@ pub struct PyProject { doc: DocumentMut, } +/// Returns an implicit table. +fn implicit() -> Item { + let mut table = Table::new(); + table.set_implicit(true); + Item::Table(table) +} + impl PyProject { /// Load a pyproject toml if explicitly given, else discover from current directory /// @@ -901,8 +919,14 @@ impl PyProject { ) -> Result<(), Error> { let dependencies = match kind { DependencyKind::Normal => &mut self.doc["project"]["dependencies"], - DependencyKind::Dev => &mut self.doc["tool"]["rye"]["dev-dependencies"], - DependencyKind::Excluded => &mut self.doc["tool"]["rye"]["excluded-dependencies"], + DependencyKind::Dev => self + .obtain_tool_config_table()? + .entry("dev-dependencies") + .or_insert(Item::Value(Value::Array(Array::new()))), + DependencyKind::Excluded => self + .obtain_tool_config_table()? + .entry("excluded-dependencies") + .or_insert(Item::Value(Value::Array(Array::new()))), DependencyKind::Optional(ref section) => { // add this as a proper non-inline table if it's missing let table = &mut self.doc["project"]["optional-dependencies"]; @@ -932,8 +956,14 @@ impl PyProject { ) -> Result, Error> { let dependencies = match kind { DependencyKind::Normal => &mut self.doc["project"]["dependencies"], - DependencyKind::Dev => &mut self.doc["tool"]["rye"]["dev-dependencies"], - DependencyKind::Excluded => &mut self.doc["tool"]["rye"]["excluded-dependencies"], + DependencyKind::Dev => self + .obtain_tool_config_table()? + .entry("dev-dependencies") + .or_insert(Item::Value(Value::Array(Array::new()))), + DependencyKind::Excluded => self + .obtain_tool_config_table()? + .entry("excluded-dependencies") + .or_insert(Item::Value(Value::Array(Array::new()))), DependencyKind::Optional(ref section) => { &mut self.doc["project"]["optional-dependencies"][section as &str] } @@ -1006,7 +1036,23 @@ impl PyProject { .unwrap_or(false) } - /// Should requirements.txt based locking include a find-links reference? + /// Should requirements.txt-based locking include generating hashes? + pub fn generate_hashes(&self) -> bool { + match self.workspace { + Some(ref workspace) => workspace.generate_hashes(), + None => generate_hashes(&self.doc), + } + } + + /// Should requirements.txt-based locking be universal? + pub fn universal(&self) -> bool { + match self.workspace { + Some(ref workspace) => workspace.universal(), + None => universal(&self.doc), + } + } + + /// Should requirements.txt-based locking include a find-links reference? pub fn lock_with_sources(&self) -> bool { match self.workspace { Some(ref workspace) => workspace.lock_with_sources(), @@ -1020,6 +1066,19 @@ impl PyProject { fs::write(&path, self.doc.to_string()).path_context(&path, "unable to write changes")?; Ok(()) } + + /// Gets or creates the [tool.rye] table in pyproject.toml + fn obtain_tool_config_table(&mut self) -> Result<&mut Table, Error> { + self.doc + .entry("tool") + .or_insert(implicit()) + .as_table_mut() + .ok_or(anyhow!("[tool.rye] in pyproject.toml is malformed"))? + .entry("rye") + .or_insert(implicit()) + .as_table_mut() + .ok_or(anyhow!("[tool.rye] in pyproject.toml is malformed")) + } } pub fn normalize_package_name(x: &str) -> String { @@ -1252,7 +1311,8 @@ fn get_sources(doc: &DocumentMut) -> Result, Error> { { for source in sources { let source = source.context("invalid value for pyproject.toml's tool.rye.sources")?; - let source_ref = SourceRef::from_toml_table(source)?; + let source_ref = SourceRef::from_toml_table(source) + .context("invalid source definition in pyproject.toml")?; rv.push(source_ref); } } @@ -1280,6 +1340,22 @@ fn is_rye_managed(doc: &DocumentMut) -> bool { .unwrap_or(false) } +fn generate_hashes(doc: &DocumentMut) -> bool { + doc.get("tool") + .and_then(|x| x.get("rye")) + .and_then(|x| x.get("generate-hashes")) + .and_then(|x| x.as_bool()) + .unwrap_or(false) +} + +fn universal(doc: &DocumentMut) -> bool { + doc.get("tool") + .and_then(|x| x.get("rye")) + .and_then(|x| x.get("universal")) + .and_then(|x| x.as_bool()) + .unwrap_or(false) +} + fn lock_with_sources(doc: &DocumentMut) -> bool { doc.get("tool") .and_then(|x| x.get("rye")) @@ -1299,6 +1375,7 @@ fn get_project_metadata(path: &Path) -> Result { } serde_json::from_slice(&metadata.stdout).map_err(Into::into) } + /// Represents expanded sources. #[derive(Debug, Clone, Serialize)] pub struct ExpandedSources { diff --git a/rye/src/sources/generated/python_downloads.inc b/rye/src/sources/generated/python_downloads.inc index 5484f94897..b7886dcb16 100644 --- a/rye/src/sources/generated/python_downloads.inc +++ b/rye/src/sources/generated/python_downloads.inc @@ -101,6 +101,12 @@ pub const PYTHON_VERSIONS: &[(PythonVersion, &str, Option<&str>)] = &[ (PythonVersion { name: Cow::Borrowed("pypy"), arch: Cow::Borrowed("x86"), os: Cow::Borrowed("linux"), major: 3, minor: 7, patch: 9, suffix: None }, "https://downloads.python.org/pypy/pypy3.7-v7.3.3-linux32.tar.bz2", Some("7d81b8e9fcd07c067cfe2f519ab770ec62928ee8787f952cadf2d2786246efc8")), (PythonVersion { name: Cow::Borrowed("pypy"), arch: Cow::Borrowed("x86_64"), os: Cow::Borrowed("linux"), major: 3, minor: 7, patch: 9, suffix: None }, "https://downloads.python.org/pypy/pypy3.7-v7.3.3-linux64.tar.bz2", Some("37e2804c4661c86c857d709d28c7de716b000d31e89766599fdf5a98928b7096")), (PythonVersion { name: Cow::Borrowed("pypy"), arch: Cow::Borrowed("x86_64"), os: Cow::Borrowed("macos"), major: 3, minor: 7, patch: 9, suffix: None }, "https://downloads.python.org/pypy/pypy3.7-v7.3.3-osx64.tar.bz2", Some("d72b27d5bb60813273f14f07378a08822186a66e216c5d1a768ad295b582438d")), + (PythonVersion { name: Cow::Borrowed("cpython"), arch: Cow::Borrowed("aarch64"), os: Cow::Borrowed("linux"), major: 3, minor: 12, patch: 4, suffix: None }, "https://github.com/indygreg/python-build-standalone/releases/download/20240713/cpython-3.12.4%2B20240713-aarch64-unknown-linux-gnu-lto-full.tar.zst", Some("c7093d43470f07fce45a8fdc15e9e5bddd696174199083721cb1311ca5a100d1")), + (PythonVersion { name: Cow::Borrowed("cpython"), arch: Cow::Borrowed("aarch64"), os: Cow::Borrowed("macos"), major: 3, minor: 12, patch: 4, suffix: None }, "https://github.com/indygreg/python-build-standalone/releases/download/20240713/cpython-3.12.4%2B20240713-aarch64-apple-darwin-pgo%2Blto-full.tar.zst", Some("a5ad9b19db463f30138352f1dea620ac182a51aefb3398f3a7b8ed865c1f22e9")), + (PythonVersion { name: Cow::Borrowed("cpython"), arch: Cow::Borrowed("x86"), os: Cow::Borrowed("windows"), major: 3, minor: 12, patch: 4, suffix: None }, "https://github.com/indygreg/python-build-standalone/releases/download/20240713/cpython-3.12.4%2B20240713-i686-pc-windows-msvc-shared-pgo-full.tar.zst", Some("b9d5a845480ef06133ca518dffc5083a8a5ba455d227504c6f03012c874caf6c")), + (PythonVersion { name: Cow::Borrowed("cpython"), arch: Cow::Borrowed("x86_64"), os: Cow::Borrowed("linux"), major: 3, minor: 12, patch: 4, suffix: None }, "https://github.com/indygreg/python-build-standalone/releases/download/20240713/cpython-3.12.4%2B20240713-x86_64-unknown-linux-gnu-pgo%2Blto-full.tar.zst", Some("f9eda278682713c45d13671d6e3a78df44293c9ed7be8ba2cc4284dc2ba5d5a9")), + (PythonVersion { name: Cow::Borrowed("cpython"), arch: Cow::Borrowed("x86_64"), os: Cow::Borrowed("macos"), major: 3, minor: 12, patch: 4, suffix: None }, "https://github.com/indygreg/python-build-standalone/releases/download/20240713/cpython-3.12.4%2B20240713-x86_64-apple-darwin-pgo%2Blto-full.tar.zst", Some("810cc81031f68d0c6b7b5ae685ad590958a842824e08e5d28dea82396da0af44")), + (PythonVersion { name: Cow::Borrowed("cpython"), arch: Cow::Borrowed("x86_64"), os: Cow::Borrowed("windows"), major: 3, minor: 12, patch: 4, suffix: None }, "https://github.com/indygreg/python-build-standalone/releases/download/20240713/cpython-3.12.4%2B20240713-x86_64-pc-windows-msvc-shared-pgo-full.tar.zst", Some("3f1eb222d1d43d5d70551e8bd64d54aff40f754eb08600167c779f2f1c3559ac")), (PythonVersion { name: Cow::Borrowed("cpython"), arch: Cow::Borrowed("aarch64"), os: Cow::Borrowed("linux"), major: 3, minor: 12, patch: 3, suffix: None }, "https://github.com/indygreg/python-build-standalone/releases/download/20240415/cpython-3.12.3%2B20240415-aarch64-unknown-linux-gnu-lto-full.tar.zst", Some("a4f17d1e3b4ea0e4c2a3664f232c0857979522936af582f7de92b57050220f74")), (PythonVersion { name: Cow::Borrowed("cpython"), arch: Cow::Borrowed("aarch64"), os: Cow::Borrowed("macos"), major: 3, minor: 12, patch: 3, suffix: None }, "https://github.com/indygreg/python-build-standalone/releases/download/20240415/cpython-3.12.3%2B20240415-aarch64-apple-darwin-pgo%2Blto-full.tar.zst", Some("fa2b8c377f17dfb097a93c0fba217d93075a7ceba0cc877066e95be969e6b73d")), (PythonVersion { name: Cow::Borrowed("cpython"), arch: Cow::Borrowed("x86"), os: Cow::Borrowed("windows"), major: 3, minor: 12, patch: 3, suffix: None }, "https://github.com/indygreg/python-build-standalone/releases/download/20240415/cpython-3.12.3%2B20240415-i686-pc-windows-msvc-shared-pgo-full.tar.zst", Some("31bb3f579f3dcbbf3bf1dc71a188112e821cdfc77d21c9dbfe82ea78538110e1")), @@ -125,12 +131,12 @@ pub const PYTHON_VERSIONS: &[(PythonVersion, &str, Option<&str>)] = &[ (PythonVersion { name: Cow::Borrowed("cpython"), arch: Cow::Borrowed("x86_64"), os: Cow::Borrowed("linux"), major: 3, minor: 12, patch: 0, suffix: None }, "https://github.com/indygreg/python-build-standalone/releases/download/20231002/cpython-3.12.0%2B20231002-x86_64-unknown-linux-gnu-pgo%2Blto-full.tar.zst", Some("5ce861907a2751a3a7395b1aaada830c2b072acc03f3dd0bcbaaa2b7a9166fc0")), (PythonVersion { name: Cow::Borrowed("cpython"), arch: Cow::Borrowed("x86_64"), os: Cow::Borrowed("macos"), major: 3, minor: 12, patch: 0, suffix: None }, "https://github.com/indygreg/python-build-standalone/releases/download/20231002/cpython-3.12.0%2B20231002-x86_64-apple-darwin-pgo%2Blto-full.tar.zst", Some("3b4781e7fd4efabe574ba0954e54c35c7d5ac4dc5b2990b40796c1c6aec67d79")), (PythonVersion { name: Cow::Borrowed("cpython"), arch: Cow::Borrowed("x86_64"), os: Cow::Borrowed("windows"), major: 3, minor: 12, patch: 0, suffix: None }, "https://github.com/indygreg/python-build-standalone/releases/download/20231002/cpython-3.12.0%2B20231002-x86_64-pc-windows-msvc-shared-pgo-full.tar.zst", Some("5bdff7ed56550d96f9b26a27a8c25f0cc58a03bff19e5f52bba84366183cab8b")), - (PythonVersion { name: Cow::Borrowed("cpython"), arch: Cow::Borrowed("aarch64"), os: Cow::Borrowed("linux"), major: 3, minor: 11, patch: 9, suffix: None }, "https://github.com/indygreg/python-build-standalone/releases/download/20240415/cpython-3.11.9%2B20240415-aarch64-unknown-linux-gnu-lto-full.tar.zst", Some("c9f5e493c686ed8a5c38d1748c45fed18dc9b6faa70794d9cc9bb32489cc0b77")), - (PythonVersion { name: Cow::Borrowed("cpython"), arch: Cow::Borrowed("aarch64"), os: Cow::Borrowed("macos"), major: 3, minor: 11, patch: 9, suffix: None }, "https://github.com/indygreg/python-build-standalone/releases/download/20240415/cpython-3.11.9%2B20240415-aarch64-apple-darwin-pgo%2Blto-full.tar.zst", Some("9a59eb9e8e509e742a25cada7b2c1123a56022081d91a8fbe48015cf495b0d0f")), - (PythonVersion { name: Cow::Borrowed("cpython"), arch: Cow::Borrowed("x86"), os: Cow::Borrowed("windows"), major: 3, minor: 11, patch: 9, suffix: None }, "https://github.com/indygreg/python-build-standalone/releases/download/20240415/cpython-3.11.9%2B20240415-i686-pc-windows-msvc-shared-pgo-full.tar.zst", Some("f0405bb7e19e4dbf7db290c224fc4aa333d3e16e0ed571f0794becac620fa26a")), - (PythonVersion { name: Cow::Borrowed("cpython"), arch: Cow::Borrowed("x86_64"), os: Cow::Borrowed("linux"), major: 3, minor: 11, patch: 9, suffix: None }, "https://github.com/indygreg/python-build-standalone/releases/download/20240415/cpython-3.11.9%2B20240415-x86_64-unknown-linux-gnu-pgo%2Blto-full.tar.zst", Some("1c5038da28a4379c065db85116594524010f30e653307c53bb9694e4e710d2c7")), - (PythonVersion { name: Cow::Borrowed("cpython"), arch: Cow::Borrowed("x86_64"), os: Cow::Borrowed("macos"), major: 3, minor: 11, patch: 9, suffix: None }, "https://github.com/indygreg/python-build-standalone/releases/download/20240415/cpython-3.11.9%2B20240415-x86_64-apple-darwin-pgo%2Blto-full.tar.zst", Some("b1b156ceed6bc53c3c8816b3b5c3983d2c7070a8a42558b9c6dd730faec164e2")), - (PythonVersion { name: Cow::Borrowed("cpython"), arch: Cow::Borrowed("x86_64"), os: Cow::Borrowed("windows"), major: 3, minor: 11, patch: 9, suffix: None }, "https://github.com/indygreg/python-build-standalone/releases/download/20240415/cpython-3.11.9%2B20240415-x86_64-pc-windows-msvc-shared-pgo-full.tar.zst", Some("25344b08303f72ba2a37c33aa240fbd2c8d5a41bcce79cff63923b3d778c645c")), + (PythonVersion { name: Cow::Borrowed("cpython"), arch: Cow::Borrowed("aarch64"), os: Cow::Borrowed("linux"), major: 3, minor: 11, patch: 9, suffix: None }, "https://github.com/indygreg/python-build-standalone/releases/download/20240713/cpython-3.11.9%2B20240713-aarch64-unknown-linux-gnu-lto-full.tar.zst", Some("806a1c30d200ba7cc491f024d122fd4127bb6e094f45040f4d6ff5738a7897e5")), + (PythonVersion { name: Cow::Borrowed("cpython"), arch: Cow::Borrowed("aarch64"), os: Cow::Borrowed("macos"), major: 3, minor: 11, patch: 9, suffix: None }, "https://github.com/indygreg/python-build-standalone/releases/download/20240713/cpython-3.11.9%2B20240713-aarch64-apple-darwin-pgo%2Blto-full.tar.zst", Some("4cb03ac8b12366038059045aa8405794b96d9b3c73919c157a98f73e21b13031")), + (PythonVersion { name: Cow::Borrowed("cpython"), arch: Cow::Borrowed("x86"), os: Cow::Borrowed("windows"), major: 3, minor: 11, patch: 9, suffix: None }, "https://github.com/indygreg/python-build-standalone/releases/download/20240713/cpython-3.11.9%2B20240713-i686-pc-windows-msvc-shared-pgo-full.tar.zst", Some("4ef2bc9db41b845d35a44bc166abbbb30514a2742ef37643f8c122a6bd71534e")), + (PythonVersion { name: Cow::Borrowed("cpython"), arch: Cow::Borrowed("x86_64"), os: Cow::Borrowed("linux"), major: 3, minor: 11, patch: 9, suffix: None }, "https://github.com/indygreg/python-build-standalone/releases/download/20240713/cpython-3.11.9%2B20240713-x86_64-unknown-linux-gnu-pgo%2Blto-full.tar.zst", Some("131d8c047f5ca97773c22bed35aca2a9cde267d3ebe13de54aa3c333fe1d19f6")), + (PythonVersion { name: Cow::Borrowed("cpython"), arch: Cow::Borrowed("x86_64"), os: Cow::Borrowed("macos"), major: 3, minor: 11, patch: 9, suffix: None }, "https://github.com/indygreg/python-build-standalone/releases/download/20240713/cpython-3.11.9%2B20240713-x86_64-apple-darwin-pgo%2Blto-full.tar.zst", Some("d4f99453e0ab87c11c10ee1d173ef55afc0e4750492b38e89c9e30aa14198e19")), + (PythonVersion { name: Cow::Borrowed("cpython"), arch: Cow::Borrowed("x86_64"), os: Cow::Borrowed("windows"), major: 3, minor: 11, patch: 9, suffix: None }, "https://github.com/indygreg/python-build-standalone/releases/download/20240713/cpython-3.11.9%2B20240713-x86_64-pc-windows-msvc-shared-pgo-full.tar.zst", Some("126ddab6d6f6fbfe2f3e73176476fdf306d3ccfac67f8542d12ce0c998142644")), (PythonVersion { name: Cow::Borrowed("cpython"), arch: Cow::Borrowed("aarch64"), os: Cow::Borrowed("linux"), major: 3, minor: 11, patch: 8, suffix: None }, "https://github.com/indygreg/python-build-standalone/releases/download/20240224/cpython-3.11.8%2B20240224-aarch64-unknown-linux-gnu-lto-full.tar.zst", Some("1d84ed69e5acce555513e9261ce4b78bed19969b06a51a26b2781a375d70083d")), (PythonVersion { name: Cow::Borrowed("cpython"), arch: Cow::Borrowed("aarch64"), os: Cow::Borrowed("macos"), major: 3, minor: 11, patch: 8, suffix: None }, "https://github.com/indygreg/python-build-standalone/releases/download/20240224/cpython-3.11.8%2B20240224-aarch64-apple-darwin-pgo%2Blto-full.tar.zst", Some("c0650884b929253b8688797d1955850f6e339bf0428b3d935f62ab3159f66362")), (PythonVersion { name: Cow::Borrowed("cpython"), arch: Cow::Borrowed("x86"), os: Cow::Borrowed("windows"), major: 3, minor: 11, patch: 8, suffix: None }, "https://github.com/indygreg/python-build-standalone/releases/download/20240224/cpython-3.11.8%2B20240224-i686-pc-windows-msvc-shared-pgo-full.tar.zst", Some("c3e90962996177a027bd73dd9fd8c42a2d6ef832cda26db4ab4efc6105160537")), @@ -177,12 +183,12 @@ pub const PYTHON_VERSIONS: &[(PythonVersion, &str, Option<&str>)] = &[ (PythonVersion { name: Cow::Borrowed("cpython"), arch: Cow::Borrowed("x86_64"), os: Cow::Borrowed("linux"), major: 3, minor: 11, patch: 1, suffix: None }, "https://github.com/indygreg/python-build-standalone/releases/download/20230116/cpython-3.11.1%2B20230116-x86_64-unknown-linux-gnu-pgo%2Blto-full.tar.zst", Some("02332441cb610b1e1aa2d2972e261e2910cc6a950b7973cac22c0759a93c5fcd")), (PythonVersion { name: Cow::Borrowed("cpython"), arch: Cow::Borrowed("x86_64"), os: Cow::Borrowed("macos"), major: 3, minor: 11, patch: 1, suffix: None }, "https://github.com/indygreg/python-build-standalone/releases/download/20230116/cpython-3.11.1%2B20230116-x86_64-apple-darwin-pgo%2Blto-full.tar.zst", Some("0eb61be53ee13cf75a30b8a164ef513a2c7995b25b118a3a503245d46231b13a")), (PythonVersion { name: Cow::Borrowed("cpython"), arch: Cow::Borrowed("x86_64"), os: Cow::Borrowed("windows"), major: 3, minor: 11, patch: 1, suffix: None }, "https://github.com/indygreg/python-build-standalone/releases/download/20230116/cpython-3.11.1%2B20230116-x86_64-pc-windows-msvc-shared-pgo-full.tar.zst", Some("f5c46fffda7d7894b975af728f739b02d1cec50fd4a3ea49f69de9ceaae74b17")), - (PythonVersion { name: Cow::Borrowed("cpython"), arch: Cow::Borrowed("aarch64"), os: Cow::Borrowed("linux"), major: 3, minor: 10, patch: 14, suffix: None }, "https://github.com/indygreg/python-build-standalone/releases/download/20240415/cpython-3.10.14%2B20240415-aarch64-unknown-linux-gnu-lto-full.tar.zst", Some("630bbbba148557bf670fbd65eb7fcd3c212cac45387d135c02799a13967d0f3d")), - (PythonVersion { name: Cow::Borrowed("cpython"), arch: Cow::Borrowed("aarch64"), os: Cow::Borrowed("macos"), major: 3, minor: 10, patch: 14, suffix: None }, "https://github.com/indygreg/python-build-standalone/releases/download/20240415/cpython-3.10.14%2B20240415-aarch64-apple-darwin-pgo%2Blto-full.tar.zst", Some("fa95c3a18e29234cf10c0befa2f08246307cab7f473ccc1804845be3caab076d")), - (PythonVersion { name: Cow::Borrowed("cpython"), arch: Cow::Borrowed("x86"), os: Cow::Borrowed("windows"), major: 3, minor: 10, patch: 14, suffix: None }, "https://github.com/indygreg/python-build-standalone/releases/download/20240415/cpython-3.10.14%2B20240415-i686-pc-windows-msvc-shared-pgo-full.tar.zst", Some("4fafd723944ae98611005caf0ad7dbb262e02c61ddfa7c45f0d097f0965839a8")), - (PythonVersion { name: Cow::Borrowed("cpython"), arch: Cow::Borrowed("x86_64"), os: Cow::Borrowed("linux"), major: 3, minor: 10, patch: 14, suffix: None }, "https://github.com/indygreg/python-build-standalone/releases/download/20240415/cpython-3.10.14%2B20240415-x86_64-unknown-linux-gnu-pgo%2Blto-full.tar.zst", Some("add8cc6cbb4f2a3f8af2272e62b7604f7529a8c357c0af0f8a9f7d3dd444ef1e")), - (PythonVersion { name: Cow::Borrowed("cpython"), arch: Cow::Borrowed("x86_64"), os: Cow::Borrowed("macos"), major: 3, minor: 10, patch: 14, suffix: None }, "https://github.com/indygreg/python-build-standalone/releases/download/20240415/cpython-3.10.14%2B20240415-x86_64-apple-darwin-pgo%2Blto-full.tar.zst", Some("cc3fa88159a50d639dff84af9ffe2a50d6eda41b51037c755b5a13b88ce50153")), - (PythonVersion { name: Cow::Borrowed("cpython"), arch: Cow::Borrowed("x86_64"), os: Cow::Borrowed("windows"), major: 3, minor: 10, patch: 14, suffix: None }, "https://github.com/indygreg/python-build-standalone/releases/download/20240415/cpython-3.10.14%2B20240415-x86_64-pc-windows-msvc-shared-pgo-full.tar.zst", Some("abc3041f0de7e700229c0628dfcba7ba1d15c8b2924621add7baf1554a088768")), + (PythonVersion { name: Cow::Borrowed("cpython"), arch: Cow::Borrowed("aarch64"), os: Cow::Borrowed("linux"), major: 3, minor: 10, patch: 14, suffix: None }, "https://github.com/indygreg/python-build-standalone/releases/download/20240713/cpython-3.10.14%2B20240713-aarch64-unknown-linux-gnu-lto-full.tar.zst", Some("115204ab7c5013ec2b0e9e594c4ef55b5eb892bdfcc55eb56ed5b4845515df7e")), + (PythonVersion { name: Cow::Borrowed("cpython"), arch: Cow::Borrowed("aarch64"), os: Cow::Borrowed("macos"), major: 3, minor: 10, patch: 14, suffix: None }, "https://github.com/indygreg/python-build-standalone/releases/download/20240713/cpython-3.10.14%2B20240713-aarch64-apple-darwin-pgo%2Blto-full.tar.zst", Some("4558c58bd03309d0c7131d4b5c2cbce9843d385fbcc7d75e575b4bf887bf5f68")), + (PythonVersion { name: Cow::Borrowed("cpython"), arch: Cow::Borrowed("x86"), os: Cow::Borrowed("windows"), major: 3, minor: 10, patch: 14, suffix: None }, "https://github.com/indygreg/python-build-standalone/releases/download/20240713/cpython-3.10.14%2B20240713-i686-pc-windows-msvc-shared-pgo-full.tar.zst", Some("d6fc0101ba01d63aae1416d8205fe5c700f80d5bed1edbab1250c900d85a7d20")), + (PythonVersion { name: Cow::Borrowed("cpython"), arch: Cow::Borrowed("x86_64"), os: Cow::Borrowed("linux"), major: 3, minor: 10, patch: 14, suffix: None }, "https://github.com/indygreg/python-build-standalone/releases/download/20240713/cpython-3.10.14%2B20240713-x86_64-unknown-linux-gnu-pgo%2Blto-full.tar.zst", Some("01c1038755944cbd7017a4e13e53237e68cd6bbfcff34ca8c9f53a71653e5c9a")), + (PythonVersion { name: Cow::Borrowed("cpython"), arch: Cow::Borrowed("x86_64"), os: Cow::Borrowed("macos"), major: 3, minor: 10, patch: 14, suffix: None }, "https://github.com/indygreg/python-build-standalone/releases/download/20240713/cpython-3.10.14%2B20240713-x86_64-apple-darwin-pgo%2Blto-full.tar.zst", Some("ece66670f9464828bce9e276a74da62d4663ab8cfd277f6758a7c65d1f245fa0")), + (PythonVersion { name: Cow::Borrowed("cpython"), arch: Cow::Borrowed("x86_64"), os: Cow::Borrowed("windows"), major: 3, minor: 10, patch: 14, suffix: None }, "https://github.com/indygreg/python-build-standalone/releases/download/20240713/cpython-3.10.14%2B20240713-x86_64-pc-windows-msvc-shared-pgo-full.tar.zst", Some("1003c93f92fdcca57308076995b224b888a7ee556763759e69d36e198b5bef14")), (PythonVersion { name: Cow::Borrowed("cpython"), arch: Cow::Borrowed("aarch64"), os: Cow::Borrowed("linux"), major: 3, minor: 10, patch: 13, suffix: None }, "https://github.com/indygreg/python-build-standalone/releases/download/20240224/cpython-3.10.13%2B20240224-aarch64-unknown-linux-gnu-lto-full.tar.zst", Some("7f23a4afa4032a7c5a4e0ec926da37eea242472142613c2baa029ef61c3c493c")), (PythonVersion { name: Cow::Borrowed("cpython"), arch: Cow::Borrowed("aarch64"), os: Cow::Borrowed("macos"), major: 3, minor: 10, patch: 13, suffix: None }, "https://github.com/indygreg/python-build-standalone/releases/download/20240224/cpython-3.10.13%2B20240224-aarch64-apple-darwin-pgo%2Blto-full.tar.zst", Some("57b83a4aa32bdbe7611f1290313ef24f2574dff5fa59181c0ccb26c14c688b73")), (PythonVersion { name: Cow::Borrowed("cpython"), arch: Cow::Borrowed("x86"), os: Cow::Borrowed("linux"), major: 3, minor: 10, patch: 13, suffix: None }, "https://github.com/indygreg/python-build-standalone/releases/download/20230826/cpython-3.10.13%2B20230826-i686-unknown-linux-gnu-pgo%2Blto-full.tar.zst", Some("cc5625a16fbec682d4ce40c0d185318164bd181efaa7eaf945ca63015db9fea3")), @@ -267,12 +273,12 @@ pub const PYTHON_VERSIONS: &[(PythonVersion, &str, Option<&str>)] = &[ (PythonVersion { name: Cow::Borrowed("cpython"), arch: Cow::Borrowed("x86_64"), os: Cow::Borrowed("linux"), major: 3, minor: 10, patch: 0, suffix: None }, "https://github.com/indygreg/python-build-standalone/releases/download/20211017/cpython-3.10.0-x86_64-unknown-linux-gnu-pgo%2Blto-20211017T1616.tar.zst", None), (PythonVersion { name: Cow::Borrowed("cpython"), arch: Cow::Borrowed("x86_64"), os: Cow::Borrowed("macos"), major: 3, minor: 10, patch: 0, suffix: None }, "https://github.com/indygreg/python-build-standalone/releases/download/20211017/cpython-3.10.0-x86_64-apple-darwin-pgo%2Blto-20211017T1616.tar.zst", None), (PythonVersion { name: Cow::Borrowed("cpython"), arch: Cow::Borrowed("x86_64"), os: Cow::Borrowed("windows"), major: 3, minor: 10, patch: 0, suffix: None }, "https://github.com/indygreg/python-build-standalone/releases/download/20211017/cpython-3.10.0-x86_64-pc-windows-msvc-shared-pgo-20211017T1616.tar.zst", None), - (PythonVersion { name: Cow::Borrowed("cpython"), arch: Cow::Borrowed("aarch64"), os: Cow::Borrowed("linux"), major: 3, minor: 9, patch: 19, suffix: None }, "https://github.com/indygreg/python-build-standalone/releases/download/20240415/cpython-3.9.19%2B20240415-aarch64-unknown-linux-gnu-lto-full.tar.zst", Some("c462b6f2ab7d87b1000972ff6c1e797c86a1306cceee02cdcc81cd2240f44d34")), - (PythonVersion { name: Cow::Borrowed("cpython"), arch: Cow::Borrowed("aarch64"), os: Cow::Borrowed("macos"), major: 3, minor: 9, patch: 19, suffix: None }, "https://github.com/indygreg/python-build-standalone/releases/download/20240415/cpython-3.9.19%2B20240415-aarch64-apple-darwin-pgo%2Blto-full.tar.zst", Some("04fd532cfba9b3184a94feaf689bd6147759f1d34ddd674e8b2c146b37a994b1")), - (PythonVersion { name: Cow::Borrowed("cpython"), arch: Cow::Borrowed("x86"), os: Cow::Borrowed("windows"), major: 3, minor: 9, patch: 19, suffix: None }, "https://github.com/indygreg/python-build-standalone/releases/download/20240415/cpython-3.9.19%2B20240415-i686-pc-windows-msvc-shared-pgo-full.tar.zst", Some("7e6edb16a3973fbb894f3cf4f60a34e22645e84621ec61c622cf4c5a2f4bf2a2")), - (PythonVersion { name: Cow::Borrowed("cpython"), arch: Cow::Borrowed("x86_64"), os: Cow::Borrowed("linux"), major: 3, minor: 9, patch: 19, suffix: None }, "https://github.com/indygreg/python-build-standalone/releases/download/20240415/cpython-3.9.19%2B20240415-x86_64-unknown-linux-gnu-pgo%2Blto-full.tar.zst", Some("e1a07336705b58215f8ea138f4abee4640b1baa018e84a9ed44d9a47c7bfa0c8")), - (PythonVersion { name: Cow::Borrowed("cpython"), arch: Cow::Borrowed("x86_64"), os: Cow::Borrowed("macos"), major: 3, minor: 9, patch: 19, suffix: None }, "https://github.com/indygreg/python-build-standalone/releases/download/20240415/cpython-3.9.19%2B20240415-x86_64-apple-darwin-pgo%2Blto-full.tar.zst", Some("2bb4ed2fc03bb05ac6680b8c11d3c64f7a7dd24b80089c5ad85a91ea4a1795aa")), - (PythonVersion { name: Cow::Borrowed("cpython"), arch: Cow::Borrowed("x86_64"), os: Cow::Borrowed("windows"), major: 3, minor: 9, patch: 19, suffix: None }, "https://github.com/indygreg/python-build-standalone/releases/download/20240415/cpython-3.9.19%2B20240415-x86_64-pc-windows-msvc-shared-pgo-full.tar.zst", Some("e3611b5699c97bf5ac289e3636e8f932fb177997ee69a81b0c2b15c766ca6f13")), + (PythonVersion { name: Cow::Borrowed("cpython"), arch: Cow::Borrowed("aarch64"), os: Cow::Borrowed("linux"), major: 3, minor: 9, patch: 19, suffix: None }, "https://github.com/indygreg/python-build-standalone/releases/download/20240713/cpython-3.9.19%2B20240713-aarch64-unknown-linux-gnu-lto-full.tar.zst", Some("dbd9882b61082c05496ef00c43760802d04cf3158b51d69b29b088d9346c1f09")), + (PythonVersion { name: Cow::Borrowed("cpython"), arch: Cow::Borrowed("aarch64"), os: Cow::Borrowed("macos"), major: 3, minor: 9, patch: 19, suffix: None }, "https://github.com/indygreg/python-build-standalone/releases/download/20240713/cpython-3.9.19%2B20240713-aarch64-apple-darwin-pgo%2Blto-full.tar.zst", Some("e1a251fc23529800653be104aae59cf60f74fa0ebecf373b35e20bfaabee3fe4")), + (PythonVersion { name: Cow::Borrowed("cpython"), arch: Cow::Borrowed("x86"), os: Cow::Borrowed("windows"), major: 3, minor: 9, patch: 19, suffix: None }, "https://github.com/indygreg/python-build-standalone/releases/download/20240713/cpython-3.9.19%2B20240713-i686-pc-windows-msvc-shared-pgo-full.tar.zst", Some("02095d278a23244d84c82dafc608c259b0cd0c8a21f5a7faf8b1630271304a75")), + (PythonVersion { name: Cow::Borrowed("cpython"), arch: Cow::Borrowed("x86_64"), os: Cow::Borrowed("linux"), major: 3, minor: 9, patch: 19, suffix: None }, "https://github.com/indygreg/python-build-standalone/releases/download/20240713/cpython-3.9.19%2B20240713-x86_64-unknown-linux-gnu-pgo%2Blto-full.tar.zst", Some("c623fad21b04611a3456a95b03d286fd29297b803b99f59bf45ec8eb87dae12d")), + (PythonVersion { name: Cow::Borrowed("cpython"), arch: Cow::Borrowed("x86_64"), os: Cow::Borrowed("macos"), major: 3, minor: 9, patch: 19, suffix: None }, "https://github.com/indygreg/python-build-standalone/releases/download/20240713/cpython-3.9.19%2B20240713-x86_64-apple-darwin-pgo%2Blto-full.tar.zst", Some("46a30e4f7d93c8863e1ef4064f9e9dbe088af35147f57553c3dbf5188290b1e5")), + (PythonVersion { name: Cow::Borrowed("cpython"), arch: Cow::Borrowed("x86_64"), os: Cow::Borrowed("windows"), major: 3, minor: 9, patch: 19, suffix: None }, "https://github.com/indygreg/python-build-standalone/releases/download/20240713/cpython-3.9.19%2B20240713-x86_64-pc-windows-msvc-shared-pgo-full.tar.zst", Some("961fda1c29d7280ac7989a5055d9495674a959abc8137402e19da96d7e8a59c1")), (PythonVersion { name: Cow::Borrowed("cpython"), arch: Cow::Borrowed("aarch64"), os: Cow::Borrowed("linux"), major: 3, minor: 9, patch: 18, suffix: None }, "https://github.com/indygreg/python-build-standalone/releases/download/20240224/cpython-3.9.18%2B20240224-aarch64-unknown-linux-gnu-lto-full.tar.zst", Some("93d7b15bf02a3191cfdee9d9d68bf2da782fc04cb142bcca6a4299fe524d9b37")), (PythonVersion { name: Cow::Borrowed("cpython"), arch: Cow::Borrowed("aarch64"), os: Cow::Borrowed("macos"), major: 3, minor: 9, patch: 18, suffix: None }, "https://github.com/indygreg/python-build-standalone/releases/download/20240224/cpython-3.9.18%2B20240224-aarch64-apple-darwin-pgo%2Blto-full.tar.zst", Some("579f9b68bbb3a915cbab9682e4d3c253bc96b0556b8a860982c49c25c61f974a")), (PythonVersion { name: Cow::Borrowed("cpython"), arch: Cow::Borrowed("x86"), os: Cow::Borrowed("linux"), major: 3, minor: 9, patch: 18, suffix: None }, "https://github.com/indygreg/python-build-standalone/releases/download/20230826/cpython-3.9.18%2B20230826-i686-unknown-linux-gnu-pgo%2Blto-full.tar.zst", Some("9e40a541b4eb6eb0a5e2f35724a18332aea91c61e18dec77ca40da5cf2496839")), @@ -381,12 +387,12 @@ pub const PYTHON_VERSIONS: &[(PythonVersion, &str, Option<&str>)] = &[ (PythonVersion { name: Cow::Borrowed("cpython"), arch: Cow::Borrowed("x86_64"), os: Cow::Borrowed("linux"), major: 3, minor: 9, patch: 0, suffix: None }, "https://github.com/indygreg/python-build-standalone/releases/download/20201020/cpython-3.9.0-x86_64-unknown-linux-gnu-pgo-20201020T0627.tar.zst", None), (PythonVersion { name: Cow::Borrowed("cpython"), arch: Cow::Borrowed("x86_64"), os: Cow::Borrowed("macos"), major: 3, minor: 9, patch: 0, suffix: None }, "https://github.com/indygreg/python-build-standalone/releases/download/20201020/cpython-3.9.0-x86_64-apple-darwin-pgo-20201020T0626.tar.zst", None), (PythonVersion { name: Cow::Borrowed("cpython"), arch: Cow::Borrowed("x86_64"), os: Cow::Borrowed("windows"), major: 3, minor: 9, patch: 0, suffix: None }, "https://github.com/indygreg/python-build-standalone/releases/download/20201020/cpython-3.9.0-x86_64-pc-windows-msvc-shared-pgo-20201021T0245.tar.zst", None), - (PythonVersion { name: Cow::Borrowed("cpython"), arch: Cow::Borrowed("aarch64"), os: Cow::Borrowed("linux"), major: 3, minor: 8, patch: 19, suffix: None }, "https://github.com/indygreg/python-build-standalone/releases/download/20240415/cpython-3.8.19%2B20240415-aarch64-unknown-linux-gnu-lto-full.tar.zst", Some("31415fdb0d8ea48f09d4a7e0e007f0dd77809be67f5e73ec803f6856d491c542")), - (PythonVersion { name: Cow::Borrowed("cpython"), arch: Cow::Borrowed("aarch64"), os: Cow::Borrowed("macos"), major: 3, minor: 8, patch: 19, suffix: None }, "https://github.com/indygreg/python-build-standalone/releases/download/20240415/cpython-3.8.19%2B20240415-aarch64-apple-darwin-pgo%2Blto-full.tar.zst", Some("08cf698453d0a3080426a70dbb43220e915eb4401a9ea0fc798f9f27a3bf7f88")), - (PythonVersion { name: Cow::Borrowed("cpython"), arch: Cow::Borrowed("x86"), os: Cow::Borrowed("windows"), major: 3, minor: 8, patch: 19, suffix: None }, "https://github.com/indygreg/python-build-standalone/releases/download/20240415/cpython-3.8.19%2B20240415-i686-pc-windows-msvc-shared-pgo-full.tar.zst", Some("d1776a6eecc3bcf549fdbd7adcc9a1ee6e0f0dfaa8ad77f055f5972882d0d227")), - (PythonVersion { name: Cow::Borrowed("cpython"), arch: Cow::Borrowed("x86_64"), os: Cow::Borrowed("linux"), major: 3, minor: 8, patch: 19, suffix: None }, "https://github.com/indygreg/python-build-standalone/releases/download/20240415/cpython-3.8.19%2B20240415-x86_64-unknown-linux-gnu-pgo%2Blto-full.tar.zst", Some("778a2f806278f033c683b224aa595775c369717d477e0152b1293c9677ba9377")), - (PythonVersion { name: Cow::Borrowed("cpython"), arch: Cow::Borrowed("x86_64"), os: Cow::Borrowed("macos"), major: 3, minor: 8, patch: 19, suffix: None }, "https://github.com/indygreg/python-build-standalone/releases/download/20240415/cpython-3.8.19%2B20240415-x86_64-apple-darwin-pgo%2Blto-full.tar.zst", Some("e011239aec57e2074093a31f6fb3fee036671ab777fb9764e32bfdb869a80652")), - (PythonVersion { name: Cow::Borrowed("cpython"), arch: Cow::Borrowed("x86_64"), os: Cow::Borrowed("windows"), major: 3, minor: 8, patch: 19, suffix: None }, "https://github.com/indygreg/python-build-standalone/releases/download/20240415/cpython-3.8.19%2B20240415-x86_64-pc-windows-msvc-shared-pgo-full.tar.zst", Some("ff0812147ab19101c219d0648cf0dbe22b3612decd6034c286451dafe5fe5134")), + (PythonVersion { name: Cow::Borrowed("cpython"), arch: Cow::Borrowed("aarch64"), os: Cow::Borrowed("linux"), major: 3, minor: 8, patch: 19, suffix: None }, "https://github.com/indygreg/python-build-standalone/releases/download/20240713/cpython-3.8.19%2B20240713-aarch64-unknown-linux-gnu-lto-full.tar.zst", Some("ef62298357f66f9bf808cc27a32b4fdfd61860551fea3e946df820918e5ad6f3")), + (PythonVersion { name: Cow::Borrowed("cpython"), arch: Cow::Borrowed("aarch64"), os: Cow::Borrowed("macos"), major: 3, minor: 8, patch: 19, suffix: None }, "https://github.com/indygreg/python-build-standalone/releases/download/20240713/cpython-3.8.19%2B20240713-aarch64-apple-darwin-pgo%2Blto-full.tar.zst", Some("d27327b398fea1a82bafc574c5d906b2e97192e04c2514dd431d723df72e9711")), + (PythonVersion { name: Cow::Borrowed("cpython"), arch: Cow::Borrowed("x86"), os: Cow::Borrowed("windows"), major: 3, minor: 8, patch: 19, suffix: None }, "https://github.com/indygreg/python-build-standalone/releases/download/20240713/cpython-3.8.19%2B20240713-i686-pc-windows-msvc-shared-pgo-full.tar.zst", Some("24d65be61d177147b37d4696ad775a6a011b0b3aafac93bd615a9474c53f0a7e")), + (PythonVersion { name: Cow::Borrowed("cpython"), arch: Cow::Borrowed("x86_64"), os: Cow::Borrowed("linux"), major: 3, minor: 8, patch: 19, suffix: None }, "https://github.com/indygreg/python-build-standalone/releases/download/20240713/cpython-3.8.19%2B20240713-x86_64-unknown-linux-gnu-pgo%2Blto-full.tar.zst", Some("61ac5bd70e29fa66b4739e37be66ec164b04f1dd5875c7ee2d223cf3265d4292")), + (PythonVersion { name: Cow::Borrowed("cpython"), arch: Cow::Borrowed("x86_64"), os: Cow::Borrowed("macos"), major: 3, minor: 8, patch: 19, suffix: None }, "https://github.com/indygreg/python-build-standalone/releases/download/20240713/cpython-3.8.19%2B20240713-x86_64-apple-darwin-pgo%2Blto-full.tar.zst", Some("d9546a80f2e979b18a915d4c9aa3e053aeec9a4ddb9bab706ee55e6ebaf3b347")), + (PythonVersion { name: Cow::Borrowed("cpython"), arch: Cow::Borrowed("x86_64"), os: Cow::Borrowed("windows"), major: 3, minor: 8, patch: 19, suffix: None }, "https://github.com/indygreg/python-build-standalone/releases/download/20240713/cpython-3.8.19%2B20240713-x86_64-pc-windows-msvc-shared-pgo-full.tar.zst", Some("625f1c22a8f903abf07eff43209f65fc0c4857be5aef5c9945daef83f2687af2")), (PythonVersion { name: Cow::Borrowed("cpython"), arch: Cow::Borrowed("aarch64"), os: Cow::Borrowed("linux"), major: 3, minor: 8, patch: 18, suffix: None }, "https://github.com/indygreg/python-build-standalone/releases/download/20240224/cpython-3.8.18%2B20240224-aarch64-unknown-linux-gnu-lto-full.tar.zst", Some("df66801678a5f4accee67784aff058f283fd52e42898527b7ff0e1cbc3e50e8c")), (PythonVersion { name: Cow::Borrowed("cpython"), arch: Cow::Borrowed("aarch64"), os: Cow::Borrowed("macos"), major: 3, minor: 8, patch: 18, suffix: None }, "https://github.com/indygreg/python-build-standalone/releases/download/20240224/cpython-3.8.18%2B20240224-aarch64-apple-darwin-pgo%2Blto-full.tar.zst", Some("c732c068cddcd6a008c1d6d8e35802f5bdc7323bd2eb64e77210d3d5fe4740c2")), (PythonVersion { name: Cow::Borrowed("cpython"), arch: Cow::Borrowed("x86"), os: Cow::Borrowed("windows"), major: 3, minor: 8, patch: 18, suffix: None }, "https://github.com/indygreg/python-build-standalone/releases/download/20240224/cpython-3.8.18%2B20240224-i686-pc-windows-msvc-shared-pgo-full.tar.zst", Some("9f94c7b54b97116cd308e73cda0b7a7b7fff4515932c5cbba18eeae9ec798351")), diff --git a/rye/src/sources/generated/uv_downloads.inc b/rye/src/sources/generated/uv_downloads.inc index a7377da519..63e961a7f9 100644 --- a/rye/src/sources/generated/uv_downloads.inc +++ b/rye/src/sources/generated/uv_downloads.inc @@ -2,11 +2,11 @@ // To regenerate, run `rye run uv-downloads > rye/src/sources/generated/uv_downloads.inc` from the root of the repository. use std::borrow::Cow; pub const UV_DOWNLOADS: &[UvDownload] = &[ - UvDownload {arch: Cow::Borrowed("aarch64"), os: Cow::Borrowed("macos"), major: 0, minor: 1, patch: 39, suffix: None, url: Cow::Borrowed("https://github.com/astral-sh/uv/releases/download/0.1.39/uv-aarch64-apple-darwin.tar.gz"), sha256: Cow::Borrowed("35e320cfa41c8902d66e2c491b5b2d2414e1c6443177c660736de657c66fb2c2") }, - UvDownload {arch: Cow::Borrowed("aarch64"), os: Cow::Borrowed("linux"), major: 0, minor: 1, patch: 39, suffix: None, url: Cow::Borrowed("https://github.com/astral-sh/uv/releases/download/0.1.39/uv-aarch64-unknown-linux-gnu.tar.gz"), sha256: Cow::Borrowed("62b24363f21c07e02f62cf8e298ee6ec30e844006f3a52ac55c02903c755586d") }, - UvDownload {arch: Cow::Borrowed("i686"), os: Cow::Borrowed("windows"), major: 0, minor: 1, patch: 39, suffix: None, url: Cow::Borrowed("https://github.com/astral-sh/uv/releases/download/0.1.39/uv-i686-pc-windows-msvc.zip"), sha256: Cow::Borrowed("53e4c2ae32318699a5f6c4c7f19f1dd114b39b15e63704be902ff894b428dfed") }, - UvDownload {arch: Cow::Borrowed("i686"), os: Cow::Borrowed("linux"), major: 0, minor: 1, patch: 39, suffix: None, url: Cow::Borrowed("https://github.com/astral-sh/uv/releases/download/0.1.39/uv-i686-unknown-linux-gnu.tar.gz"), sha256: Cow::Borrowed("f0280538ed9bc68283606e4db031f9cc4c4c8404dc5719e9d1f03f705762966c") }, - UvDownload {arch: Cow::Borrowed("x86_64"), os: Cow::Borrowed("macos"), major: 0, minor: 1, patch: 39, suffix: None, url: Cow::Borrowed("https://github.com/astral-sh/uv/releases/download/0.1.39/uv-x86_64-apple-darwin.tar.gz"), sha256: Cow::Borrowed("cf5393f17de6961c7140d68f80e09c1f43ef47f8fac923ccd41896cce698f296") }, - UvDownload {arch: Cow::Borrowed("x86_64"), os: Cow::Borrowed("windows"), major: 0, minor: 1, patch: 39, suffix: None, url: Cow::Borrowed("https://github.com/astral-sh/uv/releases/download/0.1.39/uv-x86_64-pc-windows-msvc.zip"), sha256: Cow::Borrowed("a44eb417b0c1e1c7cffd7349b8019d684f6200d0b5cfaef7dc322e8312bb254c") }, - UvDownload {arch: Cow::Borrowed("x86_64"), os: Cow::Borrowed("linux"), major: 0, minor: 1, patch: 39, suffix: None, url: Cow::Borrowed("https://github.com/astral-sh/uv/releases/download/0.1.39/uv-x86_64-unknown-linux-gnu.tar.gz"), sha256: Cow::Borrowed("e748caea4ddafd3aebba771f4e8f51fe5aa517b71151a648269b3be982a349a1") }, + UvDownload {arch: Cow::Borrowed("aarch64"), os: Cow::Borrowed("macos"), major: 0, minor: 2, patch: 27, suffix: None, url: Cow::Borrowed("https://github.com/astral-sh/uv/releases/download/0.2.27/uv-aarch64-apple-darwin.tar.gz"), sha256: Cow::Borrowed("d071d3063933e2e98322619bd4318594e84b7f6ce4f6c5c13a2ef424b0704bb7") }, + UvDownload {arch: Cow::Borrowed("aarch64"), os: Cow::Borrowed("linux"), major: 0, minor: 2, patch: 27, suffix: None, url: Cow::Borrowed("https://github.com/astral-sh/uv/releases/download/0.2.27/uv-aarch64-unknown-linux-musl.tar.gz"), sha256: Cow::Borrowed("f7ad07f32e01dfdbd6b217c7f6acd7822eb6600d9992d204b93bfa0749bc6b29") }, + UvDownload {arch: Cow::Borrowed("i686"), os: Cow::Borrowed("windows"), major: 0, minor: 2, patch: 27, suffix: None, url: Cow::Borrowed("https://github.com/astral-sh/uv/releases/download/0.2.27/uv-i686-pc-windows-msvc.zip"), sha256: Cow::Borrowed("6183e4fecfe5404dc69d9cc23c248441ba25a21541c8046c8a27b09a63f224b7") }, + UvDownload {arch: Cow::Borrowed("i686"), os: Cow::Borrowed("linux"), major: 0, minor: 2, patch: 27, suffix: None, url: Cow::Borrowed("https://github.com/astral-sh/uv/releases/download/0.2.27/uv-i686-unknown-linux-gnu.tar.gz"), sha256: Cow::Borrowed("4def707256649e6ad40ad33c8c00464d163728a969e54baf94f9d8463b4b89d8") }, + UvDownload {arch: Cow::Borrowed("x86_64"), os: Cow::Borrowed("macos"), major: 0, minor: 2, patch: 27, suffix: None, url: Cow::Borrowed("https://github.com/astral-sh/uv/releases/download/0.2.27/uv-x86_64-apple-darwin.tar.gz"), sha256: Cow::Borrowed("56be1ded925e7c1852f8853f7637942786ae379c0ecdbc88cf101f17f8413129") }, + UvDownload {arch: Cow::Borrowed("x86_64"), os: Cow::Borrowed("windows"), major: 0, minor: 2, patch: 27, suffix: None, url: Cow::Borrowed("https://github.com/astral-sh/uv/releases/download/0.2.27/uv-x86_64-pc-windows-msvc.zip"), sha256: Cow::Borrowed("1ea0b0623c362c47c6d00801e09ddf948cc27cc18200e5390469e279dfb85d29") }, + UvDownload {arch: Cow::Borrowed("x86_64"), os: Cow::Borrowed("linux"), major: 0, minor: 2, patch: 27, suffix: None, url: Cow::Borrowed("https://github.com/astral-sh/uv/releases/download/0.2.27/uv-x86_64-unknown-linux-gnu.tar.gz"), sha256: Cow::Borrowed("224cdff5d82ff7053d1a9bf61e5ae89961d536eb2da8a4a13b93a49a0ab434bf") }, ]; diff --git a/rye/src/sync.rs b/rye/src/sync.rs index 0c644fb5bf..2f4ef59d01 100644 --- a/rye/src/sync.rs +++ b/rye/src/sync.rs @@ -23,7 +23,7 @@ use crate::utils::{ get_venv_python_bin, set_proxy_variables, symlink_dir, update_venv_sync_marker, CommandOutput, IoPathContext, }; -use crate::uv::UvBuilder; +use crate::uv::{UvBuilder, UvSyncOptions}; /// Controls the sync mode #[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Default)] @@ -105,6 +105,16 @@ pub fn sync(mut cmd: SyncOptions) -> Result<(), Error> { bail!("cannot sync or generate lockfile: package needs 'pyproject.toml'"); } + // Turn on generate_hashes if the project demands it. + if pyproject.generate_hashes() { + cmd.lock_options.generate_hashes = true; + } + + // Turn on universal locking if the project demands it. + if pyproject.universal() { + cmd.lock_options.universal = true; + } + // Turn on locking with sources if the project demands it. if pyproject.lock_with_sources() { cmd.lock_options.with_sources = true; @@ -252,6 +262,9 @@ pub fn sync(mut cmd: SyncOptions) -> Result<(), Error> { let tempdir = tempdir()?; let py_path = get_venv_python_bin(&venv); if Config::current().use_uv() { + let uv_options = UvSyncOptions { + keyring_provider: cmd.keyring_provider, + }; UvBuilder::new() .with_output(output.quieter()) .with_workdir(&pyproject.workspace_path()) @@ -259,7 +272,7 @@ pub fn sync(mut cmd: SyncOptions) -> Result<(), Error> { .ensure_exists()? .venv(&venv, &py_path, &py_ver, None)? .with_output(output) - .sync(&target_lockfile)?; + .sync(&target_lockfile, uv_options)?; } else { let mut pip_sync_cmd = Command::new(get_pip_sync(&py_ver, output)?); let root = pyproject.workspace_path(); @@ -319,6 +332,9 @@ pub fn sync(mut cmd: SyncOptions) -> Result<(), Error> { pub fn autosync( pyproject: &PyProject, output: CommandOutput, + pre: bool, + with_sources: bool, + generate_hashes: bool, keyring_provider: KeyringProvider, ) -> Result<(), Error> { sync(SyncOptions { @@ -327,7 +343,12 @@ pub fn autosync( mode: SyncMode::Regular, force: false, no_lock: false, - lock_options: LockOptions::default(), + lock_options: LockOptions { + pre, + with_sources, + generate_hashes, + ..Default::default() + }, pyproject: Some(pyproject.toml_path().to_path_buf()), keyring_provider, }) diff --git a/rye/src/utils/mod.rs b/rye/src/utils/mod.rs index c1121d1c5e..fc431a98c7 100644 --- a/rye/src/utils/mod.rs +++ b/rye/src/utils/mod.rs @@ -166,7 +166,7 @@ pub fn is_executable(path: &Path) -> bool { } #[cfg(windows)] { - ["exe", "bat", "cmd"] + ["com", "exe", "bat", "cmd"] .iter() .any(|x| path.with_extension(x).is_file()) } @@ -181,7 +181,7 @@ pub fn get_short_executable_name(path: &Path) -> String { #[cfg(windows)] { let short_name = path.file_name().unwrap().to_string_lossy().to_lowercase(); - for ext in [".exe", ".bat", ".cmd"] { + for ext in [".com", ".exe", ".bat", ".cmd"] { if let Some(base_name) = short_name.strip_suffix(ext) { return base_name.into(); } diff --git a/rye/src/utils/toml.rs b/rye/src/utils/toml.rs index b38f5351ff..48fc655ecb 100644 --- a/rye/src/utils/toml.rs +++ b/rye/src/utils/toml.rs @@ -48,7 +48,9 @@ pub fn reformat_array_multiline(deps: &mut Array) { rv.push_str(comment); } } - rv.push('\n'); + if !rv.is_empty() || !deps.is_empty() { + rv.push('\n'); + } rv }); deps.set_trailing_comma(true); diff --git a/rye/src/utils/windows.rs b/rye/src/utils/windows.rs index c260d433ee..f8472a9c52 100644 --- a/rye/src/utils/windows.rs +++ b/rye/src/utils/windows.rs @@ -174,7 +174,7 @@ pub(crate) fn add_to_programs(rye_home: &Path) -> Result<(), Error> { let mut uninstall_cmd = OsString::from("\""); uninstall_cmd.push(rye_home); - uninstall_cmd.push("\" self uninstall"); + uninstall_cmd.push("\\shims\\rye.exe\" self uninstall"); let reg_value = RegValue { bytes: to_winreg_bytes(uninstall_cmd.encode_wide().collect()), diff --git a/rye/src/uv.rs b/rye/src/uv.rs index 303fe9a9d8..4523c0dea1 100644 --- a/rye/src/uv.rs +++ b/rye/src/uv.rs @@ -1,5 +1,6 @@ -use crate::bootstrap::download_url; +use crate::bootstrap::{download_url, SELF_REQUIREMENTS}; use crate::lock::{make_project_root_fragment, KeyringProvider}; +use crate::piptools::LATEST_PIP; use crate::platform::get_app_dir; use crate::pyproject::{read_venv_marker, write_venv_marker, ExpandedSources}; use crate::sources::py::PythonVersion; @@ -21,6 +22,7 @@ pub struct UvInstallOptions { pub importlib_workaround: bool, pub extras: Vec, pub refresh: bool, + pub keyring_provider: KeyringProvider, } pub enum UvPackageUpgrade { @@ -40,6 +42,7 @@ struct UvCompileOptions { pub no_header: bool, pub keyring_provider: KeyringProvider, pub generate_hashes: bool, + pub universal: bool, } impl UvCompileOptions { @@ -64,6 +67,10 @@ impl UvCompileOptions { cmd.arg("--exclude-newer").arg(dt); } + if self.universal { + cmd.arg("--universal"); + } + match self.upgrade { UvPackageUpgrade::All => { cmd.arg("--upgrade"); @@ -76,12 +83,7 @@ impl UvCompileOptions { UvPackageUpgrade::Nothing => {} } - match self.keyring_provider { - KeyringProvider::Disabled => {} - KeyringProvider::Subprocess => { - cmd.arg("--keyring-provider").arg("subprocess"); - } - } + self.keyring_provider.add_as_pip_args(cmd); } } @@ -95,10 +97,28 @@ impl Default for UvCompileOptions { no_header: false, generate_hashes: false, keyring_provider: KeyringProvider::Disabled, + universal: false, } } } +pub struct UvSyncOptions { + pub keyring_provider: KeyringProvider, +} + +impl UvSyncOptions { + pub fn add_as_pip_args(self, cmd: &mut Command) { + self.keyring_provider.add_as_pip_args(cmd); + } +} + +impl Default for UvSyncOptions { + fn default() -> Self { + Self { + keyring_provider: KeyringProvider::Disabled, + } + } +} pub struct UvBuilder { workdir: Option, sources: Option, @@ -248,6 +268,12 @@ impl Uv { Ok(()) } + /// Set the [`CommandOutput`] level for subsequent invocations of uv. + #[must_use] + pub fn with_output(self, output: CommandOutput) -> Self { + Self { output, ..self } + } + /// Returns a new command with the uv binary as the command to run. /// The command will have the correct proxy settings and verbosity level based on CommandOutput. pub fn cmd(&self) -> Command { @@ -311,7 +337,7 @@ impl Uv { format!( "unable to create self venv using {}. It might be that \ the used Python build is incompatible with this machine. \ - For more information see https://rye-up.com/guide/installation/", + For more information see https://rye.astral.sh/guide/installation/", py_bin.display() ) })?; @@ -337,6 +363,7 @@ impl Uv { upgrade: UvPackageUpgrade, keyring_provider: KeyringProvider, generate_hashes: bool, + universal: bool, ) -> Result<(), Error> { let options = UvCompileOptions { allow_prerelease, @@ -346,6 +373,7 @@ impl Uv { no_header: true, generate_hashes, keyring_provider, + universal, }; let mut cmd = self.cmd(); @@ -425,6 +453,12 @@ impl UvWithVenv { Ok(()) } + /// Install the bootstrap requirements in the venv. + pub fn bootstrap(&self) -> Result<(), Error> { + self.update(LATEST_PIP, SELF_REQUIREMENTS)?; + Ok(()) + } + /// Updates the pip version in the venv. pub fn update_pip(&self, pip_version: &str) -> Result<(), Error> { self.venv_cmd() @@ -502,6 +536,8 @@ impl UvWithVenv { cmd.arg("--refresh"); } + options.keyring_provider.add_as_pip_args(&mut cmd); + self.uv.sources.add_as_pip_args(&mut cmd); cmd.arg("--").arg(requirement.to_string()); @@ -537,10 +573,12 @@ impl UvWithVenv { } /// Syncs the venv - pub fn sync(&self, lockfile: &Path) -> Result<(), Error> { + pub fn sync(&self, lockfile: &Path, options: UvSyncOptions) -> Result<(), Error> { let mut cmd = self.venv_cmd(); cmd.arg("pip").arg("sync"); + options.add_as_pip_args(&mut cmd); + self.uv.sources.add_as_pip_args(&mut cmd); let status = cmd @@ -591,6 +629,7 @@ impl UvWithVenv { no_header: true, generate_hashes: false, keyring_provider, + universal: false, }; cmd.arg("pip").arg("compile"); diff --git a/rye/tests/common/mod.rs b/rye/tests/common/mod.rs index 081ab7dfd8..7cc24f0745 100644 --- a/rye/tests/common/mod.rs +++ b/rye/tests/common/mod.rs @@ -27,7 +27,7 @@ pub const INSTA_FILTERS: &[(&str, &str)] = &[ (r"/tmp/\.tmp\S+", "[TEMP_FILE]"), // windows temp folders (r"\b[A-Z]:\\.*\\Local\\Temp\\\S+", "[TEMP_FILE]"), - (r" in (\d+\.)?\d+(ms|s)\b", " in [EXECUTION_TIME]"), + (r" in (\d+m )?(\d+\.)?\d+(ms|s)\b", " in [EXECUTION_TIME]"), (r"\\\\?([\w\d.])", "/$1"), (r"rye.exe", "rye"), ]; diff --git a/rye/tests/test_add.rs b/rye/tests/test_add.rs index 7576a4f35d..ea4ca29c74 100644 --- a/rye/tests/test_add.rs +++ b/rye/tests/test_add.rs @@ -1,5 +1,5 @@ +use insta::assert_snapshot; use std::fs; - use toml_edit::{value, ArrayOfTables, Table}; use crate::common::{rye_cmd_snapshot, Space}; @@ -26,9 +26,8 @@ fn test_add_flask() { Done! ----- stderr ----- - Built 1 editable in [EXECUTION_TIME] - Resolved 8 packages in [EXECUTION_TIME] - Downloaded 8 packages in [EXECUTION_TIME] + Resolved 9 packages in [EXECUTION_TIME] + Prepared 9 packages in [EXECUTION_TIME] Installed 9 packages in [EXECUTION_TIME] + blinker==1.7.0 + click==8.1.7 @@ -40,6 +39,14 @@ fn test_add_flask() { + my-project==0.1.0 (from file:[TEMP_PATH]/project) + werkzeug==3.0.1 "###); + + assert_snapshot!(space.read_toml("pyproject.toml")["project"]["dependencies"], @r###" + [ + "flask>=3.0.0", + "colorama>=0.4.6", + ] + "### + ); } #[test] @@ -62,9 +69,8 @@ fn test_add_flask_dotenv() { Done! ----- stderr ----- - Built 1 editable in [EXECUTION_TIME] - Resolved 9 packages in [EXECUTION_TIME] - Downloaded 9 packages in [EXECUTION_TIME] + Resolved 10 packages in [EXECUTION_TIME] + Prepared 10 packages in [EXECUTION_TIME] Installed 10 packages in [EXECUTION_TIME] + blinker==1.7.0 + click==8.1.7 @@ -78,12 +84,13 @@ fn test_add_flask_dotenv() { + werkzeug==3.0.1 "###); - space.load_toml("pyproject.toml", |doc| { - let deps = doc["project"]["dependencies"].as_array().unwrap(); - assert!(deps - .iter() - .any(|x| x.as_str() == Some("flask[dotenv]>=3.0.0"))); - }); + assert_snapshot!(space.read_toml("pyproject.toml")["project"]["dependencies"], @r###" + [ + "flask[dotenv]>=3.0.0", + "colorama>=0.4.6", + ] + "### + ); } #[test] @@ -115,14 +122,20 @@ fn test_add_from_find_links() { Done! ----- stderr ----- - Built 1 editable in [EXECUTION_TIME] - Resolved 2 packages in [EXECUTION_TIME] - Downloaded 2 packages in [EXECUTION_TIME] + Resolved 3 packages in [EXECUTION_TIME] + Prepared 3 packages in [EXECUTION_TIME] Installed 3 packages in [EXECUTION_TIME] + colorama==0.4.6 + my-project==0.1.0 (from file:[TEMP_PATH]/project) + tqdm==4.66.1 "###); + + assert_snapshot!(space.read_toml("pyproject.toml")["tool"]["rye"], @r###" + managed = true + dev-dependencies = [] + sources = [{ name = "extra", type = "find-links", url = "https://download.pytorch.org/whl/torch_stable.html" }] + "### + ); } #[test] @@ -147,9 +160,8 @@ fn test_add_flask_wrong_venv_exported() { Done! ----- stderr ----- - Built 1 editable in [EXECUTION_TIME] - Resolved 8 packages in [EXECUTION_TIME] - Downloaded 8 packages in [EXECUTION_TIME] + Resolved 9 packages in [EXECUTION_TIME] + Prepared 9 packages in [EXECUTION_TIME] Installed 9 packages in [EXECUTION_TIME] + blinker==1.7.0 + click==8.1.7 @@ -182,9 +194,8 @@ fn test_add_explicit_version_or_url() { Done! ----- stderr ----- - Built 1 editable in [EXECUTION_TIME] - Resolved 2 packages in [EXECUTION_TIME] - Downloaded 2 packages in [EXECUTION_TIME] + Resolved 3 packages in [EXECUTION_TIME] + Prepared 3 packages in [EXECUTION_TIME] Installed 3 packages in [EXECUTION_TIME] + markupsafe==2.1.3 + my-project==0.1.0 (from file:[TEMP_PATH]/project) @@ -204,9 +215,8 @@ fn test_add_explicit_version_or_url() { Done! ----- stderr ----- - Built 1 editable in [EXECUTION_TIME] - Resolved 1 package in [EXECUTION_TIME] - Downloaded 1 package in [EXECUTION_TIME] + Resolved 4 packages in [EXECUTION_TIME] + Prepared 2 packages in [EXECUTION_TIME] Uninstalled 1 package in [EXECUTION_TIME] Installed 2 packages in [EXECUTION_TIME] - my-project==0.1.0 (from file:[TEMP_PATH]/project) @@ -214,3 +224,47 @@ fn test_add_explicit_version_or_url() { + pip==1.3.1 (from https://github.com/pypa/pip/archive/1.3.1.zip#sha1=da9234ee9982d4bbb3c72346a6de940a148ea686) "###); } + +#[test] +fn test_add_dev() { + let space = Space::new(); + space.init("my-project"); + // add colorama to ensure we have this as a dependency on all platforms + rye_cmd_snapshot!(space.rye_cmd().arg("add").arg("flask").arg("colorama").arg("--dev"), @r###" + success: true + exit_code: 0 + ----- stdout ----- + Initializing new virtualenv in [TEMP_PATH]/project/.venv + Python version: cpython@3.12.3 + Added flask>=3.0.0 as dev dependency + Added colorama>=0.4.6 as dev dependency + Reusing already existing virtualenv + Generating production lockfile: [TEMP_PATH]/project/requirements.lock + Generating dev lockfile: [TEMP_PATH]/project/requirements-dev.lock + Installing dependencies + Done! + + ----- stderr ----- + Resolved 9 packages in [EXECUTION_TIME] + Prepared 9 packages in [EXECUTION_TIME] + Installed 9 packages in [EXECUTION_TIME] + + blinker==1.7.0 + + click==8.1.7 + + colorama==0.4.6 + + flask==3.0.0 + + itsdangerous==2.1.2 + + jinja2==3.1.2 + + markupsafe==2.1.3 + + my-project==0.1.0 (from file:[TEMP_PATH]/project) + + werkzeug==3.0.1 + "###); + + assert_snapshot!(space.read_toml("pyproject.toml")["tool"]["rye"], @r###" + managed = true + dev-dependencies = [ + "flask>=3.0.0", + "colorama>=0.4.6", + ] + "### + ); +} diff --git a/rye/tests/test_cli.rs b/rye/tests/test_cli.rs index 18dd47b482..32db91c2fd 100644 --- a/rye/tests/test_cli.rs +++ b/rye/tests/test_cli.rs @@ -33,7 +33,8 @@ fn test_dotenv() { Done! ----- stderr ----- - Built 1 editable in [EXECUTION_TIME] + Resolved 1 package in [EXECUTION_TIME] + Prepared 1 package in [EXECUTION_TIME] Installed 1 package in [EXECUTION_TIME] + my-project==0.1.0 (from file:[TEMP_PATH]/project) "###); diff --git a/rye/tests/test_init.rs b/rye/tests/test_init.rs index 8b6ab12a0e..6ac9cd456f 100644 --- a/rye/tests/test_init.rs +++ b/rye/tests/test_init.rs @@ -29,7 +29,8 @@ fn test_init_lib() { Done! ----- stderr ----- - Built 1 editable in [EXECUTION_TIME] + Resolved 1 package in [EXECUTION_TIME] + Prepared 1 package in [EXECUTION_TIME] Installed 1 package in [EXECUTION_TIME] + my-project==0.1.0 (from file:[TEMP_PATH]/project) "###); @@ -77,7 +78,8 @@ fn test_init_default() { Done! ----- stderr ----- - Built 1 editable in [EXECUTION_TIME] + Resolved 1 package in [EXECUTION_TIME] + Prepared 1 package in [EXECUTION_TIME] Installed 1 package in [EXECUTION_TIME] + my-project==0.1.0 (from file:[TEMP_PATH]/project) "###); @@ -126,7 +128,8 @@ fn test_init_script() { Done! ----- stderr ----- - Built 1 editable in [EXECUTION_TIME] + Resolved 1 package in [EXECUTION_TIME] + Prepared 1 package in [EXECUTION_TIME] Installed 1 package in [EXECUTION_TIME] + my-project==0.1.0 (from file:[TEMP_PATH]/project) "###); diff --git a/rye/tests/test_ruff.rs b/rye/tests/test_ruff.rs index 1d2a9027bd..08b19f3404 100644 --- a/rye/tests/test_ruff.rs +++ b/rye/tests/test_ruff.rs @@ -9,7 +9,10 @@ fn test_lint_and_format() { let space = Space::new(); space.init("my-project"); space.write( - "src/my_project/__init__.py", + // `test.py` is used instead of `__init__.py` to make ruff consider it a fixable + // issue instead of requiring user intervention. + // ref: https://github.com/astral-sh/ruff/pull/11168 + "src/my_project/test.py", r#"import os def hello(): @@ -24,8 +27,22 @@ def hello(): success: false exit_code: 1 ----- stdout ----- - src/my_project/__init__.py:1:8: F401 [*] `os` imported but unused - src/my_project/__init__.py:6:25: E703 [*] Statement ends with an unnecessary semicolon + src/my_project/test.py:1:8: F401 [*] `os` imported but unused + | + 1 | import os + | ^^ F401 + 2 | + 3 | def hello(): + | + = help: Remove unused import: `os` + + src/my_project/test.py:6:25: E703 [*] Statement ends with an unnecessary semicolon + | + 6 | return "Hello World"; + | ^ E703 + | + = help: Remove unnecessary semicolon + Found 2 errors. [*] 2 fixable with the `--fix` option. @@ -39,7 +56,7 @@ def hello(): ----- stderr ----- "###); - assert_snapshot!(space.read_string("src/my_project/__init__.py"), @r###" + assert_snapshot!(space.read_string("src/my_project/test.py"), @r###" def hello(): @@ -48,12 +65,13 @@ def hello(): "###); // fmt next + // Already reformatted file mentioned bellow is `__init__.py` rye_cmd_snapshot!(space.rye_cmd().arg("fmt").arg("--check"), @r###" success: false exit_code: 1 ----- stdout ----- - Would reformat: src/my_project/__init__.py - 1 file would be reformatted + Would reformat: src/my_project/test.py + 1 file would be reformatted, 1 file already formatted ----- stderr ----- "###); @@ -61,11 +79,11 @@ def hello(): success: true exit_code: 0 ----- stdout ----- - 1 file reformatted + 1 file reformatted, 1 file left unchanged ----- stderr ----- "###); - assert_snapshot!(space.read_string("src/my_project/__init__.py"), @r###" + assert_snapshot!(space.read_string("src/my_project/test.py"), @r###" def hello(): return "Hello World" "###); diff --git a/rye/tests/test_scripts.rs b/rye/tests/test_scripts.rs new file mode 100644 index 0000000000..fb91790c0b --- /dev/null +++ b/rye/tests/test_scripts.rs @@ -0,0 +1,39 @@ +use toml_edit::value; + +use crate::common::{rye_cmd_snapshot, Space}; + +mod common; + +#[test] +fn test_basic_script() { + let mut settings = insta::Settings::clone_current(); + settings.add_filter(r"(?m)(^py[a-z\d._]+$\r?\n)+", "[PYTHON SCRIPTS]\n"); + let _guard = settings.bind_to_scope(); + + let space = Space::new(); + space.init("my-project"); + space.edit_toml("pyproject.toml", |doc| { + doc["tool"]["rye"]["scripts"]["test-script"] = value("python -c 'print(\"Hello World\")'"); + }); + + rye_cmd_snapshot!(space.rye_cmd().arg("run").arg("test-script"), @r###" + success: true + exit_code: 0 + ----- stdout ----- + Hello World + + ----- stderr ----- + Initializing new virtualenv in [TEMP_PATH]/project/.venv + Python version: cpython@3.12.3 + "###); + + rye_cmd_snapshot!(space.rye_cmd().arg("run"), @r###" + success: true + exit_code: 0 + ----- stdout ----- + [PYTHON SCRIPTS] + test-script (python -c 'print("Hello World")') + + ----- stderr ----- + "###); +} diff --git a/rye/tests/test_sync.rs b/rye/tests/test_sync.rs index 61bf9e768b..5bf4b8f64b 100644 --- a/rye/tests/test_sync.rs +++ b/rye/tests/test_sync.rs @@ -22,7 +22,8 @@ fn test_empty_sync() { Done! ----- stderr ----- - Built 1 editable in [EXECUTION_TIME] + Resolved 1 package in [EXECUTION_TIME] + Prepared 1 package in [EXECUTION_TIME] Installed 1 package in [EXECUTION_TIME] + my-project==0.1.0 (from file:[TEMP_PATH]/project) "###); @@ -70,9 +71,8 @@ fn test_add_and_sync_no_auto_sync() { Done! ----- stderr ----- - Built 1 editable in [EXECUTION_TIME] - Resolved 8 packages in [EXECUTION_TIME] - Downloaded 8 packages in [EXECUTION_TIME] + Resolved 9 packages in [EXECUTION_TIME] + Prepared 9 packages in [EXECUTION_TIME] Installed 9 packages in [EXECUTION_TIME] + blinker==1.7.0 + click==8.1.7 @@ -106,9 +106,8 @@ fn test_add_autosync() { Done! ----- stderr ----- - Built 1 editable in [EXECUTION_TIME] - Resolved 8 packages in [EXECUTION_TIME] - Downloaded 8 packages in [EXECUTION_TIME] + Resolved 9 packages in [EXECUTION_TIME] + Prepared 9 packages in [EXECUTION_TIME] Installed 9 packages in [EXECUTION_TIME] + blinker==1.7.0 + click==8.1.7 @@ -144,7 +143,8 @@ fn test_autosync_remember() { Done! ----- stderr ----- - Built 1 editable in [EXECUTION_TIME] + Resolved 1 package in [EXECUTION_TIME] + Prepared 1 package in [EXECUTION_TIME] Installed 1 package in [EXECUTION_TIME] + my-project==0.1.0 (from file:[TEMP_PATH]/project) "###); @@ -164,9 +164,8 @@ fn test_autosync_remember() { Done! ----- stderr ----- - Built 1 editable in [EXECUTION_TIME] - Resolved 8 packages in [EXECUTION_TIME] - Downloaded 8 packages in [EXECUTION_TIME] + Resolved 9 packages in [EXECUTION_TIME] + Prepared 9 packages in [EXECUTION_TIME] Uninstalled 1 package in [EXECUTION_TIME] Installed 9 packages in [EXECUTION_TIME] + blinker==1.7.0 @@ -190,6 +189,7 @@ fn test_autosync_remember() { # all-features: true # with-sources: true # generate-hashes: false + # universal: false --index-url https://pypi.org/simple/ @@ -217,9 +217,8 @@ fn test_autosync_remember() { Done! ----- stderr ----- - Built 1 editable in [EXECUTION_TIME] - Resolved 1 package in [EXECUTION_TIME] - Downloaded 1 package in [EXECUTION_TIME] + Resolved 10 packages in [EXECUTION_TIME] + Prepared 2 packages in [EXECUTION_TIME] Uninstalled 1 package in [EXECUTION_TIME] Installed 2 packages in [EXECUTION_TIME] - my-project==0.1.0 (from file:[TEMP_PATH]/project) @@ -248,6 +247,7 @@ fn test_autosync_remember() { # all-features: true # with-sources: true # generate-hashes: false + # universal: false --index-url https://pypi.org/simple/ diff --git a/rye/tests/test_test.rs b/rye/tests/test_test.rs index c23b24f9f9..a7ba4992c2 100644 --- a/rye/tests/test_test.rs +++ b/rye/tests/test_test.rs @@ -90,9 +90,8 @@ fn test_basic_tool_behavior() { ========================= 1 failed, 1 passed in [EXECUTION_TIME] ========================= ----- stderr ----- - Built 2 editables in [EXECUTION_TIME] - Resolved 3 packages in [EXECUTION_TIME] - Downloaded 3 packages in [EXECUTION_TIME] + Resolved 7 packages in [EXECUTION_TIME] + Prepared 7 packages in [EXECUTION_TIME] Installed 7 packages in [EXECUTION_TIME] + child-dep==0.1.0 (from file:[TEMP_PATH]/project/child-dep) + colorama==0.4.6 diff --git a/rye/tests/test_tools.rs b/rye/tests/test_tools.rs index b8b4a047a2..9c0f409ee9 100644 --- a/rye/tests/test_tools.rs +++ b/rye/tests/test_tools.rs @@ -1,5 +1,6 @@ use std::env::consts::EXE_EXTENSION; use std::fs; +use tempfile::TempDir; use crate::common::{rye_cmd_snapshot, Space}; @@ -9,6 +10,9 @@ mod common; fn test_basic_tool_behavior() { let space = Space::new(); + // Cache alongside the home directory, so that the cache lives alongside the tools directory. + let cache_dir = TempDir::new_in(space.rye_home()).unwrap(); + // in case we left things behind from last run. fs::remove_dir_all(space.rye_home().join("tools")).ok(); fs::remove_file( @@ -22,6 +26,7 @@ fn test_basic_tool_behavior() { rye_cmd_snapshot!( space.rye_cmd() + .env("UV_CACHE_DIR", cache_dir.path()) .arg("tools") .arg("install") .arg("pycowsay") @@ -36,13 +41,14 @@ fn test_basic_tool_behavior() { ----- stderr ----- Resolved 1 package in [EXECUTION_TIME] - Downloaded 1 package in [EXECUTION_TIME] + Prepared 1 package in [EXECUTION_TIME] Installed 1 package in [EXECUTION_TIME] + pycowsay==0.0.0.2 "###); rye_cmd_snapshot!( space.rye_cmd() + .env("UV_CACHE_DIR", cache_dir.path()) .arg("tools") .arg("list"), @r###" success: true @@ -55,6 +61,7 @@ fn test_basic_tool_behavior() { rye_cmd_snapshot!( space.rye_cmd() + .env("UV_CACHE_DIR", cache_dir.path()) .arg("tools") .arg("list") .arg("--include-version"), @r###" @@ -68,6 +75,7 @@ fn test_basic_tool_behavior() { rye_cmd_snapshot!( space.rye_cmd() + .env("UV_CACHE_DIR", cache_dir.path()) .arg("toolchain") .arg("remove") .arg("cpython@3.11.9"), @r###" @@ -81,6 +89,7 @@ fn test_basic_tool_behavior() { rye_cmd_snapshot!( space.rye_cmd() + .env("UV_CACHE_DIR", cache_dir.path()) .arg("tools") .arg("uninstall") .arg("pycowsay"), @r###"