Laca,

Good catch!

I modified that so that it
set PYTHON to 2.4
./configure ...
cp -rp python python2.4

set PYTHONG to default_version
./configure  ...

make with 2.6 option

cd python2.4

make with 2.4 option

I veriified that the in the Build directory

gheet at 
sling-osol:/opool/packages/BUILD/SUNWgnome-terminal-2.28.0/vte-0.22.2/python2.4$
 
grep 2.4 Makefile
PYTHON = /usr/bin/python2.4
PYTHON_INCLUDES = -I/usr/include/python2.4
PYTHON_LIBS = -L/usr/libs -lpython2.4
PYTHON_VERSION = 2.4
pyexecdir = ${exec_prefix}/lib/python2.4/site-packages
pythondir = ${prefix}/lib/python2.4/site-packages

gheet at 
sling-osol:/opool/packages/BUILD/SUNWgnome-terminal-2.28.0/vte-0.22.2/python$ 
grep 2.6 Makefile
PYTHON = /usr/bin/python2.6
PYTHON_INCLUDES = -I/usr/include/python2.6 -I/usr/include/python2.6
PYTHON_LIBS = -L/usr/libs -lpython2.6
PYTHON_VERSION = 2.6
pyexecdir = ${exec_prefix}/lib/python2.6/site-packages
pythondir = ${prefix}/lib/python2.6/site-packages


Thanks,

-Ghee

Laszlo (Laca) Peter wrote:
> On Fri, 2009-10-30 at 14:01 +0000, Ghee Teo wrote:
>   
>> With suggestion from Laca, so now I simply changed base-specs/vte.spec. 
>> I can now generate 2 version of the vtemodule.so as follow:
>>
>> --- base-specs/vte.spec    (revision 19758)
>> +++ base-specs/vte.spec    (working copy)
>> @@ -69,6 +69,8 @@
>>  automake -a -c -f
>>  autoconf
>>  
>> +export PYTHON=/usr/bin/python%{default_python_version}
>> +
>>  CFLAGS="$RPM_OPT_FLAGS"            \
>>  ./configure --prefix=%{_prefix}        \
>>          --sysconfdir=%{_sysconfdir} \
>> @@ -76,14 +78,25 @@
>>          --libexecdir=%{_libexecdir} \
>>          %{gtk_doc_option}
>>  
>> +cp -rp python python2.4
>>  make -j $CPUS \
>>      pyexecdir=%{_libdir}/python%{default_python_version}/vendor-packages \
>>      pythondir=%{_libdir}/python%{default_python_version}/vendor-packages
>>  
>> +export PYTHON=/usr/bin/python2.4
>> +cd python2.4
>> +make -j $CPUS \
>> +    pyexecdir=%{_libdir}/python2.4/vendor-packages \
>> +    pythondir=%{_libdir}/python2.4/vendor-packages
>> +
>>  %install
>>  make DESTDIR=$RPM_BUILD_ROOT install \
>>      pyexecdir=%{_libdir}/python%{default_python_version}/vendor-packages \
>>      pythondir=%{_libdir}/python%{default_python_version}/vendor-packages
>> +cd python2.4
>> +make DESTDIR=$RPM_BUILD_ROOT install \
>> +    pyexecdir=%{_libdir}/python2.4/vendor-packages \
>> +    pythondir=%{_libdir}/python2.4/vendor-packages
>>  #Copy zh_HK from zh_TW
>>  #Fixes bug 4930405
>>  install -d $RPM_BUILD_ROOT%{_datadir}/locale/zh_HK/LC_MESSAGES
>>     
>
> Ghee,
>
> I doubt that this works, did you try importing the 2.4 module with
> python2.4?  Setting PYTHON after running configure is unlikely to
> have any affect on the build, as the various flags are already fixed
> in the Makefile by configure.  So what probably happens is you build
> the module for 2.6 twice and install one of those in the 2.4
> directory.  Running ldd on the .so can confirm my theory, or just
> trying to import it.
>
> Laca
>
>   

Reply via email to