Build conda packages directly from pure python wheels
Project description
Generate conda packages directly from pure python wheels
whl2conda is a command line utility to build and test conda packages generated directly from pure python wheels.
Background: See doc/about/motivation.md for the story behind this project.
-
Performance: because it does not need to create conda environments in order to build, this is much faster than solutions involving conda-build.
-
Dependency renaming: renames pypi package dependencies to their corresponding conda name. Automatically renames packages from known list collected from conda-forge and supports user-specified rename patterns as well.
-
Multiple package formats: can generate both V1 ('.tar.bz2') and V2 ('.conda') conda package formats. Can also generate an unpacked directory tree for debugging or additional user customization.
-
Project configuration: whl2conda project-specific options can be read from project's
pyproject.tomlfile. -
Test install support: supports installing conda package into a conda environment for testing prior to deployment.
-
Hides pypi dependencies: rewrites the original pip/pypi dependencies in the installed dist-info to avoid compatibility issues.
-
Binary wheel support: can convert non-pure Python wheels containing binary extensions (
.so,.pyd) into platform-specific conda packages using the--allow-impureflag. Automatically generates tight Python version pins and OS constraints from wheel platform tags, with special support for stable ABI (abi3) and multi-platform (fat) wheels. Conversions of representative C, C++, Cython, rust, and abi3 extension packages are regularly verified to be equivalent to the corresponding conda-forge packages on linux, macOS, and windows.Limitations: Binary conversion is designed for self-contained extension packages (e.g., markupsafe, cryptography, orjson). Wheels that bundle vendored shared libraries (e.g., lxml, pillow) convert with a warning but bypass conda's dependency management for those libraries, and wheels with local version suffixes (e.g.,
+cu121variant builds) are refused. For complex GPU/CUDA packages, use conda-forge packages instead.
Installation
With pip:
pip install whl2conda
With conda (upcoming):
conda install -c conda-forge whl2conda
Quick usage
Generate a conda package in same directory as wheel file:
whl2conda convert dist/mypackage-1.2.3-py3-none-any.whl
Add default tool options to pyproject.toml
whl2conda config --generate-pyproject pyproject.toml
Build both wheel and conda package for project:
whl2conda convert --build-wheel my-project-root
Create python 3.10 test environment for generated conda package:
whl2conda install dist/mypackage-1.2.3.-py_0.conda --create -n testenv \
--extra pytest python=3.10
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file whl2conda-26.7.0.tar.gz.
File metadata
- Download URL: whl2conda-26.7.0.tar.gz
- Upload date:
- Size: 80.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1789ea98b787c5a689d3793da61a1e1cbb7f02c20df19b4b5848a8011c8d048c
|
|
| MD5 |
6c885dab3411d9303d944ae2337d8b4b
|
|
| BLAKE2b-256 |
ed30d41502a76a9f83e86e729cc6e14a12e316e1fa5882234d9fa8bcc96365ca
|
Provenance
The following attestation bundles were made for whl2conda-26.7.0.tar.gz:
Publisher:
release.yml on zuzukin/whl2conda
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
whl2conda-26.7.0.tar.gz -
Subject digest:
1789ea98b787c5a689d3793da61a1e1cbb7f02c20df19b4b5848a8011c8d048c - Sigstore transparency entry: 2147049223
- Sigstore integration time:
-
Permalink:
zuzukin/whl2conda@ca26ac87e0d3f675a59da174cb203de61fd57da3 -
Branch / Tag:
refs/tags/v26.7.0 - Owner: https://github.com/zuzukin
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@ca26ac87e0d3f675a59da174cb203de61fd57da3 -
Trigger Event:
push
-
Statement type:
File details
Details for the file whl2conda-26.7.0-py3-none-any.whl.
File metadata
- Download URL: whl2conda-26.7.0-py3-none-any.whl
- Upload date:
- Size: 94.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9289099964c21911b132618e254f0cffebe398421d08b6888d7686d10ddcb29b
|
|
| MD5 |
54cf79d62767c11c239b6fca458bed3b
|
|
| BLAKE2b-256 |
74b28ff411f0bf7024baf6151bea5fe39754518b008b362fca5d7b77dce27515
|
Provenance
The following attestation bundles were made for whl2conda-26.7.0-py3-none-any.whl:
Publisher:
release.yml on zuzukin/whl2conda
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
whl2conda-26.7.0-py3-none-any.whl -
Subject digest:
9289099964c21911b132618e254f0cffebe398421d08b6888d7686d10ddcb29b - Sigstore transparency entry: 2147049691
- Sigstore integration time:
-
Permalink:
zuzukin/whl2conda@ca26ac87e0d3f675a59da174cb203de61fd57da3 -
Branch / Tag:
refs/tags/v26.7.0 - Owner: https://github.com/zuzukin
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@ca26ac87e0d3f675a59da174cb203de61fd57da3 -
Trigger Event:
push
-
Statement type: