Skip to main content

Python package builder and installer for non-pip-centric world

Project description

gpep517 is a minimal tool to aid building wheels for Python packages through PEP 517-compliant build systems and installing them. The tool originated from Gentoo with its primary goals being absolutely minimal dependency footprint to ease clean bootstrap without bundling dependencies, and clean separation of functions to aid external package managers. It is the tool of choice for a world that does not revolve around pip and venvs.

Commands

gpep517 implements the following commands:

  1. get-backend to read build-backend from pyproject.toml (auxiliary command).

  2. build-wheel to call the respeective PEP 517 backend in order to produce a wheel.

  3. install-wheel to install a wheel into the specified directory,

  4. install-from-source that combines building a wheel and installing it (without leaving the artifacts),

  5. verify-pyc to verify that the .pyc files in the specified install tree are correct and up-to-date.

Dependencies

gpep517 aims to minimize the dependency footprint to ease bootstrap. At the moment, it depends on two packages:

  1. tomli for TOML parsing in Python < 3.11

  2. installer for wheel installation

Additionally, PEP 517 build requires flit_core. However, the package can be used from the source tree or manually installed without that dependency.

Running the test suite requires pytest and flit_core (as provided by the test extra). Additional build systems can be installed to extend integration testing (test-full extra). A tox file is also provided to ease running tests.

Examples

The simplest way to install a package from the current directory is to use the install-from-source command, e.g.:

gpep517 install-from-source --destdir install --optimize all

gpep517 can also be used as a thin wrapper over the installer package, to install a prebuilt wheel:

gpep517 install-wheel --destdir install --optimize all \
    gpep517-8-py3-none-any.whl

Alternatively, the wheel can be built and installed separately. Notably, this leaves the built wheel in the specified directory for reuse:

set -e
mkdir -p dist
wheel_name=$(
    # the output forwarding trick guarantees that the underlying
    # backend will not output into ${wheel_name}
    gpep517 build-wheel --output-fd 3 --wheel-dir dist \
        3>&1 >&2
)
gpep517 install-wheel --destdir install "dist/${wheel_name}"

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

gpep517-10.tar.gz (16.6 kB view details)

Uploaded Source

Built Distribution

gpep517-10-py3-none-any.whl (8.4 kB view details)

Uploaded Python 3

File details

Details for the file gpep517-10.tar.gz.

File metadata

  • Download URL: gpep517-10.tar.gz
  • Upload date:
  • Size: 16.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.11.0

File hashes

Hashes for gpep517-10.tar.gz
Algorithm Hash digest
SHA256 60d198e36c541899756fb60022ddb21898858ec03f7b8af78ca42fe3737d1f04
MD5 fbd0d10f1927a3cfa021b6f09856ae94
BLAKE2b-256 41a515abb1db32a8fa92874ad379e099ca23621aa812b2e59187542a671550bc

See more details on using hashes here.

File details

Details for the file gpep517-10-py3-none-any.whl.

File metadata

  • Download URL: gpep517-10-py3-none-any.whl
  • Upload date:
  • Size: 8.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.11.0

File hashes

Hashes for gpep517-10-py3-none-any.whl
Algorithm Hash digest
SHA256 fd704d7bb3d147b032ee1d4bb3d9d547dcebe81152e687610afde0d5b349b854
MD5 7b45575fe4956f1b952aff3dccfd26fe
BLAKE2b-256 d94b66a38e144b29a18b550b3f21e924a7a3dd60adc46612c60cbdf3fa38a5c1

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page