Axle is Python wheel enhancement library
Project description
Wheel Axle - Python Wheel enhancement library
Problem
bdist_wheel
does not support symlinks.bdist_wheel
does not support overwriting in a convenient way:- whether the distribution is pure-Python
- distribution ABI tag
- Extend Python tag override capability
Solution
WARNING: THIS IS EXPERIMENTAL BETA SOFTWARE. THERE ARE NO WARRANTIES OF ANY KIND. USE AT YOUR OWN RISK. ADDITIONAL INCLUDED DISCLAIMERS ALSO APPLY.
Wheel-Axle (Axle
, bdist_axle
) is a drop-in replacement/augmentation utility for wheel
(bdist_wheel
)
that extends and builds spec-compliant wheels.
During the build, Axle
is able to capture and record symlinks in the following schema paths (locations):
- purelib
- platlib
- scripts
- headers
- data
Additionally, Axle
is able to customize the tags via additional command line options.
While the generated wheel is fully spec-compliant, additional symlinks functionality is not possible without its
companion library Wheel Axle Runtime. Thus, every wheel generated by
the bdist_axle
automatically becomes dependent on wheel-axle-runtime
that provides post-install logic required.
Implementation
The body of the library is as ugly and messy as distutils
/setuptools
are, and consists of, mainly, in
hacking/overwriting various setuptools
commands to detect, handle and record symlinks and their targets. Once that
problem is solved, the list of symlinks is recorded in the .dist-info/symlinks.txt
in the following CSV format:
- symlink name
- symlink target
- a boolean (0 or 1) flag indicating whether the target is a directory
NOTE: Symlinks may be relative, absolute and/or broken. Symlink targets are recorded verbatim (even when broken) and are NOT otherwise interpreted. THIS IS INTENTIONAL. Please see Wheel Axle Runtime Security Notice for additional information.
A special <distribution name and version>.pth
file is also added to the distribution. When the wheel is installed
this .pth
file triggers the post-install logic via
wheel-axle-runtime.
Usage
python setup.py bdist_wheel <arguments>
can be replaced with python setup.py bdist_axle <arguments>
. The replacement
is drop-in.
Additional functionality is available via the following options:
--root-is-pure set to manually override whether the wheel is
pure (default: None)
--abi-tag set to override ABI tag (default: None)
Using --python-tag
, --root-is-pure
and --abi-tag
allows you to create wheels that carry platform-dependent data
while otherwise containing pure-Python libraries.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file wheel_axle-0.0.4.tar.gz
.
File metadata
- Download URL: wheel_axle-0.0.4.tar.gz
- Upload date:
- Size: 13.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.7.1 importlib_metadata/4.10.1 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c72b99abeab06b187a47165247467f3ce3022fb57453a5b5f262f26e3a427951 |
|
MD5 | 511fe954f2868d4abb216326d06f3592 |
|
BLAKE2b-256 | 6d94b2e2bc58a0aa8c2e2bc05d6892a2881754a6901ac6393edea9ff86b8e658 |
Provenance
File details
Details for the file wheel_axle-0.0.4-py3-none-any.whl
.
File metadata
- Download URL: wheel_axle-0.0.4-py3-none-any.whl
- Upload date:
- Size: 8.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.7.1 importlib_metadata/4.10.1 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | cd0c4a63384c09ff7c9717cc7ae596bb76eb9ff75f8d1a78a6a5932cba0ff8ad |
|
MD5 | 112490386574da618a1c120a5973096d |
|
BLAKE2b-256 | 783bae3ccc2d77849cdceb9c3b8b374db47ff4ca6163dd1a33fa253dadad2225 |