Skip to main content

wheel stub package build backend

Project description

wheel-stub

This is a PEP 517 build backend to act as a "soft link" between a package released on a 3rd party package index and pypi.org. This allows users to keep the simple UX of pip install foo while hosting the actual wheel files on a non-PyPi index.

Demo usage

  1. Install hatch: https://hatch.pypa.io/latest/install/
  2. Run hatch shell
  3. Run hatch build -t wheel
  4. cd demo
  5. Grab your favorite wheel file on https://pypi.nvidia.com, e.g.
    wget https://pypi.nvidia.com/nvidia-cuda-runtime-cu12/nvidia_cuda_runtime_cu12-12.4.99-py3-none-manylinux2014_x86_64.whl
    
  6. Build the sdist:
    PIP_FIND_LINKS=`pwd`/../dist PIP_NO_INDEX=1 python -m build --sdist --config-setting source_wheel=nvidia_cuda_runtime_cu12-12.4.99-py3-none-manylinux2014_x86_64.whl
    
    There should now be a new dist/ folder with e.g. nvidia_cuda_runtime_cu12-12.4.99.tar.gz
  7. Install the sdist:
    pip install --no-cache ./dist/<my_sdist>.tar.gz
    
    Feel free to test with --extra-index-url https://pypi.nvidia.com as well.
  8. Done! You should see everything install correctly

Configuration

There are a few configuration options available for wheel_stub. These can be set in your pyproject.toml file:

  • index_url: The url to the 3rd party index to install wheels from. This is the only required configuration setting.

  • stub_only: Do not install the wheel from the 3rd party package repository, instead erroring with instructions of how to use the repository directly. This can be used in cases such as a project which depends on non-PyPi dependencies, which would get rejected from pypi.org. Set automatically based on project dependencies. true or false (default false)

  • include_cuda_debuginfo: Whether to query information about the available CUDA runtime when reporting an error. true or false (default false)

License

This project is released under the Apache-2 license. It vendors the packaging project, which is BSD 2-clause and Apache 2 dual licensed. It also vendors tomli, which is MIT licensed. For more details see the LICENSE file.

Project details


Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

wheel_stub-0.4.1.post1-py3-none-any.whl (88.5 kB view details)

Uploaded Python 3

File details

Details for the file wheel_stub-0.4.1.post1-py3-none-any.whl.

File metadata

File hashes

Hashes for wheel_stub-0.4.1.post1-py3-none-any.whl
Algorithm Hash digest
SHA256 060284979020191913b7853bdb2ca5f0731209cf3f2f45550416254926239425
MD5 a5d57eee69f6ae1dab9fa1ccfa920c00
BLAKE2b-256 66e3e6259b1d50ecd1d92b20040ac4cceec48900b49861545cd0a26a76da5539

See more details on using hashes here.

Provenance

The following attestation bundles were made for wheel_stub-0.4.1.post1-py3-none-any.whl:

Publisher: publish.yml on wheel-next/wheel-stub

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

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