Skip to content
Commit 61ea90a8 authored by Chris Kay's avatar Chris Kay Committed by Ryan Roberts
Browse files

project: add `pyproject.toml` configuration

The `pyproject.toml` file is a standard Python project configuration
file, defined by [PEP 518][1] and expanded upon in [PEP 621][2], which
centralises project metadata and build configuration.

The major benefit to this standard is the ability to automate the
installation of project dependencies (both during development and for
downstream users). As a result, it becomes possible to directly install
Shrinkwrap and all of its runtime dependencies with any of:

    uv tool install git+https://git.gitlab.arm.com/tooling/shrinkwrap.git
    pipx install git+https://git.gitlab.arm.com/tooling/shrinkwrap.git
    pip install git+https://git.gitlab.arm.com/tooling/shrinkwrap.git

This also makes it possible to build redistributable packages for
distribution via [PyPI][3], the Python Package Index.

If you are contributing to Shrinkwrap, it is strongly recommended that
you install [uv][4] and set up a virtual environment:

    curl -LsSf https://astral.sh/uv/install.sh | sh # Install uv

    uv venv # Create a virtual environment in `${PWD}/.venv`
    uv sync # Install Shrinkwrap's development dependencies

You can run commands within the virtual environment from outside of it:

    uv run shrinkwrap --help

... or load the virtual environment and run them from wherever you are:

    source .venv/bin/activate # Most modern IDEs can do this automatically
    shrinkwrap --help

[1]: https://peps.python.org/pep-0518/
[2]: https://peps.python.org/pep-0621/
[3]: https://pypi.org/
[4]: https://docs.astral.sh/uv/
parent 1c5b46f5
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment