Skip to main content

pycargoebuild

Author:

Michał Górny

License:

MIT

Homepage:

https://github.com/projg2/pycargoebuild/

pycargoebuild is a generator for ebuilds using the Cargo infrastructure of Rust language. It is primarily meant to aid in keeping the list of CRATES and their LICENSE up-to-date. It is a rewrite of the cargo-ebuild tool in Python, with no actual dependency on Rust.

pycargoebuild reads Cargo.toml and Cargo.lock files in order to obtain the package’s metadata and dependency list, respectively. Then it fetches all dependent crates into DISTDIR and reads their Cargo.toml files to construct the complete list of licenses. The resulting data can either be used to construct a new ebuild from a template or to update the values of CRATES and LICENSE in an existing ebuild.

Why not cargo-ebuild?

pycargoebuild has the following features that cargo-ebuild 0.5.2 is missing:

  • small size (cargo-ebuild compiles to 5.5M on my system)

  • full support for SPDX-2.0 license expressions with boolean simplification (whereas cargo-ebuild just dumps all licenses it finds)

  • pretty-printing with line wrapping for license expressions

  • support for updating CRATES and crate LICENSE in existing ebuilds (whereas cargo-ebuild can only generate new ebuilds)

  • support for combining the data from multiple subpackages (useful e.g. in setuptools-rust)

  • support for fast crate fetching if aria2c is installed

  • support for skipping crate licenses (e.g. for when Crates are used at build/test time only)

Usage

To create a new ebuild, run:

pycargoebuild <package-directory>

where package-directory is the directory containing Cargo.toml. This creates an ebuild file named after the package name and version in the current directory, and outputs its name.

To update an existing ebuild, use instead:

pycargoebuild -i <current-file>.ebuild <package-directory>

Note that the existing file must contain both CRATES variable and LICENSE+= assignment like the following:

# Dependent crate licenses
LICENSE+="..."

It is also possible to explicitly specify the output filename using the -o option.

Metadata

Release files for pycargoebuild 0.4.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pycargoebuild 0.4.0
File Size Uploaded Provenance Actions
pycargoebuild-0.4.0.tar.gz 11.1 kB Without provenance Details for pycargoebuild-0.4.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for pycargoebuild 0.4.0
File Interpreter ABI Platform Actions
pycargoebuild-0.4.0-py3-none-any.whl Python 3 none any Details for pycargoebuild-0.4.0-py3-none-any.whl

Total release size: 23.7 kB

Release files / pycargoebuild-0.4.0.tar.gz

Download URL pycargoebuild-0.4.0.tar.gz
Size 11.1 kB
Tags Source
SHA-256 checksum
How to use checksums
110d559bcbb1fc89ce33db4efff2f022e34899a10be687fe593ec577733eaa8c
BLAKE2b-256 checksum
How to use checksums
d95fa31b3124579c20af2765580cfe90f222acf1576699300715c4245db40430
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.11.0

Release files / pycargoebuild-0.4.0-py3-none-any.whl

Download URL pycargoebuild-0.4.0-py3-none-any.whl
Size 12.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
39c60e7b8ee74152d222e129c061448782ba98a9f342a6f25ee6cbeabb34e47f
BLAKE2b-256 checksum
How to use checksums
5f2b28081619b69505aa8bf53b45a5e219e211f5f0c1e19dec9c9846d5124d5c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.11.0

Security for pycargoebuild 0.4.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.4.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page