https://github.com/zuzukin/whl2conda
Generate conda package from pure python wheel
https://github.com/zuzukin/whl2conda
build-tool conda python wheel
Last synced: 6 months ago
JSON representation
Generate conda package from pure python wheel
- Host: GitHub
- URL: https://github.com/zuzukin/whl2conda
- Owner: zuzukin
- License: apache-2.0
- Created: 2023-08-13T17:21:49.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2025-09-22T17:37:30.000Z (10 months ago)
- Last Synced: 2025-10-12T07:21:44.149Z (10 months ago)
- Topics: build-tool, conda, python, wheel
- Language: Python
- Homepage: https://zuzukin.github.io/whl2conda/
- Size: 2.34 MB
- Stars: 7
- Watchers: 1
- Forks: 2
- Open Issues: 38
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- License: LICENSE.md
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
# whl2conda
[](https://pypi.org/project/whl2conda/)
[](https://anaconda.org/conda-forge/whl2conda)
[](https://zuzukin.github.io/whl2conda/)


[](https://github.com/zuzukin/whl2conda/actions/workflows/python-package-conda.yml) [](https://codecov.io/gh/zuzukin/whl2conda)

[](https://pixi.sh)
**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.
* **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 a unpacked directory tree for debugging
or additional user customization.
* **Project configuration**: *whl2conda* project-specific options can be read from
project's `pyproject.toml` file.
* **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](https://zuzukin.github.io/whl2conda/latest/guide/renaming.html#hide-pip).
## Installation
With pip:
```bash
pip install whl2conda
```
With conda (upcoming):
```bash
conda install -c conda-forge whl2conda
```
## Quick usage
Generate a conda package in same directory as wheel file:
```bash
whl2conda build dist/mypackage-1.2.3-py3-none-any.whl
```
Add default tool options to `pyproject.toml`
```bash
whl2conda config --generate-pyproject pyproject.toml
```
Build both wheel and conda package for project:
```bash
whl2conda build --build-wheel my-project-root
```
Create python 3.10 test environment for generated conda package:
```bash
whl2conda install dist/mypackage-1.2.3.-py_0.conda --create -n testenv \
--extra pytest python=3.10
```