[arch-general] python needs /usr/include/?
Christian Hesse
list at eworm.de
Sat Jul 21 07:01:45 EDT 2012
Rodrigo Rivas <rodrigorivascosta at gmail.com> on Sat, 2012/07/21 00:36:
> On Sat, Jul 21, 2012 at 12:25 AM, Rodrigo Rivas <rodrigorivascosta at gmail.com
> > wrote:
>
> > On Fri, Jul 20, 2012 at 8:32 PM, Christian Hesse <list at eworm.de> wrote:
> >
> >> Hello everybody,
> >>
> >> I am creating live media and want to reduce size. After
> >> removing /usr/include/ wicd fails to start because of a missing header
> >> file.
> >>
> >
> > Do you know which one is trying to read?
> > If not, you could try running it with `strace` to see what it is looking
> > for:
> >
>
> Replying to myself, the file it reads is
> `/usr/include/python2.7/pyconfig.h` (for python2).
>
> You can see the relevant code in the deeps of the initialization routines
> of the python library, sysconfig.py:
>
> # load the installed pyconfig.h:
> config_h = get_config_h_filename()
> try:
> with open(config_h) as f:
> parse_config_h(f, vars)
> except IOError, e:
> msg = "invalid Python installation: unable to open %s" % config_h
> if hasattr(e, "strerror"):
> msg = msg + " (%s)" % e.strerror
> raise IOError(msg)
>
> It seems to be used to discover the configuration of the current python
> installation.
>
> Just copying this file to your live media should be enough to make it
> happy. Or alternatively, you might modify the sysconfig.py to read the file
> from other place (`/usr/lib/python2.7` for example).
At the moment I do this
find /usr/include/ -type f -and -name -not "pyconfig.h" -delete
find /usr/include/ -type d -empty -delete
instead of a simple "rm -r /usr/include/".
However the question is whether or not Arch should move the file
to /usr/lib/python2.7/. As said before, my understanding is that files with
configuration data used for runtime should not live in /usr/include/.
--
main(a){char*c=/* Schoene Gruesse */"B?IJj;MEH"
"CX:;",b;for(a/* Chris get my mail address: */=0;b=c[a++];)
putchar(b-1/(/* gcc -o sig sig.c && ./sig */b/42*2-3)*42);}
More information about the arch-general
mailing list