gpep517
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.
Change log
- v16
fix potential crash when using --output-fd 1 or 2
- v15
replace prefix rewriting with the ability to specify --prefix for building wheels, making it consistent with prefix overrides used while installing
- v14
add support for offset prefix rewriting (--rewrite-prefix-from and --rewrite-prefix-to) to support Gentoo cross-prefix builds; thanks to Chewi for the patch
- v13
restore PyPy support for --sysroot (Gentoo’s PyPy3 package was buggy)
- v12
add --sysroot option for experimental cross-compilation support
- v11
test fixes and refactorings
- v10
create specified --wheel-dir automatically
- v9
add --optimize option to byte-compile while installing
include implicit setuptools fallback in build-wheel
add install-from-source command combining building a wheel and installing it
add progress reporting via logging
- v8
improve .pyc checking to use verification data from the file header
- v7
add verify-pyc command to aid verifying whether all Python modules were compiled to .pyc files correctly
- v6
strip current working directory from sys.path prior to importing the build backend
- v5
fix zipfile hack not to break reading compressed zipfiles
- v4
patch zipfile compression out by default to improve performance
fix Python < 3.9 compatibility
- v3
add --config-json to specify backend options
- v2
fix not preserving backend-path for backend invocation
support tomllib in Python 3.11+
- v1
initial version with wheel building and installation support
Commands
gpep517 implements the following commands:
get-backend to read build-backend from pyproject.toml (auxiliary command).
build-wheel to call the respeective PEP 517 backend in order to produce a wheel.
install-wheel to install a wheel into the specified directory,
install-from-source that combines building a wheel and installing it (without leaving the artifacts),
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:
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}"
Metadata
Release files for gpep517 16
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| gpep517-16.tar.gz | 19.3 kB | Without provenance | Details for gpep517-16.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| gpep517-16-py3-none-any.whl | Python 3 | none | any | Details for gpep517-16-py3-none-any.whl |
Total release size: 35.8 kB
Release files / gpep517-16.tar.gz
| Download URL | gpep517-16.tar.gz |
|---|---|
| Size | 19.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
9832d44bc180fdfc790490842d0a8fe4d72b99cba2466770ff2fa8563d048538
|
|
BLAKE2b-256 checksum How to use checksums |
1c53e6ad6aa7036d62ac009986e1e5180465353344afd958ddc8ac15e3b632bc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.0 CPython/3.12.3
|
Release files / gpep517-16-py3-none-any.whl
| Download URL | gpep517-16-py3-none-any.whl |
|---|---|
| Size | 16.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
e1487c572aecfd3a771e11e70f8318f8c33a3fa46acfacef1525c33710951806
|
|
BLAKE2b-256 checksum How to use checksums |
81c355382659c66d0199345b8d8de236659a756eda190c55407cea0388f095b7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.0 CPython/3.12.3
|
Security for gpep517 16
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.