从python.org下载的源代码包,编译成为RPM包时出现错误。通过修正spec文件获得了CentOS5下面的rpm包。下面是不同点:
$ diff Python-2.6.4/Misc/RPM/python-2.6.spec ~/rpmbuild/SPECS/python-2.6.spec
38c38
< %define libver 2.6
---
> %define libvers 2.6
57c57
< Copyright: Modified CNRI Open Source License
---
> License: Modified CNRI Open Source License
258,259c258,260
< mv -f python python"%{binsuffix}" )
< ( cd $RPM_BUILD_ROOT%{__prefix}/man/man1; mv python.1 python%{binsuffix}.1 )
---
> mv -f python python"%{binsuffix}";
> mv -f python-config python%{binsuffix}-config )
> ( cd $RPM_BUILD_ROOT%{__prefix}/share/man/man1; mv python.1 python%{binsuffix}.1 )
344c345
< %{__prefix}/man/man1/python%{binsuffix}.1*
---
> %{__prefix}/share/man/man1/python%{binsuffix}.1*
351d351
< %{__prefix}/%{libdirname}/python%{libvers}/profile.doc
360c360
< %{__prefix}/%{libdirname}/python%{libvers}/email/mime
---
> #%{__prefix}/%{libdirname}/python%{libvers}/email/mime
366a367,372
> %{__prefix}/%{libdirname}/python%{libvers}/ctypes
> %{__prefix}/%{libdirname}/python%{libvers}/json
> %{__prefix}/%{libdirname}/python%{libvers}/lib2to3
> %{__prefix}/%{libdirname}/python%{libvers}/multiprocessing
> %{__prefix}/%{libdirname}/python%{libvers}/wsgiref
>
369a376
> %{__prefix}/bin/python%{binsuffix}-config