Re: python needs /usr/include/?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



Rodrigo Rivas <rodrigorivascosta@xxxxxxxxx> on Sat, 2012/07/21 00:36:
> On Sat, Jul 21, 2012 at 12:25 AM, Rodrigo Rivas <rodrigorivascosta@xxxxxxxxx
> > wrote:
> 
> > On Fri, Jul 20, 2012 at 8:32 PM, Christian Hesse <list@xxxxxxxx> 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);}


[Index of Archives]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux