[Distutils] C extension dependencies

Donald Stufft donald at stufft.io
Thu Sep 11 09:15:01 CEST 2014


> On Sep 11, 2014, at 3:10 AM, Paul Moore <p.f.moore at gmail.com> wrote:
> 
> On 9 September 2014 16:59, Collin Anderson <collinmanderson at gmail.com> wrote:
>> 
>> Is there any way packages could list external dependencies? Maybe
>> something like requires = ['Python.h', 'somethingelse.h']. I realize
>> there's not much that pip can do about it automatically, but maybe pip
>> could try to figure out if you have those files around and warn if it
>> doesn't see them.
> 
> I don't think pip could realistically check if such files exist (there
> are too many variations in where they might be, etc) but it might be
> plausible to allow a package to declare its external dependencies
> somehow, maybe just as free text, and then if the package build fails,
> pip could display that information.
> 
> Maybe have a build_hint metadata item that pip could display if a
> build fails. That could be reasonably easy with Metadata 2.0, which
> allows for metadata extensions.
> 
> The trick is to get packages to include such a thing. It would be a
> shame to add the mechanism and never have it be used.
> 
> Paul
> _______________________________________________
> Distutils-SIG maillist  -  Distutils-SIG at python.org
> https://mail.python.org/mailman/listinfo/distutils-sig

I think most (all?) of the Linux distros have some method of saying
“Tell me what packages provide this file”. Perhaps this code wouldn’t
live in pip itself but it could have an extension point which people could
provide pip-apt or whatever.

That of course doesn’t help Windows or OS X, so it might not be worth
it (though I imagine someone could build up such a DB there too and
just map them to .exe’s or project home pages or something).

Perhaps the gains wouldn’t be worth the complexity though and it’d
just be easier to allow projects to have a build hint thing that gets
printed if the build fails.

---
Donald Stufft
PGP: 7C6B 7C5D 5E2B 6356 A926 F04F 6E3C BCE9 3372 DCFA

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/distutils-sig/attachments/20140911/c1e1a85c/attachment-0001.html>


More information about the Distutils-SIG mailing list