62c474d880
## Summary This PR adds support for Git dependencies, like: ``` flask @ git+https://github.com/pallets/flask.git ``` Right now, they're only supported in the resolver (and not the installer), since the installer doesn't yet support source distributions at all. The general approach here is based on Cargo's Git implementation. Specifically, I adapted Cargo's [`git`](https://github.com/rust-lang/cargo/blob/23eb492cf920ce051abfc56bbaf838514dc8365c/src/cargo/sources/git/mod.rs) module to perform the cloning, which is based on `libgit2`. As compared to Cargo's implementation, I made the following changes: - Removed any unnecessary code. - Fixed any Clippy errors for our stricter ruleset. - Removed the dependency on `curl`, in favor of `reqwest` which we use elsewhere. - Removed the ability to use `gix`. Cargo allows the use of `gix` as an experimental flag, but it only supports a small subset of the operations. When Cargo fully adopts `gix`, we should plan to do the same. - Removed Cargo's host key checking. We need to re-add this! I'll do it shortly. - Removed Cargo's progress bars. We should re-add this too, but we use `indicatif` and Cargo had their own thing. There are a few follow-ups to consider: - Adding support in the installer. - When we lock, we should write out the Git URL that includes the exact SHA. This lets us cache in perpetuity and avoids dependencies changing without re-locking. - When we resolve, we should _always_ try to refresh Git dependencies. (Right now, we skip if the wheel was already built.) I'll work on the latter two in follow-up PRs. Closes #202.
103 lines
3.4 KiB
TOML
103 lines
3.4 KiB
TOML
[workspace]
|
|
members = ["crates/*"]
|
|
exclude = ["vendor/pubgrub"]
|
|
resolver = "2"
|
|
|
|
[workspace.package]
|
|
edition = "2021"
|
|
rust-version = "1.72"
|
|
homepage = "https://astral.sh"
|
|
documentation = "https://astral.sh"
|
|
repository = "https://github.com/astral-sh/puffin"
|
|
authors = ["Astral Software Inc. <hey@astral.sh>"]
|
|
license = "MIT OR Apache-2.0"
|
|
|
|
[workspace.dependencies]
|
|
anyhow = { version = "1.0.75" }
|
|
bitflags = { version = "2.4.0" }
|
|
cacache = { version = "11.7.1", default-features = false, features = ["tokio-runtime"] }
|
|
camino = { version = "1.1.6", features = ["serde1"] }
|
|
clap = { version = "4.4.6" }
|
|
colored = { version = "2.0.4" }
|
|
configparser = { version = "3.0.2" }
|
|
csv = { version = "1.3.0" }
|
|
data-encoding = { version = "2.4.0" }
|
|
directories = { version = "5.0.1" }
|
|
dirs = { version = "5.0.1" }
|
|
flate2 = { version = "1.0.28" }
|
|
fs-err = { version = "2.9.0" }
|
|
fs2 = { version = "0.4.3" }
|
|
futures = { version = "0.3.28" }
|
|
fxhash = { version = "0.2.1" }
|
|
glob = { version = "0.3.1" }
|
|
goblin = { version = "0.7.1" }
|
|
hex = { version = "0.4.3" }
|
|
http-cache-reqwest = { version = "0.11.3" }
|
|
indicatif = { version = "0.17.7" }
|
|
indoc = { version = "2.0.4" }
|
|
itertools = { version = "0.11.0" }
|
|
mailparse = { version = "0.14.0" }
|
|
miette = { version = "5.10.0" }
|
|
once_cell = { version = "1.18.0" }
|
|
petgraph = { version = "0.6.4" }
|
|
platform-info = { version = "2.0.2" }
|
|
plist = { version = "1.5.0" }
|
|
pyproject-toml = { version = "0.7.0" }
|
|
rand = { version = "0.8.5" }
|
|
rayon = { version = "1.8.0" }
|
|
reflink-copy = { version = "0.1.10" }
|
|
regex = { version = "1.9.6" }
|
|
reqwest = { version = "0.11.22", default-features = false, features = ["json", "gzip", "brotli", "stream", "rustls-tls"] }
|
|
reqwest-middleware = { version = "0.2.3" }
|
|
reqwest-retry = { version = "0.3.0" }
|
|
rfc2047-decoder = { version = "1.0.1" }
|
|
seahash = { version = "4.1.0" }
|
|
serde = { version = "1.0.188" }
|
|
serde_json = { version = "1.0.107" }
|
|
sha2 = { version = "0.10.8" }
|
|
tar = { version = "0.4.40" }
|
|
target-lexicon = { version = "0.12.11" }
|
|
tempfile = { version = "3.8.0" }
|
|
thiserror = { version = "1.0.49" }
|
|
tokio = { version = "1.16.1", features = ["rt-multi-thread"] }
|
|
tokio-util = { version = "0.7.9", features = ["compat"] }
|
|
toml = { version = "0.8.2" }
|
|
toml_edit = { version = "0.20.2" }
|
|
tracing = { version = "0.1.37" }
|
|
tracing-indicatif = { version = "0.3.5" }
|
|
tracing-subscriber = { version = "0.3.17", features = ["env-filter"] }
|
|
tracing-tree = { version = "0.2.5" }
|
|
unicode-width = { version = "0.1.8" }
|
|
unscanny = { version = "0.1.0" }
|
|
url = { version = "2.4.1" }
|
|
waitmap = { version = "1.1.0" }
|
|
walkdir = { version = "2.4.0" }
|
|
which = { version = "4.4.2" }
|
|
zip = { version = "0.6.6", default-features = false, features = ["deflate"] }
|
|
|
|
[patch.crates-io]
|
|
# For pyproject-toml
|
|
pep508_rs = { path = "crates/pep508-rs" }
|
|
|
|
[profile.profiling]
|
|
inherits = "release"
|
|
debug = true
|
|
|
|
# Config for 'cargo dist'
|
|
[workspace.metadata.dist]
|
|
# The preferred cargo-dist version to use in CI (Cargo.toml SemVer syntax)
|
|
cargo-dist-version = "0.3.1"
|
|
# CI backends to support
|
|
ci = ["github"]
|
|
# The installers to generate for each app
|
|
installers = ["shell"]
|
|
# Target platforms to build apps for (Rust target-triple syntax)
|
|
targets = ["x86_64-unknown-linux-gnu", "aarch64-apple-darwin", "x86_64-apple-darwin", "x86_64-pc-windows-msvc"]
|
|
# Publish jobs to run in CI
|
|
pr-run-mode = "skip"
|
|
|
|
# The profile that 'cargo dist' will build with
|
|
[profile.dist]
|
|
inherits = "release"
|
|
lto = "thin"
|