[Distutils] Q about best practices now (or near future)

Vinay Sajip vinay_sajip at yahoo.co.uk
Wed Jul 17 19:06:27 CEST 2013


Brett Cannon <brett <at> python.org> writes:

> Then I'm thoroughly confused since the Wheel PEP says in its rationale
that "Python needs a package format that is easier to install than sdist".
That would suggest a wheel would work for a source distribution and replace
sdist zip/tar files. If wheels aren't going to replace what sdist spits out
as the installation file format of choice for pip what is it for, just
binary files alone?

Another way to look at it:

The wheel contains all the code needed to use a distribution at run or build
time - Python code, .so files, header files, data files, scripts. "Just
stuff - no fluff" :-)

The sdist generally contains all the files in the wheel, plus those needed
to build the wheel (e.g. .pyx, .f, .c), + docs, tests, test data etc. but
not the built files. This isn't hard and fast, though - an sdist could e.g.
choose to include a .c file created from a .pyx, so that the user doesn't
need to have Cython installed, but just a C compiler.

Of course some people bundle their test code in a tests subpackage which
would then end up in the wheel, but hopefully I've given the gist of the
distinction.

Regards,

Vinay Sajip



More information about the Distutils-SIG mailing list