reproducibly

Reproducibly build Python packages


License
MPL-2.0
Install
pip install reproducibly==0.0.9

Documentation

reproducibly.py

Introduction / Reproducibly build Python packages.

This project is a convenient wrapper around build and cibuildwheel that sets metadata like file modification times, user and group IDs and names, and file permissions predictably. The code can be used from PyPI or as a single file with inline script metadata.

Usage

Command to run from PyPI and view help:

pipx run reproducibly --help

Command to run from a local file and view help:

pipx run ./reproducibly.py --help

Output:

usage: reproducibly.py [-h] [--version] input [input ...] output

Reproducibly build Python packages

features:

- Builds a source distribution (sdist) from a git repository
- Builds a wheel from a sdist
- Resets metadata like user and group names and ids to predictable values
- By default uses the last commit date and time from git
- Respects SOURCE_DATE_EPOCH when building a sdist
- Single file script with inline script metadata or PyPI package

positional arguments:
  input       Input git repository or source distribution
  output      Output directory

options:
  -h, --help  show this help message and exit
  --version   show program's version number and exit

Development

This project uses Nox.

Builds are run every day to check for reproducibility:
status

To set up a development environment use:

nox --session=dev

To run unit tests and integration tests:

nox