OK, now I realized that it is possible to setup python-cheetah on RHEL4-X86(python-2.3.4). I just made opkgc work with python-2.3.4. http://www.redhat.com/archives/et-mgmt-tools/2006-October/msg00004.html This link helped me to tweak the missing subprocess module. All I did to tweak the subprocess thing is 1. download the mercurial rpm for RHEL4-X86( http://dag.wieers.com/rpm/packages/mercurial/ ) 2. install it and then clone cobbler with this: hg clone http://hg.et.redhat.com/hg/emd/applications/cobbler cobbler 3. compile cobbler and then copy sub_process.py to Cheetah. cd cobbler; make; cp cobbler/sub_process.py /usr/local/lib/python2.3/site-packages/Cheetah/subprocess.py 4. Modify /usr/local/lib/python2.3/site-packages/Opkgc/Tools.py --- Tools.py (revision 6784) +++ Tools.py (working copy) @@ -13,7 +13,7 @@ import shutil import re import os, sys, traceback -import subprocess +from Cheetah.Templates import subprocess
Well, anyway, setting up opkgc with python-2.3.4 seems to work with this whole mess. Maybe, there is an easier way but this is what I have got. :-) Regards, - DongInn DongInn Kim wrote: > Thanks, I just found the proper python-cheetah and python-lxml rpms for > RHEL4-X86 but I still get the python error when opkgc runs. > http://dag.wieers.com/rpm/packages/python-cheetah/ > http://dag.wieers.com/rpm/packages/python-lxml/ > >> [EMAIL PROTECTED] site-packages]# opkgc >> Traceback (most recent call last): >> File "/usr/local/bin/opkgc", line 31, in ? >> from Opkgc.Compiler import * >> File "/usr/local/lib/python2.3/site-packages/Opkgc/Compiler.py", line 22, >> in ? >> from Tools import * >> File "/usr/local/lib/python2.3/site-packages/Opkgc/Tools.py", line 16, in ? >> import subprocess >> ImportError: No module named subprocess > > Maybe, the above python-cheetah rpm does not have the enough modules(e.g., > subprocess)? > ----------- > vim /usr/local/lib/python2.3/site-packages/Opkgc/Tools.py > ----------- >> from Cheetah.Template import Template >> import shutil >> import re >> import os, sys, traceback >> import subprocess > > > Regards, > > - DongInn > > > Bernard Li wrote: >> Don't remember exactly, but try the DAG repository. >> >> Regards, >> >> Bernard >> >> On 12/23/07, DongInn Kim <[EMAIL PROTECTED]> wrote: >>> Hi Bernard, >>> >>> I don't know how you could get through the installation of Cheetah and lxml >>> python modules with python-2.3.4 but I could not find any proper >>> python-cheetah and python-lxml rpms for RHEL4-x86 which may be available >>> and I could not install them with their source files either. The >>> compilation of Cheetah failed with the following whole bunch of errors. >>>> gcc -pthread -fno-strict-aliasing -DNDEBUG -O2 -g -pipe -m32 -march=i386 >>>> -mtune=pentium4 -D_GNU_SOURCE -fPIC -fPIC -I/usr/include/python2.3 -c >>>> src/_namemapper.c -o build/temp.linux-i686-2.3/src/_namemapper.o >>>> src/_namemapper.c:15:58: Python.h: No such file or directory >>>> src/_namemapper.c:24: error: syntax error before '*' token >>>> src/_namemapper.c:24: warning: data definition has no type or storage class >>>> src/_namemapper.c:25: error: syntax error before '*' token >>>> src/_namemapper.c:25: warning: data definition has no type or storage class >>>> src/_namemapper.c:26: error: syntax error before '*' token >>>> src/_namemapper.c:26: warning: data definition has no type or storage class >>>> src/_namemapper.c:75: error: syntax error before "PyObject" >>>> src/_namemapper.c: In function `setNotFoundException': >>> So, I have never been able to setup opkgc successfully with python-2.3.* on >>> RHEL4-X86. >>> >>> Anyways, if you can happen to remember how you have handled them, please >>> let us know. That would be useful for someone who want to setup opkgc on >>> RHEL4. This would not need to install another python that I built. :-) >>> >>> Regards, >>> >>> - DongInn >>> >>> >>> Bernard Li wrote: >>>> Hi DongInn: >>>> >>>> On 12/23/07, DongInn Kim <[EMAIL PROTECTED]> wrote: >>>> >>>>> BTW, I have built python-oscar rpms to setup python-2.4.4 on RHEL4. These >>>>> rpms have been pretty useful to build the opkg meta rpms on RHEL4. >>>>> All you have to do is download python-oscar-2.4.4-19.i686.rpm and >>>>> python-oscar-devel-2.4.4-19.i686.rpm and then install them. Since these >>>>> rpms are totally independent of the RHEL4's existing python-2.3.*, they >>>>> can be freely added/removed. >>>>> Once they are installed, in order to use the python-2.4.4, use the python >>>>> module setup on modules-oscar rebuilt for only RHEL4. (e.g., module load >>>>> python). >>>>> http://www.osl.iu.edu/~dikim/python-oscar/ >>>> opkgc works with Python 2.3.4 which ships with RHEL4 -- it's just that >>>> documentation can't be build but it's not essential for operation. >>>> >>>> Regards, >>>> >>>> Bernard >>>> >>>> ------------------------------------------------------------------------- >>>> This SF.net email is sponsored by: Microsoft >>>> Defy all challenges. Microsoft(R) Visual Studio 2005. >>>> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ >>>> _______________________________________________ >>>> Oscar-devel mailing list >>>> [email protected] >>>> https://lists.sourceforge.net/lists/listinfo/oscar-devel >>> ------------------------------------------------------------------------- >>> This SF.net email is sponsored by: Microsoft >>> Defy all challenges. Microsoft(R) Visual Studio 2005. >>> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ >>> _______________________________________________ >>> Oscar-devel mailing list >>> [email protected] >>> https://lists.sourceforge.net/lists/listinfo/oscar-devel >>> >> ------------------------------------------------------------------------- >> This SF.net email is sponsored by: Microsoft >> Defy all challenges. Microsoft(R) Visual Studio 2005. >> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ >> _______________________________________________ >> Oscar-devel mailing list >> [email protected] >> https://lists.sourceforge.net/lists/listinfo/oscar-devel > > ------------------------------------------------------------------------- > This SF.net email is sponsored by: Microsoft > Defy all challenges. Microsoft(R) Visual Studio 2005. > http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ > _______________________________________________ > Oscar-devel mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/oscar-devel ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ Oscar-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/oscar-devel
