Skip to main content

Axle is Python wheel enhancement library

Project description

Wheel Axle - Python Wheel enhancement library

Gitter Build Status Coverage Status

Wheel Axle Version Wheel Axle Python Versions

Wheel Axle Downloads Per Day Wheel Axle Downloads Per Week Wheel Axle Downloads Per Month

Problem

  1. Python wheel does not support symlinks.
  2. Python 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 in the Python wheel the symlinks in the following schema paths (locations):

  • purelib
  • platlib
  • scripts
  • headers
  • data

Additionally, Axle is able to customize the Python wheel tags via additional command line options.

While the generated Python wheel is fully spec-compliant, additional symlink functionality is not possible without its companion library Wheel Axle Runtime. Thus, every Python 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:

  1. symlink name
  2. symlink target
  3. 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:

  --python-tag        Python implementation compatibility tag (default: 'py3')
  --root-is-pure      set to manually override whether the wheel is
                      pure (default: None)
  --abi-tag           set to override ABI tag (default: None)
  --require-libpython set to indicate the package requires libpython in the
                       exec_prefix/platlib

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


Download files

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

Source Distribution

wheel_axle-0.0.10.tar.gz (14.2 kB view details)

Uploaded Source

Built Distribution

wheel_axle-0.0.10-py3-none-any.whl (9.4 kB view details)

Uploaded Python 3

File details

Details for the file wheel_axle-0.0.10.tar.gz.

File metadata

  • Download URL: wheel_axle-0.0.10.tar.gz
  • Upload date:
  • Size: 14.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.8

File hashes

Hashes for wheel_axle-0.0.10.tar.gz
Algorithm Hash digest
SHA256 1d9dfd7e285ad4cf1b9fd5de91789634959b77011ce6bc8e65ab2fb4020a1bd2
MD5 a84ddcac3afe80eed43c2b6c8285514a
BLAKE2b-256 301dcacd5f863c6e837e1aef3afde333a5ce5a0169fca7116d593790627f6b13

See more details on using hashes here.

File details

Details for the file wheel_axle-0.0.10-py3-none-any.whl.

File metadata

  • Download URL: wheel_axle-0.0.10-py3-none-any.whl
  • Upload date:
  • Size: 9.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.8

File hashes

Hashes for wheel_axle-0.0.10-py3-none-any.whl
Algorithm Hash digest
SHA256 81650e7a7149b6313be48e7c059de02eb3710fb37c22537e36cbfa1c62aa8457
MD5 8e468457880697298813accc635af863
BLAKE2b-256 04ecbed925cd9e4377ffed9a4401c778daf46bcb3d08218ff13e571b8778d290

See more details on using hashes here.

Supported by

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