Python - Wheel Archive (whl - bdist_wheel)

> Procedural Languages > Python > Python - (Shipping|Packaging)

1 - About

Wheel is a compiled archive format with the .whl extension.

A wheel is a built package that can be installed without needing to go through the “build” process. Installing wheels is substantially faster for the end user than installing from a source distribution.

Advertising

3 - Format

The binary distribution format (wheel) is defined in PEP 427.

4 - Management

4.1 - Install wheel

Install the wheel utility.

pip install wheel
# or
python -m pip install --user --upgrade wheel
Downloading/unpacking wheel
Installing collected packages: wheel
Successfully installed wheel
Cleaning up...
# python 2
sudo yum upgrade python-setuptools
sudo yum install python-pip python-wheel
# python 3
sudo yum install python3 python3-wheel

4.2 - Location

in the scripts location

dir  C:\Users\gerard\AppData\Roaming\Python\Python37\Scripts
wheel.exe
Advertising

4.3 - Install a wheel package

pip install SomePackage-1.0-py2.py3-none-any.whl

where:

Example

Python - NumPy

The wheel archive comes from here

pip install numpy-1.9.2+mkl-cp27-none-win_amd64.whl
Unpacking c:\users\nicolasgerard\downloads\numpy-1.9.2+mkl-cp27-none-win_amd64.whl
Installing collected packages: numpy
Successfully installed numpy
Cleaning up...

4.4 - Create a wheel package

See regular package building

cd ./project
python setup.py bdist_wheel

5 - Documentation / Reference

Advertising
lang/python/shipping/wheel.txt · Last modified: 2018/11/26 10:28 by 172.69.69.116