[arch-general] python needs /usr/include/?
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. Is this expected behavior? I thought /usr/include/ is only needed for compilation and not as runtime dependency. -- 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);}
On Fri, Jul 20, 2012 at 8:32 PM, Christian Hesse <list@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: -- Rodrigo
On Sat, Jul 21, 2012 at 12:25 AM, Rodrigo Rivas <rodrigorivascosta@gmail.com
wrote:
On Fri, Jul 20, 2012 at 8:32 PM, Christian Hesse <list@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). -- Rodrigo
Rodrigo Rivas <rodrigorivascosta@gmail.com> on Sat, 2012/07/21 00:36:
On Sat, Jul 21, 2012 at 12:25 AM, Rodrigo Rivas <rodrigorivascosta@gmail.com
wrote:
On Fri, Jul 20, 2012 at 8:32 PM, Christian Hesse <list@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);}
On Sat, Jul 21, 2012 at 01:01:45PM +0200, Christian Hesse wrote:
Rodrigo Rivas <rodrigorivascosta@gmail.com> on Sat, 2012/07/21 00:36:
On Sat, Jul 21, 2012 at 12:25 AM, Rodrigo Rivas <rodrigorivascosta@gmail.com
wrote:
On Fri, Jul 20, 2012 at 8:32 PM, Christian Hesse <list@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.
I suggest it's a bad idea to castrate packages from files. Either way around, you will break pacman's "heart". If you want to reduce size, remove packages as a whole from the media or deliver custom, slimmed down builds. Eg. python2 with only what wicd needs to run smoothly. Just my context-free 2 cents. cheers! mar77i
participants (3)
-
Christian Hesse
-
Martti Kühne
-
Rodrigo Rivas