[Lunar-commits] <moonbase> Python: Adjusting the BUILD so if you are using kernels 3.x all the required plat

Dennis `stumbles` Veatch stumbles at lunar-linux.org
Sun Feb 5 13:00:11 CET 2012


commit f66303a385e4294091fadff69246d44fbf261e63
Author: Dennis `stumbles` Veatch <stumbles at lunar-linux.org>
Date:   Sun Feb 5 07:00:11 2012 -0500

    Python: Adjusting the BUILD so if you are using kernels 3.x all the required plat
    
    files get installed. You will not see this unless you bump to 3.x kernels *and* recompile
    Python. For example;
    
    kernels 2.x and Python compiles;
    /usr/lib/python2.7/distutils/command/command_template
    /usr/lib/python2.7/platform.py
    /usr/lib/python2.7/plat-linux2/CDROM.py
    /usr/lib/python2.7/plat-linux2/DLFCN.py
    /usr/lib/python2.7/plat-linux2/IN.py
    /usr/lib/python2.7/plat-linux2/regen
    /usr/lib/python2.7/plat-linux2/TYPES.py
    /usr/lib/python2.7/test/test_platform.py
    
    After bump to kernel 3.x and recompile of Python;
    /usr/lib/python2.7/distutils/command/command_template
    /usr/lib/python2.7/platform.py
    /usr/lib/python2.7/plat-linux3
    /usr/lib/python2.7/plat-linux3/IN.py
    /usr/lib/python2.7/plat-linux3/regen
    /usr/lib/python2.7/test/test_platform.py
    
    Here is a lengty python thread; http://bugs.python.org/issue12326#msg140061 and I used
    http://hg.python.org/cpython/rev/0c52098a13c6#l3.1 .
    
    Recompiling Python and letting it recompile all installed Python dependent modules,
    which I have quite a few completed without issues.
    
    The two modules I know that were effected by this was an eric4 bump that failed and
    then noticing kde-workspace not finding DLFCN.py (pykde related).
    
    You only need to recompile Python if you have bumped to 3.x kernels and you do not need
    to recompile any existing Python modules you might have installed.
    
    One other note. Not real sure why "make compileall" was placed outside. Moving it inward
    and changing the build procedure to account for it did not cause any problems.
---
 python/Python/BUILD |   14 ++++++++++++--
 1 files changed, 12 insertions(+), 2 deletions(-)

diff --git a/python/Python/BUILD b/python/Python/BUILD
index a3b14ea..070a0d6 100644
--- a/python/Python/BUILD
+++ b/python/Python/BUILD
@@ -1,12 +1,22 @@
 (
 
+# This fixes some import not being installed when compiled against kernels 3.x
+  if [ `uname -r | cut -c 1` == "3" ] ; then
+    mkdir Lib/plat-linux3 &&
+    cp Lib/plat-linux2/* Lib/plat-linux3/
+  fi &&
+
   sedit "s:-O3:$CFLAGS -Os:g" configure  &&
 
   OPTS+=" --enable-shared"  &&
 
   patch_it $SOURCE_CACHE/$SOURCE2 1  &&
 
-  default_build  &&
+  default_config  &&
+  make            &&
+  make compileall &&
+  prepare_install &&
+  make install    &&
 
   install -d /usr/lib/python$MAJOR                        &&
   install -m755 $SOURCE_DIRECTORY/Tools/i18n/msgfmt.py     \
@@ -20,4 +30,4 @@
 
 ) > $C_FIFO 2>&1
 
-  make compileall
+  


More information about the Lunar-commits mailing list