[Wheel-builders] newbie question

Matthew Brett matthew.brett at gmail.com
Mon Jan 2 07:10:48 EST 2017


Hi,

On Mon, Jan 2, 2017 at 4:26 AM, Michael A. via Wheel-builders
<wheel-builders at python.org> wrote:
> Ok it said newbie questions allowed. Im still in pretty basic syntax, just
> trying what python is capable of doing for me. I come across wheel on the
> help page and was wodering what all its capable of doing. I use 3.5 and seen
> videos of stiĺl developing and thats còol considing everything is stiĺl
> rather new. Does making wheels make .exe files for stand alone projects? Can
> i make wheels and be able to send executable files to other people with
> different operating systems? Is this like cx_Freeze I've seen used on
> youtube? Give it to me in less Geek terms if possible on usage and how to
> use it best for my scripts.

The wheel format is a zip file format that packages up everything you
need to install a particular Python package on a particular operating
system.   For example, have a look at:

https://pypi.python.org/pypi/Cython/0.25.2

You'll see there that the team responsible for the "Cython" package
have built these zip archives for Windows 32- and 64-bit, OSX and for
Intel Linux.  The Python install tool "pip" knows how to unpack these
zip files so that Python can 'import" these packages, as in (from the
command line):

pip install --user cython  # fetches the correct wheel from the pypi site above

Then:

python
>>> import cython   # finds the files installed above

So, short summary, the wheel is a binary format (in fact, a zip file
with a particular layout) that "pip" can use to install Python
packages.

To answer your specific questions:

* if your Python package doesn't have any compiled modules, yes you
can make a wheel that will work for other operating systems,
otherwise, no, you have to make a wheel for each operating system you
support, usually by building the wheel on that operating system;
* no, wheels aren't the right format to pack up a whole Python
application with all its dependencies, wheels are specifically for
containing individual packages (dependencies).

Cheers,

Matthew


More information about the Wheel-builders mailing list