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
- Install hatch: https://hatch.pypa.io/latest/install/
- Run
hatch shell
- Run
hatch build -t wheel
cd demo
- 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
- Build the sdist:
There should now be a newPIP_FIND_LINKS=`pwd`/../dist python -m build --sdist --config-setting source_wheel=nvidia_cuda_runtime_cu12-12.4.99-py3-none-manylinux2014_x86_64.whl
dist/
folder with e.g.nvidia_cuda_runtime_cu12-12.4.99.tar.gz
- Install the sdist:
Feel free to test withpip install --no-cache ./dist/<my_sdist>.tar.gz
--extra-index-url https://pypi.nvidia.com
as well. - 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
orfalse
(defaultfalse
) -
include_cuda_debuginfo
: Whether to query information about the available CUDA runtime when reporting an error.true
orfalse
(defaultfalse
)
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
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 Distributions
Built Distribution
File details
Details for the file wheel_stub-0.3.0.post1-py3-none-any.whl
.
File metadata
- Download URL: wheel_stub-0.3.0.post1-py3-none-any.whl
- Upload date:
- Size: 87.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 74d4eadbbc5a80a32f58f528555c1b8f1ca18c364483f6e43970f5d281b7a267 |
|
MD5 | 1ce989a594c680dddcc322a998e82f2b |
|
BLAKE2b-256 | f0cdf6548942816a02116d8239e1ac973ad035451aee9a36bba04b5744213893 |
Provenance
The following attestation bundles were made for wheel_stub-0.3.0.post1-py3-none-any.whl
:
Publisher:
publish.yml
on wheel-next/wheel-stub
-
Statement type:
https://in-toto.io/Statement/v1
- Predicate type:
https://docs.pypi.org/attestations/publish/v1
- Subject name:
wheel_stub-0.3.0.post1-py3-none-any.whl
- Subject digest:
74d4eadbbc5a80a32f58f528555c1b8f1ca18c364483f6e43970f5d281b7a267
- Sigstore transparency entry: 150313593
- Sigstore integration time:
- Predicate type: