Skip to main content
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.6.2

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.6.2
File Size Uploaded
pycargoebuild-0.6.2.tar.gz 12.1 kB Details

Built distribution (wheel)

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

Total release size: 25.7 kB

Release files / pycargoebuild-0.6.2.tar.gz

Download URL pycargoebuild-0.6.2.tar.gz
Size 12.1 kB
Tags Source
SHA-256 checksum
How to use checksums
47f879f3810fb9ba746582f4862e535dd2d8d7dce88448b21f27065cf7acc547
BLAKE2b-256 checksum
How to use checksums
0a38843d0544f3d36f3880aeae55b1a5350b11dd1b0944b0aa8f3a5efcc4408a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.1

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

Download URL pycargoebuild-0.6.2-py3-none-any.whl
Size 13.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
644eb070c699161601120342ce931fa44da7cd9e7f62cab72d4c1001c5ee5f8a
BLAKE2b-256 checksum
How to use checksums
c8c52ace40605f9d2d9388b0e1121d8242941fc9ffaa1ddb51907c6b0020cecc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.1

Release history Release notifications | RSS feed

0.17.1

2 release files

0.17.0

2 release files

0.15.3

2 release files

0.15.2

2 release files

0.15.1

2 release files

0.15.0

2 release files

0.14.0

2 release files

0.13.5

2 release files

0.13.4

2 release files

0.13.2

2 release files

0.13.0

2 release files

0.12.1

2 release files

0.12

2 release files

0.11

2 release files

0.10

2 release files

0.9

2 release files

0.8

2 release files

0.7

2 release files

0.6.3

2 release files

This release

0.6.2 This release

2 release files

0.6.1

2 release files

0.6

2 release files

0.5.4

2 release files

0.5.3

2 release files

0.5.2

2 release files

0.5.1

2 release files

0.5.0

2 release files

0.4.0

2 release files

0.3.0

2 release files

0.2.0

2 release files

0.1.0

2 release files

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