[Distutils] wheels, metadata

Thomas Heller theller at ctypes.org
Thu Jan 23 15:23:26 CET 2014


I'm reading up and done all those peps:

425 - compaibility tags
426 - metadata 2.0
427 - wheel binary format 1.0
440 - version identification and dependency specifications

and trying to make sense from them.  Well, they make sense to me,
but to what do they apply?

Example: I can now build, upload, and install a wheel for my distribution.

I have imported setuptools in my setup.py script,
and have run 'setup.py bdist_wheel'.

The resulting file is named 'py2exe-0.9.0-py34-none-any.whl',
which means:

python tag 'py34', abi tag 'none', platform tag 'any'

What this file really is: it is a library that only works on
CPython 3.3 and 3.4, win32 and win_amd64.  So I would have expected
a filename like py2exe-0.9.0-py33.py34-none-win.whl or similar.

Hoever, the only thing that I found which did change the filename
is this section in the setup.cfg file (which is not appopriate for
this distribution):

[wheel]
universal=1

So, the question is:

Are the specifications in the PEPs above implemented somewhere
or are they only 'specifications'?

There are very detailed descriptions how to specify requirements
in the metadata (in pep426), something like

"supports_environments": ["python_version >= '3.3'
                            and 'win' in sys_platform"]

Where can I specify this?  Does distutils support it? Do
I have to manually edit some pdist.json file, or do I have
to rename the created .whl?

Thomas



More information about the Distutils-SIG mailing list