public inbox for gentoo-dev@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-dev] pycargoebuild can now generate "crate tarballs"
@ 2023-11-29 16:59 Michał Górny
  0 siblings, 0 replies; only message in thread
From: Michał Górny @ 2023-11-29 16:59 UTC (permalink / raw)
  To: gentoo-dev

[-- Attachment #1: Type: text/plain, Size: 1193 bytes --]

Hi, everyone.

app-portage/pycargoebuild-0.12 brings a new useful feature: generating
"crate tarballs" that can be used to easily deliver all crates,
resulting in much smaller Manifest, ebuild and much faster fetch+unpack.
This is currently experimental, so I'd appreciate your testing
and feedback.

Long story short, run pycargoebuild with --crate-tarball, e.g.:

$ pycargoebuild --crate-tarball -i fractal-5.ebuild \
    /tmp/portage/net-im/fractal-5/work/fractal-5/
[...]
INFO     Crate tarball written to /tmp/dist/fractal-5.0.0-crates.tar.xz 


pycargoebuild will fetch all crates (as usual), repack them into a
single .tar.xz and put empty CRATES="\n" into the ebuild (some
whitespace is required to workaround cargo.eclass right now).  You may
want to rename the tarball (the default name is based off Cargo.toml
metadata), upload it somewhere and then add it to SRC_URI.

Note that GIT_CRATES aren't repacked.

Now some numbers, for fractal-5:

ebuild: 15 KiB → 4 KiB
Manifest: 180 KiB → 1.5 KiB
download time: 70 s → 2 s
distfile count: 597 → 4
distdir size: 76 MiB → 45 MiB
unpack time: 15 s → 6 s

-- 
Best regards,
Michał Górny


[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 512 bytes --]

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2023-11-29 16:59 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-11-29 16:59 [gentoo-dev] pycargoebuild can now generate "crate tarballs" Michał Górny

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox