[Distutils] additional paths in wheel

Daniel Holth dholth at gmail.com
Thu Sep 4 19:58:32 CEST 2014


It's always been obvious that wheel would probably need additional
paths besides the sysconfig ones, and there's been some discussion
here recently.

For the next version we should:

1. Add the autoconf dirs.
https://www.gnu.org/prep/standards/html_node/Directory-Variables.html.
"packagename-1.0/data/dvidir/" or any of the other autoconf paths
would be valid, in addition to the existing distutils paths. (The
autoconf paths are defined relative to a $prefix, in Python's case
$prefix is usually the base of the virtualenv).

2. Replace WHEEL with wheel.json. wheel.json contains all the
information from WHEEL but is json which is rather popular these days.

wheel.json may contain custom paths with string Template() interpolation.

{ "paths": "name":"$prefix/mypath", "othername":"$bindir/etc",
"thirdname": "$othername/subfolder" }

(the sysconfig names, autoconf names, and custom path names can be
interpolated here)

3. The extra paths are not very useful if you can't find them at
runtime. Provide a mechanism for recording the actual paths used
during installation (in wheel.json). The installer should record the
installation scheme only when requested, in one or more of the formats
a) an importable Python file b) a .json file somewhere in the
installation c) a file inside the .dist-info directory itself.


Of course this is only useful if you have a build system that would
actually produce wheels with files under these extra paths. I don't
have that bit.


More information about the Distutils-SIG mailing list