Index: config/platform/host/pkg_map
===================================================================
RCS file: /sources/ltib/ltib/config/platform/host/pkg_map,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 pkg_map
--- config/platform/host/pkg_map	5 Dec 2008 14:25:51 -0000	1.1.1.1
+++ config/platform/host/pkg_map	30 Oct 2012 18:35:14 -0000
@@ -1 +1,2 @@
 PKG_MTD_UTILS = mtd-utils-20060302
+PKG_PYTHON = python-host
Index: dist/lfs-5.1/python/python-host.spec
===================================================================
RCS file: dist/lfs-5.1/python/python-host.spec
diff -N dist/lfs-5.1/python/python-host.spec
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ dist/lfs-5.1/python/python-host.spec	1 Jan 1970 00:00:00 -0000
@@ -0,0 +1,46 @@
+%define pfx /opt/freescale/rootfs/%{_target_cpu}
+
+Summary         : An interpreted object-oriented programming language.
+Name            : python-host
+Version         : 2.4.4
+Release         : 1
+License         : OSI Approved Python License
+Vendor          : Freescale
+Packager        : Stuart Hughes
+Group           : Development/Languages
+Source          : Python-%{version}.tar.bz2
+Patch1          : python-2.4.4-linux3.patch
+BuildRoot       : %{_tmppath}/%{name}
+Prefix          : %{pfx}
+
+%Description
+%{summary}
+
+%Prep
+%setup -n Python-%{version}
+%patch1 -p1
+
+%Build
+if [ "`uname -m`" != "x86_64" ]; then
+  ./configure  --prefix=%{_prefix} --host=$CFGHOST --build=%{_build}  --without-libdb --without-ssl  --without-tcl --without-tk --without-curses
+else
+  config_opts='CC="gcc -m32" LDFLAGS="-m32 -L/lib32 -L/usr/lib32/"'
+  eval  $config_opts \
+  ./configure  --prefix=%{_prefix} --host=i686-pc-linux-gnu --build=%{_build}  --without-libdb --without-ssl  --without-tcl --without-tk --without-curses
+fi
+make
+
+%Install
+rm -rf $RPM_BUILD_ROOT
+mkdir -p $RPM_BUILD_ROOT/%{pfx}/%{_prefix}
+make prefix=$RPM_BUILD_ROOT/%{pfx}/%{_prefix} install
+# pgen does not get installed by default.  Manually placing.
+cp Parser/pgen $RPM_BUILD_ROOT/%{pfx}/%{_prefix}/bin/
+
+%Clean
+rm -rf $RPM_BUILD_ROOT
+
+
+%Files
+%defattr(-,root,root)
+%{pfx}/*
Index: dist/lfs-5.1/python/python.spec
===================================================================
RCS file: /sources/ltib/ltib/dist/lfs-5.1/python/python.spec,v
retrieving revision 1.1.1.5
diff -u -r1.1.1.5 python.spec
--- dist/lfs-5.1/python/python.spec	6 Nov 2007 15:44:42 -0000	1.1.1.5
+++ dist/lfs-5.1/python/python.spec	30 Oct 2012 18:35:15 -0000
@@ -33,26 +33,40 @@
 # build for the target
 #
 
-ORIG_PATH=$PATH
-export PATH=$UNSPOOF_PATH
-./configure
-make python Parser/pgen
-mv python hostpython
-mv Parser/pgen Parser/hostpgen
-
-make distclean
-
-export PATH=$ORIG_PATH
+#test if there is ltib installed python
+if [ ! -e $DEFPFX/usr/bin/python ]; then 
+  ORIG_PATH=$PATH
+  export PATH=$UNSPOOF_PATH
+  ./configure
+  make python Parser/pgen
+  mv python hostpython
+  mv Parser/pgen Parser/hostpgen
+
+  make distclean
+
+  export PATH=$ORIG_PATH
+
+  HOSTPYTHON=./hostpython
+  HOSTPGEN=./Parser/hostpgen 
+else
+  HOSTPYTHON=python
+  HOSTPGEN=pgen 
+fi
 
 LDFLAGS="-L$DEV_IMAGE/usr/lib" \
 ./configure --prefix=%{_prefix} --host=$CFGHOST --build=%{_build} --enable-shared --without-libdb --without-ssl
 
-make HOSTPYTHON=./hostpython  HOSTPGEN=./Parser/hostpgen CROSS_COMPILE=yes
+make HOSTPYTHON=$HOSTPYTHON  HOSTPGEN=$HOSTPGEN CROSS_COMPILE=yes
 
 %Install
+if [ ! -e $DEFPFX/usr/bin/python ]; then 
+  HOSTPYTHON=./hostpython
+else
+  HOSTPYTHON=python
+fi
 rm -rf $RPM_BUILD_ROOT
 mkdir -p $RPM_BUILD_ROOT/%{pfx}/%{_prefix}
-make prefix=$RPM_BUILD_ROOT/%{pfx}/%{_prefix} HOSTPYTHON=./hostpython \
+make prefix=$RPM_BUILD_ROOT/%{pfx}/%{_prefix} HOSTPYTHON=$HOSTPYTHON \
      CROSS_COMPILE=yes install  
 
 %Clean
