[Distutils] additional paths in wheel

Paul Moore p.f.moore at gmail.com
Thu Sep 4 22:25:31 CEST 2014


On 4 September 2014 18:58, Daniel Holth <dholth at gmail.com> wrote:
> For the next version we should:
>
> 1. Add the autoconf dirs.

OK. Can we make it clear in the documentation that these are
non-portable when used in distributions installed in the system
Python? And can we have some documentation on how code should be
written to find a file that's installed in "$libdir/foo" so that the
code works for a system installation and a virtualenv installation?

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

Formats parseable by stdlib tools is a good thing, IMO. I'm not sure
it's worth switching to JSON just for the sake of doing so - we need
format stability as well, because tools like pip will still have to
parse the older formats for some time yet. But you mention extending
the format below - that may be a good reason to switch to the more
general JSON format at the same time.

> 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)

Not 100% sure what you're intending 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.

This is basically much like RECORD, as Vinay says, and should be a
file inside the .dist-info directory for that reason. I still wish
there was a *really* lightweight way of getting dist-info files at
runtime, distlib and setuptools cover far more ground, but getting at
the extra paths needs nothing more than get_distinfo_file('mydist',
'paths.json'), and a runtime dependency on distlib/setuptools just for
that seems like a lot.

> 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.

By this, do you mean that it's not possible to get
distutils/setuptools/bdist_wheel to support this, or just that extra
work is needed to add support to those tools?

Paul


More information about the Distutils-SIG mailing list