]> git.pld-linux.org Git - packages/python.git/blobdiff - python.spec
- adapterized (avoid macros with /usr/include/{ncurses,freetype}*)
[packages/python.git] / python.spec
index 93ba0117173f6de4c77c860189e652fa64c8c86a..fa45249e2495f6611db656cd56ff787b99505646 100644 (file)
@@ -3,54 +3,49 @@
 %bcond_without tkinter                 # disables tkinter module building
 %bcond_without tests                   # disables Python testing
 %bcond_with    verbose_tests           # runs tests in verbose mode
-%bcond_with    noautosys               # do not put sys.argv[0] directory in sys.path
 #
 # tests which will not work on 64-bit platforms
 %define                no64bit_tests   test_audioop test_rgbimg test_imageop
 # tests which may fail because of builder environment limitations (no /proc or /dev/pts)
-%define                nobuilder_tests test_resource test_openpty test_socket test_nis test_posix test_locale
+%define                nobuilder_tests test_resource test_openpty test_socket test_nis test_posix test_locale test_pty
 # tests which fail because of some unknown/unresolved reason (this list should be empty)
-%define                broken_tests test_anydbm test_bsddb test_re test_shelve test_whichdb test_zipimport
-
-%define py_ver         2.3
-%define py_prefix      %{_prefix}
-%define py_libdir      %{py_prefix}/%{_lib}/python%{py_ver}
-%define py_scriptdir   %{py_prefix}/share/python%{py_ver}
-%define py_incdir      %{_includedir}/python%{py_ver}
-%define py_sitedir     %{py_libdir}/site-packages
-%define py_sitescriptdir %{py_scriptdir}/site-packages
-%define py_dyndir      %{py_libdir}/lib-dynload
-%define py_comp        ./python -c "import compileall; import sys; compileall.compile_dir(sys.argv[1], ddir=sys.argv[1][len('$RPM_BUILD_ROOT'):])"
-%define py_ocomp       ./python -O -c "import compileall; import sys; compileall.compile_dir(sys.argv[1], ddir=sys.argv[1][len('$RPM_BUILD_ROOT'):])"
+%define                broken_tests test_anydbm test_bsddb test_re test_shelve test_whichdb test_zipimport test_distutils
+# test_distutils fails for unknown reason:
+# AssertionError: '/tmp/tmpaomC0l/installation/share/python' != '/tmp/tmpaomC0l/installation/lib/python'
+
+%define py_ver         2.4
+%define py_prefix      %{_prefix}
+%define py_libdir      %{py_prefix}/%{_lib}/python%{py_ver}
+%define py_incdir      %{_includedir}/python%{py_ver}
+%define py_sitedir     %{py_libdir}/site-packages
+%define py_dyndir      %{py_libdir}/lib-dynload
 
 Summary:       Very high level scripting language with X interface
-Summary(de):   Very High-Level-Script-Sprache mit X-Oberfläche
-Summary(es):   Lenguaje script de alto nivel con interface X
-Summary(fr):   Langage de script de tés haut niveau avec interface X
+Summary(es):   Lenguaje script de alto nivel con interfaz X
+Summary(fr):   Langage de script de très haut niveau avec interface X
 Summary(pl):   Python - jêzyk obiektowy wysokiego poziomu
-Summary(pt_BR):        Linguagem de programação interpretada, orientada a objeto de alto nível
+Summary(pt_BR):        Linguagem de programação interpretada de alto nível
 Summary(ru):   ñÚÙË ÐÒÏÇÒÁÍÍÉÒÏ×ÁÎÉÑ ÏÞÅÎØ ×ÙÓÏËÏÇÏ ÕÒÏ×ÎÑ Ó X-ÉÎÔÅÒÆÅÊÓÏÍ
 Summary(tr):   X arayüzlü, yüksek düzeyli, kabuk yorumlayýcý dili
 Summary(uk):   íÏ×Á ÐÒÏÇÒÁÍÕ×ÁÎÎÑ ÄÕÖÅ ×ÉÓÏËÏÇÏ Ò¦×ÎÑ Ú X-¦ÎÔÅÒÆÅÊÓÏÍ
 Name:          python
-Version:       %{py_ver}.4
-Release:       1
+Version:       %{py_ver}.2
+Release:       2.1
 Epoch:         1
 License:       PSF
 Group:         Applications
 Source0:       http://www.python.org/ftp/python/%{version}/Python-%{version}.tar.bz2
