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