On Fri, Sep 08, 2023 at 06:50:22PM +0000, Jelmer Vernooij wrote: > Package: debcargo > Severity: wishlist > > I've packaged a few Python packages that include rust code. Since they're > python packages, I can't just use debcargo. However, it would be great if I > somehow use debcargo to extract Debian dependency information from Cargo.toml. > > Perhaps a subcommand for debcargo that just dumps out a list of Debian > dependencies and the features they are relevant for?
FWIW, there's both salsa issue[0] and a draft MR[1] open for this, the former even predates this wishlist bug. Maybe something to finish over the holidays ;) FWIW, as a workaround, you can use debcargo's "local crate support" to kickstart your d/control contents. given a dir that contains a Cargo.toml file (let's call it "foobar"), create a debian/debcargo.toml file with the following contents: overlay = "." crate_src_path = ".." and add "debian" to the excludes in Cargo.toml: exclude = ["debian/"] (or add it an already existing list of exclusions) now the following command will generate the debian dir like for a regular debcargo-packaged crate, even if "foobar" is not published on crates.io: debcargo package --config ./foobar/debian/debcargo.toml --no-overlay-write-back --directory ./tmp-foobar foobar 0.1.0 FWIW, since this effectively calls "cargo publish" under the hood, it has the same restrictions w.r.t. dependencies in Cargo.toml (no unversioned deps except for dev-dependencies which are ignored, no path/git deps except if they have a version requirement, ..). 0: https://salsa.debian.org/rust-team/debcargo/-/issues/56 1: https://salsa.debian.org/rust-team/debcargo/-/merge_requests/49