-# Source0-md5: a2c089faa2726c142419c03472fc4063
+# Source0-md5: 98db1465629693fc434d4dc52db93838
 Source1:       http://www.python.org/ftp/python/doc/%{version}/html-%{version}.tar.bz2
-# Source1-md5: 599abc498714de055814d4542de4f2fc
+# Source1-md5: 4e3f177f32e15713130d9d9cf35f991f
 Patch0:                %{name}-readline.patch
 Patch1:                %{name}-%{name}path.patch
-Patch2:                %{name}-default_encoding.patch
-Patch3:                %{name}-no_ndbm.patch
-Patch4:                %{name}-ac_fixes.patch
-Patch5:                %{name}-noarch_to_datadir.patch
-Patch6:                %{name}-lib64.patch
-Patch7:                %{name}-doc_path.patch
-Patch8:                %{name}-noautosys.patch
+Patch2:                %{name}-no_ndbm.patch
+Patch3:                %{name}-ac_fixes.patch
+Patch4:                %{name}-noarch_to_datadir.patch
+Patch5:                %{name}-lib64.patch
+Patch6:                %{name}-doc_path.patch
+Patch7:                %{name}-db44.patch
 URL:           http://www.python.org/
 BuildRequires: autoconf
 BuildRequires: bzip2-devel
@@ -58,14 +53,15 @@ BuildRequires:      db-devel >= 4
 BuildRequires: expat-devel >= 1:1.95.7
 BuildRequires: gdbm-devel >= 1.8.3
 BuildRequires: gmp-devel >= 4.0
+BuildRequires: libstdc++-devel
 BuildRequires: ncurses-ext-devel >= 5.2
 BuildRequires: openssl-devel >= 0.9.7d
-BuildRequires: readline-devel >= 4.2
+BuildRequires: readline-devel >= 5.0
+BuildRequires: sed >= 4.0
 %{?with_tkinter:BuildRequires: tix-devel >= 1:8.1.4-4}
 %{?with_tkinter:BuildRequires: tk-devel >= 8.4.3}
 BuildRequires: zlib-devel
 Requires:      %{name}-libs = %{epoch}:%{version}-%{release}
-Provides:      %{name} = %{py_ver}
 Obsoletes:     python-xml
 Obsoletes:     python-intl
 Obsoletes:     python-curses
@@ -81,7 +77,7 @@ BuildRoot:    %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 %define test_flags -l -x 
 %endif
 
-%ifarch alpha amd64 ia64 ppc64 sparc64 ppc64
+%ifarch alpha ia64 ppc64 sparc64 ppc64 %{x8664}
 %define test_list %{nobuilder_tests} %{broken_tests} %{no64bit_tests}
 %else
 %define test_list %{nobuilder_tests} %{broken_tests}
@@ -119,7 +115,7 @@ excepciones.
 
 Es sencillo adicionar interfaces para nuevos sistemas de biblioteca a
 través de código C, tornando Python fácil de usar en ambientes
-articulares/ personalizados. Este paquete Python incluye la mayoría de
+particulares/personalizados. Este paquete Python incluye la mayoría de
 los módulos padrón Python, junto con módulos para crear interfaces
 para el conjunto de componentes Tix para Tk y RPM.
 
@@ -184,7 +180,10 @@ Python - 
 Summary:       Python library
 Summary(pl):   Biblioteka jêzyka Python
 Group:         Libraries/Python
-Provides:      %{name}-libs = %{py_ver}
+# broken detection in rpm/pythondeps.sh
+Provides:      python(abi) = %{py_ver}
+# for compatibility with existing Ac packages
+Provides:      python(bytecode) = %{py_ver}
 
 %description libs
 Python library.
@@ -196,8 +195,7 @@ Biblioteka j
 Summary:       Python modules
 Summary(pl):   Modu³y jêzyka Python
 Group:         Libraries/Python
-Requires:      %{name} = %{epoch}:%{version}-%{release}
-Provides:      %{name}-modules = %{py_ver}
+Requires:      %{name}-libs = %{epoch}:%{version}-%{release}
 Obsoletes:     python-logging
 Obsoletes:     python-optik
 Obsoletes:     python-xmlrpc <= 1.0.1
@@ -320,14 +318,14 @@ Requires: %{name}-modules = %{epoch}:%{version}-%{release}
 Python development tools such as profilers and debugger.
 
 %description devel-tools -l pl
-Narzêdzia programistyczne jêzyka Python takie jak profiler oraz debugger.
+Narzêdzia programistyczne jêzyka Python takie jak profiler oraz
+debugger.
 
 %package static
 Summary:       Static python library
 Summary(pl):   Statyczna biblioteka Pythona
 Group:         Development/Languages/Python
 Requires:      %{name}-devel = %{epoch}:%{version}-%{release}
-Provides:      %{name}-static = %{py_ver}
 
 %description static
 Static python library.
@@ -368,8 +366,8 @@ son interpr
 Oficjalna dokumentacja do Pythona. Zawiera przyk³adowe programy,
 narzêdzia i dokumentacjê. Strony podrêcznika man znajduj± siê w
 g³ównym pakiecie. Ten pakiet nie zawiera ¼róde³ dokumentacji
-napisanych w LaTeXu, tylko gotowe do wykorzystania pliki
-postscriptowe i HTML.
+napisanych w LaTeXu, tylko gotowe do wykorzystania pliki postscriptowe
+i HTML.
 
 %description doc -l pt_BR
 O pacote python-doc contém documentação para a linguagem de
@@ -392,17 +390,17 @@ LaTeX kaynaklar
 
 %package tkinter
 Summary:       Standard Python interface to the Tk GUI toolkit
-Summary(de):   Grafischer Oberfläche für Python
-Summary(es):   Interface GUI para Phyton
-Summary(fr):   Interface graphique pour python
+Summary(de):   Grafische Tk-Schnittstelle für Python
+Summary(es):   Interfaz de GUI Tk para Python
+Summary(fr):   Interface graphique Tk pour Python
 Summary(pl):   Standardowy interfejs Pythona do biblioteki Tk
-Summary(pt_BR):        Interface GUI para Phyton
+Summary(pt_BR):        Interface GUI Tk para Phyton
 Summary(tr):   Python için grafik kullanýcý arayüzü
 Group:         Libraries/Python
 Requires:      %{name}-modules = %{epoch}:%{version}-%{release}
 Requires:      tcl >= 8.4.3
 Requires:      tix >= 1:8.1.4-4
-Requires:      tk  >= 8.4.3
+Requires:      tk >= 8.4.3
 Obsoletes:     tkinter
 
 %description tkinter
@@ -413,8 +411,8 @@ Eine grafische Schnittstelle f
 vielen Konfigurations-Tools genutzt.
 
 %description tkinter -l es
-Una interface gráfica para Python, basada en Tcl/Tk, y usada por
-muchas herramientas de configuración.
+Una interfaz gráfica para Python, basada en Tcl/Tk, y usada por muchas
+herramientas de configuración.
 
 %description tkinter -l fr
 Interface graphique pour Python, basée sur Tcl/Tk et utilisée par
@@ -438,7 +436,7 @@ kullan
 çÒÁƦÞÎÉÊ ¦ÎÔÅÒÆÅÊÓ (GUI) ÄÌÑ Python, ÐÏÂÕÄÏ×ÁÎÉÊ ÎÁ Tcl/Tk.
 
 %package old
-Summary:       Depreciated Python modules
+Summary:       Deprecated Python modules
 Summary(pl):   Nieaktualne modu³y jêzyka Python
 Group:         Libraries/Python
 Requires:      %{name}-modules = %{epoch}:%{version}-%{release}
@@ -464,9 +462,13 @@ Obsoletes: python-tools
 %description examples
 Example programs in Python.
 
+These are for Python 2.3.4, not %{version}.
+
 %description examples -l pl
 Przyk³adowe programy w Pythonie.
 
+Przyk³ady te s± dla Pythona 2.3.4, nie %{version}.
+
 %prep
 %setup -q -n Python-%{version}
 %patch0 -p1
@@ -474,23 +476,24 @@ Przyk
 %patch2 -p1
 %patch3 -p1
 %patch4 -p1
-%patch5 -p1
 %if "%{_lib}" == "lib64"
-%patch6 -p1
+%patch5 -p1
 %endif
+%patch6 -p1
 %patch7 -p1
-%{?with_noautosys:%patch8 -p1}
 
 tar -xf %{SOURCE1} --use=bzip2
 
 %build
+sed -i -e 's#-ltermcap#-ltinfo#g' configure*
 %{__autoconf}
-
-CPPFLAGS="-I%{_includedir}/ncurses"; export CPPFLAGS
+CPPFLAGS="-I/usr/include/ncurses"; export CPPFLAGS
 %configure \
        --with-threads \
+       --with-cxx="%{__cxx}" \
        --enable-unicode=ucs4 \
-       --enable-shared
+       --enable-shared \
+       LINKCC='$(PURIFY) $(CXX)'
 
 %{__make} \
        OPT="%{rpmcflags}"
@@ -498,14 +501,17 @@ CPPFLAGS="-I%{_includedir}/ncurses"; export CPPFLAGS
 LC_ALL=C
 export LC_ALL
 %if %{with tests}
+binlibdir=`echo build/lib.*`
 %{__make} test \
-       TESTOPTS="%{test_flags} %{test_list}"
+       TESTOPTS="%{test_flags} %{test_list}" \
+       TESTPYTHON="LD_LIBRARY_PATH=`pwd` PYTHONHOME=`pwd` PYTHONPATH=`pwd`/Lib:$binlibdir ./python -tt"
 %endif
 
 %install
 rm -rf $RPM_BUILD_ROOT
 install -d $RPM_BUILD_ROOT{%{_bindir},%{_libdir}} \
-       $RPM_BUILD_ROOT{%{py_sitedir},%{_mandir}/man1}
+       $RPM_BUILD_ROOT{%{py_sitedir},%{_mandir}/man1} \
+       $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
 
 %{__make} install \
        DESTDIR=$RPM_BUILD_ROOT
@@ -522,14 +528,11 @@ rm -f $RPM_BUILD_ROOT%{_bindir}/python%{py_ver}
 install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
 cp -ar Tools Demo $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
 
-SCRIPT_EXT="_py"
-%if %{with noautosys}
-    SCRIPT_EXT=".py"
-%endif
+SCRIPT_EXT=".py"
 export SCRIPT_EXT
 
-# create several useful scripts, such as timeit.py, profile.py, pdb.py
-for script in timeit profile pdb pstats; do
+# create several useful scripts, such as timeit.py, profile.py, pdb.py, smtpd.py
+for script in timeit profile pdb pstats smtpd; do
     cat <<END > $RPM_BUILD_ROOT%{_bindir}/${script}$SCRIPT_EXT
 #!/bin/sh
 exec python %{py_scriptdir}/${script}.pyc "\$@"
@@ -542,17 +545,14 @@ install Tools/i18n/pygettext.py $RPM_BUILD_ROOT%{_bindir}/pygettext$SCRIPT_EXT
 %clean
 rm -rf $RPM_BUILD_ROOT
 
-%post   libs -p /sbin/ldconfig
-%postun libs -p /sbin/ldconfig
+%post  libs -p /sbin/ldconfig
+%postun        libs -p /sbin/ldconfig
 
 %files
 %defattr(644,root,root,755)
 %attr(755,root,root) %{_bindir}/python
 %{_mandir}/man1/*
 
-# readline support for python binary
-%attr(755,root,root) %{py_dyndir}/readline.so
-
 %files modules
 %defattr(644,root,root,755)
 %exclude %{py_scriptdir}/UserDict.py[co]
@@ -578,7 +578,7 @@ rm -rf $RPM_BUILD_ROOT
 
 # three modules below does not work on 64-bit architectures
 # see Python README file for explanation
-%ifnarch alpha amd64 ia64 ppc64 sparc64
+%ifnarch alpha ia64 ppc64 sparc64 %{x8664}
 %attr(755,root,root) %{py_dyndir}/audioop.so
 %attr(755,root,root) %{py_dyndir}/rgbimg.so
 %attr(755,root,root) %{py_dyndir}/imageop.so
@@ -587,11 +587,20 @@ rm -rf $RPM_BUILD_ROOT
 %attr(755,root,root) %{py_dyndir}/dl.so
 %endif
 
+%attr(755,root,root) %{py_dyndir}/_bisect.so
 %attr(755,root,root) %{py_dyndir}/_bsddb.so
+%attr(755,root,root) %{py_dyndir}/_codecs_cn.so
+%attr(755,root,root) %{py_dyndir}/_codecs_hk.so
+%attr(755,root,root) %{py_dyndir}/_codecs_iso2022.so
+%attr(755,root,root) %{py_dyndir}/_codecs_jp.so
+%attr(755,root,root) %{py_dyndir}/_codecs_kr.so
+%attr(755,root,root) %{py_dyndir}/_codecs_tw.so
 %attr(755,root,root) %{py_dyndir}/_csv.so
 %attr(755,root,root) %{py_dyndir}/_curses.so
 %attr(755,root,root) %{py_dyndir}/_curses_panel.so
+%attr(755,root,root) %{py_dyndir}/_heapq.so
 %attr(755,root,root) %{py_dyndir}/_locale.so
+%attr(755,root,root) %{py_dyndir}/_multibytecodec.so
 %attr(755,root,root) %{py_dyndir}/_random.so
 %attr(755,root,root) %{py_dyndir}/_socket.so
 %attr(755,root,root) %{py_dyndir}/_ssl.so
@@ -603,9 +612,12 @@ rm -rf $RPM_BUILD_ROOT
 %attr(755,root,root) %{py_dyndir}/cPickle.so
 %attr(755,root,root) %{py_dyndir}/cStringIO.so
 %attr(755,root,root) %{py_dyndir}/cmath.so
+%attr(755,root,root) %{py_dyndir}/collections.so
 %attr(755,root,root) %{py_dyndir}/crypt.so
 %attr(755,root,root) %{py_dyndir}/datetime.so
+%ifnarch sparc64
 %attr(755,root,root) %{py_dyndir}/dbm.so
+%endif
 %attr(755,root,root) %{py_dyndir}/fcntl.so
 %attr(755,root,root) %{py_dyndir}/gdbm.so
 %attr(755,root,root) %{py_dyndir}/grp.so
@@ -614,17 +626,15 @@ rm -rf $RPM_BUILD_ROOT
 %attr(755,root,root) %{py_dyndir}/math.so
 %attr(755,root,root) %{py_dyndir}/md5.so
 %attr(755,root,root) %{py_dyndir}/mmap.so
-%attr(755,root,root) %{py_dyndir}/mpz.so
 %attr(755,root,root) %{py_dyndir}/nis.so
 %attr(755,root,root) %{py_dyndir}/operator.so
 %attr(755,root,root) %{py_dyndir}/ossaudiodev.so
 %attr(755,root,root) %{py_dyndir}/parser.so
-%attr(755,root,root) %{py_dyndir}/pcre.so
 %attr(755,root,root) %{py_dyndir}/pwd.so
 %attr(755,root,root) %{py_dyndir}/pyexpat.so
+%attr(755,root,root) %{py_dyndir}/readline.so
 %attr(755,root,root) %{py_dyndir}/regex.so
 %attr(755,root,root) %{py_dyndir}/resource.so
-%attr(755,root,root) %{py_dyndir}/rotor.so
 %attr(755,root,root) %{py_dyndir}/select.so
 %attr(755,root,root) %{py_dyndir}/sha.so
 %attr(755,root,root) %{py_dyndir}/strop.so
@@ -633,7 +643,6 @@ rm -rf $RPM_BUILD_ROOT
 %attr(755,root,root) %{py_dyndir}/time.so
 %attr(755,root,root) %{py_dyndir}/timing.so
 %attr(755,root,root) %{py_dyndir}/unicodedata.so
-%attr(755,root,root) %{py_dyndir}/xreadlines.so
 %attr(755,root,root) %{py_dyndir}/zlib.so
 
 %dir %{py_scriptdir}/plat-*
@@ -731,7 +740,8 @@ rm -rf $RPM_BUILD_ROOT
 %{py_libdir}/config/Setup.local
 %{py_libdir}/config/config.c
 %{py_libdir}/config/config.c.in
-%{py_libdir}/config/python.o
+%{py_libdir}/config/ccpython.o
+%{py_libdir}/config/libpython2.4.a
 
 %files devel-src
 %defattr(644,root,root,755)
@@ -760,6 +770,7 @@ rm -rf $RPM_BUILD_ROOT
 %attr(755,root,root) %{_bindir}/pdb*
 %attr(755,root,root) %{_bindir}/pstats*
 %attr(755,root,root) %{_bindir}/pygettext*
+%attr(755,root,root) %{_bindir}/smtpd*
 
 %attr(755,root,root) %{py_dyndir}/_hotshot.so
 %dir %{py_scriptdir}/hotshot
@@ -779,11 +790,11 @@ rm -rf $RPM_BUILD_ROOT
 
 %files doc
 %defattr(644,root,root,755)
-%doc Python-Docs-%{version}/*
-%dir %{py_scriptdir}/test
-%attr(-,root,root) %{py_scriptdir}/test/*
-%attr(-,root,root) %{py_scriptdir}/email/test/*
-%attr(-,root,root) %{py_scriptdir}/bsddb/test/*
+# FIXME
+%doc Python-Docs-%{version}
+%attr(-,root,root) %{py_scriptdir}/test
+%attr(-,root,root) %{py_scriptdir}/email/test
+%attr(-,root,root) %{py_scriptdir}/bsddb/test
 
 %if %{with tkinter}
 %files tkinter
This page took 0.116639 seconds and 4 git commands to generate.