2 %define py_prefix %{_prefix}
3 %define py_libdir %{py_prefix}/lib/python%{py_ver}
4 %define py_incdir %{_includedir}/python%{py_ver}
5 %define py_sitedir %{py_libdir}/site-packages
6 %define py_dyndir %{py_libdir}/lib-dynload
7 %define py_comp ./python -c "import compileall; import sys; compileall.compile_dir(sys.argv[1], ddir=sys.argv[1][len('$RPM_BUILD_ROOT'):])"
8 %define py_ocomp ./python -O -c "import compileall; import sys; compileall.compile_dir(sys.argv[1], ddir=sys.argv[1][len('$RPM_BUILD_ROOT'):])"
10 Summary: Very high level scripting language with X interface
11 Summary(de): Very High-Level-Script-Sprache mit X-Oberfläche
12 Summary(es): Lenguaje script de alto nivel con interface X
13 Summary(fr): Langage de script de tés haut niveau avec interface X
14 Summary(pl): Python - jêzyk obiektowy wysokiego poziomu
15 Summary(pt_BR): Linguagem de programação interpretada, orientada a objeto de alto nível
16 Summary(tr): X arayüzlü, yüksek düzeyli, kabuk yorumlayýcý dili
21 Group: Development/Languages/Python
22 URL: http://www.python.org/
23 Source0: http://prdownloads.sourceforge.net/python/Python-%{version}.tgz
24 Source1: http://www.python.org/ftp/python/doc/%{version}/html-%{version}.tar.bz2
25 Source2: %{name}-setup.dist
26 Patch0: %{name}-shared-lib.patch
27 Patch1: %{name}-readline.patch
28 Patch2: %{name}-%{name}path.patch
29 Patch3: %{name}-ac25x.patch
30 Patch4: %{name}-default_encoding.patch
31 Patch5: %{name}-no_ndbm.patch
32 Patch6: %{name}-ac_fixes.patch
33 BuildRequires: XFree86-devel
34 BuildRequires: autoconf
35 BuildRequires: db3-devel
36 BuildRequires: expat-devel
37 BuildRequires: gdbm-devel >= 1.0.8-7
38 BuildRequires: gmp-devel => 4.0
39 BuildRequires: ncurses-devel >= 5.2
40 BuildRequires: openssl-devel >= 0.9.6b
41 BuildRequires: readline-devel >= 4.2
42 BuildRequires: tcl-devel >= 8.3.2
43 BuildRequires: tix-devel
44 BuildRequires: tk-devel >= 8.3.2
45 BuildRequires: zlib-devel
46 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
48 Obsoletes: python-intl
49 Obsoletes: python-curses
50 Obsoletes: python-gdbm
51 Obsoletes: python-zlib
53 Obsoletes: python2-devel
56 Python is an interpreted, interactive, object-oriented programming
57 language. It incorporates modules, exceptions, dynamic typing, very
58 high level dynamic data types, and classes. Python combines remarkable
59 power with very clear syntax. It has interfaces to many system calls
60 and libraries, as well as to various window systems, and is extensible
61 in C or C++. It is also usable as an extension language for
62 applications that need a programmable interface. Finally, Python is
63 portable: it runs on many brands of UNIX, on the Mac, and on PCs under
64 MS-DOS, Windows, Windows NT, and OS/2.
67 Python ist eine interpretierte, interaktive, objektorientierte
68 Programmiersprache, vergleichbar zu Tcl, Perl, Scheme oder Java.
69 Python enthält Module, Klassen, Exceptions, High-Level dynamische
70 Datentypen und dynamisches Typisieren. Python unterstützt Interfaces
71 zu vielen Systemaufrufen und Libraries, sowie verschiedene
72 Fenstersysteme (X11, Motif, Tk, Mac und MFC)
74 Programmierer können neue built-in-Module für Python in C oder C++
75 schreiben. Python kann auch als Erweiterungssprache für Applikationen
76 benutzt werden, die ein programmierbares Interface brauchen. Dieses
77 Paket enthält die meisten Standard-Python-Module, und Module zum
78 Ansprechen von Tix (Tk-widget set) und RPM.
80 Dokumentationen zu Python sind in python-doc enthalten.
83 Python es un lenguaje de scripts interpretado orientado a objetos.
84 Contiene soporte para carga dinámica de objetos, clases, módulos y
87 Es sencillo adicionar interfaces para nuevos sistemas de biblioteca a
88 través de código C, tornando Python fácil de usar en ambientes
89 articulares/ personalizados. Este paquete Python incluye la mayoría de
90 los módulos padrón Python, junto con módulos para crear interfaces
91 para el conjunto de componentes Tix para Tk y RPM.
94 Python est un langage de script interprété et orienté objet. Il gère
95 le chargement dynamique des objets, les classes, les modules et les
96 exceptions. L'ajout d'interfaces aux nouvelles bibliothèques systèmes
97 avec du code C est simple, ce qui rend Python facile à utiliser dans
98 des configs personnalisées.
100 Ce paquetage Python contient la plupart des modules Python standards,
101 ainsi que ceux permettant l'interfaçage avec les widgets Tix pour Tk
105 Python jest interpretowanym, interaktywnym i zorientowanym obiektowo
106 jêzykiem programowania. Jest modularny, obs³uguje wyj±tki, dynamiczne
107 typy, zaawansowane dynamiczne struktury danych i klasy. Python ³±czy w
108 sobie du¿e mo¿liwo¶ci i przejrzyst± sk³adniê. Posiada interfejsy do
109 wielu wywo³añ systemowych i bibliotek, w tym równie¿ do ró¿nych
110 bibliotek okienkowych. Mo¿liwo¶ci jego mo¿na jeszcze rozszerzaæ
111 poprzez odpowiednie modu³y pisane w C lub C++. Python mo¿e byæ równie¿
112 u¿yty jako element aplikacji, którym potrzebny jest interpreter do
113 skryptów. I wreszcie, Python jest wieloplatformowy, dzia³a na wielu
114 odmianach UNIX-a, Macu oraz PC pod DOS-em, Windows, WindowsNT oraz
117 %description -l pt_BR
118 Python é uma linguagem de scripts interpretada orientada a objetos.
119 Contém suporte para carga dinâmica de objetos, classes, módulos e
120 exceções. Adicionar interfaces para novos sistemas de biblioteca
121 através de código C é simples, tornando Python fácil de usar em
122 ambientes particulares/personalizados.
124 Este pacote Python inclui a maioria do módulos padrão Python, junto
125 com módulos para interfaceamento para o conjunto de componentes Tix
129 Python, nesneye yönelik bir kabuk yorumlayýcýdýr. Nesnelerin,
130 sýnýflarýn, modüllerin ve aykýrý durumlarýn dinamik yüklenmelerine
131 destek verir. C koduyla birlikte kullanýmý son derece kolaydýr. Bu
132 paket, standart Python birimlerinin çoðunun yanýsýra Tk ve RPM için
133 arayüz birimlerini de içerir.
136 Summary: Python library
137 Summary(pl): Biblioteka jêzyka Python
138 Group: Development/Languages/Python
143 %description libs -l pl
144 Biblioteka jêzyka Python.
147 Summary: Python modules
148 Summary(pl): Modu³y jêzyka Python
149 Group: Development/Languages/Python
150 Requires: %{name} = %{version}
155 %description modules -l pl
156 Modu³y jêzyka Python.
159 Summary: Python interactive module documentation access support
160 Summary(pl): Interaktywne korzystanie z dokumentacji modu³ów jêzyka Python
161 Group: Development/Languages/Python
162 Requires: %{name}-modules = %{version}
165 Python interactive module documentation access support.
167 %description pydoc -l pl
168 Interaktywne korzystanie z dokumentacji modu³ów jêzyka Python.
171 Summary: Libraries and header files for building python code
172 Summary(de): Libraries und Header-Dateien zum Erstellen von Python-Code
173 Summary(es): Bibliotecas y archivos de inclusión para construir programas en python
174 Summary(fr): Bibliothèques et en-têtes pour construire du code python
175 Summary(pl): Pliki nag³ówkowe i biblioteki Pythona
176 Summary(pt_BR): Bibliotecas e arquivos de inclusão para o Python
177 Summary(tr): Python ile geliþtirme yapmak için gerekli dosyalar
178 Group: Development/Languages/Python
179 Requires: %{name}-libs = %{version}
182 The Python interpreter is relatively easy to extend with dynamically
183 loaded extensions and to embed in other programs. This packages
184 contains the header files and libraries which are needed to do both of
187 %description devel -l de
188 Der Python-Interpretierer ist relativ einfach anhand von dynamisch
189 ladbaren Erweiterungen auszubauen und läßt sich in andere Programme
190 integrieren. Dieses Paket enthält die Header-Dateien und Libraries,
191 die für beide Aufgaben erforderlich sind.
193 %description devel -l es
194 El interpretador Python permite incluir con facilidad extensiones
195 cargadas dinámicamente. Python es también fácil de ser empotrado en
196 otros programas. Este paquete contiene los archivos de inclusión y
197 bibliotecas necesarios para estas dos tareas.
199 %description devel -l fr
200 L'interpréteur Python est relativement facile à étendre avec des
201 extensions chargées dynamiquement et à insérer dans d'autres
202 programmes. Ce paquetage contient les en-têtes et les bibliothèques
203 nécessaires à ces deux tâches.
205 %description devel -l pl
206 Wszystko co potrzebne, aby napisaæ w C/C++ modu³ rozszerzaj±cy
207 mo¿liwo¶ci Pythona. S± tu równie¿ wersje ¼ród³owe modu³ów ze
208 standardowej biblioteki.
210 %description devel -l pt_BR
211 O interpretador Python permite incluir com facilidade extensões
212 carregadas dinamicamente. Python é também fácil de ser embutido em
213 outros programas. Este pacote contém os arquivos de inclusão e
214 bibliotecas necessários para estas duas tarefas.
216 %description devel -l tr
217 Bu paket, Python ile geliþtirme yapýlabilmesi için gerekli baþlýk
218 dosyalarýný ve kitaplýklarý içerir.
221 Summary: Python module sources
222 Summary(pl): Pliki ¼ród³owe modu³ów Pythona
223 Group: Development/Languages/Python
224 Requires: %{name}-modules = %{version}
226 %description devel-src
227 Python module sources.
229 %description devel-src -l pl
230 Pliki ¼ród³owe modu³ów Pythona.
233 Summary: Static python library
234 Summary(pl): Statyczna biblioteka Pythona
235 Group: Development/Languages/Python
236 Requires: %{name}-devel = %{version}
239 Static python library.
241 %description static -l pl
242 Statyczna biblioteka Pythona.
245 Summary: Documentation on Python
246 Summary(de): Dokumentation zu Python
247 Summary(es): Documentación para Python
248 Summary(fr): Documentation sur Python
249 Summary(pl): Dokumentacja do Pythona
250 Summary(pt_BR): Documentação para a linguagem de programação Python.
251 Summary(tr): Python belgeleri
252 Group: Development/Languages
253 Requires: %{name} = %{version}
254 Obsoletes: python-docs
257 This package contains documentation on the Python language and
258 interpretor as a mix of plain ASCII files and LaTeX sources.
260 %description doc -l de
261 Dieses Paket enthält Dokumentationen zu Python (Sprache und
262 Interpreter) in Form von einfachen ASCII-Dateien und LaTeX-Quellen.
264 %description doc -l es
265 Documentación para Python. Contiene archivos en texto y PostScript.
267 %description doc -l fr
268 Ce paquetage contient la documentation sur le langage python et sur
269 son interpréteur sous forme de fichiers ASCII et LaTeX.
271 %description doc -l pl
272 Oficjalna dokumentacja do Pythona. Zawiera przyk³adowe programy,
273 narzêdzia i dokumentacjê. Strony podrêcznika man znajduj± siê w
274 g³ównym pakiecie. Ten pakiet nie zawiera ¼róde³ dokumentacji
275 napisanych w LaTeX'u, tylko gotowe do wykorzystania pliki
276 postscript'owe i HTML.
278 %description doc -l pt_BR
279 O pacote python-doc contém documentação para a linguagem de
280 programação e para o interpretador Python. Fornecida em arquivos texto
283 %description doc -l tr
284 Bu paket, Python dili ile ilgili belgeleri ve düz ASCII dosyalarý ve
285 LaTeX kaynaklarýnýn bir karýþýmý olan yorumlayýcýyý içerir.
287 %package without-thread
288 Summary: Python without threads
289 Summary(pl): Pyton bez w±tków
290 Group: Development/Languages
291 Requires: %{name} = %{version}
292 Obsoletes: python-without-thread
294 %description without-thread
295 This package is rather needed for apache-mod_python module. Other ways
298 %description without-thread -l pl
299 Pyton bez w±tków jest w³a¶ciwie potrzebny tylko modu³owi
300 apache-mod_python, bo apache nie ich na razie nie wspiera.
303 Summary: Lowlevel Python -> Tk Interface
304 Summary(de): Grafischer Oberfläche für Python
305 Summary(es): Interface GUI para Phyton
306 Summary(fr): Interface graphique pour python.
307 Summary(pl): Modu³y niskiego poziomu dla pakietu Python-tkinter
308 Summary(pt_BR): Interface GUI para Phyton
309 Summary(tr): Python için grafik kullanýcý arayüzü
310 Group: Development/Languages/Python
311 Requires: %{name}-modules = %{version}
312 Requires: tcl >= 8.0.3
313 Requires: tk >= 8.0.3
314 Requires: tix >= 4.1.0.6
316 %description -n tkinter
317 This is the lowlevel C module that interfaces Tk and which is the
318 basis for the Tkinter, Python's OO interface to Tk, which is included
319 in the package python-tkinter.
321 The only reason this file is removed from python-tkinter, is to make
322 it more easy to replay _tkinter with a PIL (Python Imaging Libary)
323 aware version of it. Look at my PIL distribution.
325 %description -n tkinter -l de
326 Eine grafische Schnittstelle für Python, basierend auf Tcl/Tk, und von
327 vielen Konfigurations-Tools genutzt.
329 %description -n tkinter -l es
330 Una interface gráfica para Python, basada en Tcl/Tk, y usada por
331 muchas herramientas de configuración.
333 %description -n tkinter -l fr
334 Interface graphique pour Python, basée sur Tcl/Tk et utilisée par
335 beaucoup des outils de configuration.
337 %description -n tkinter -l pl
338 Ten pakiet zawiera modu³y w C, które po¶rednicz± w wywo³aniach
339 pomiêdzy samym Tk a modu³em Tkinter bêd±cym g³ównym interfejsem Tk dla
342 Jedynym powodem wydzielenia tego pakietu jest u³atwienie wymiany go na
343 PIL (Python Imaging Library).
345 %description -n tkinter -l pt_BR
346 Uma interface gráfica para Python, baseada em Tcl/Tk, e usada por
347 muitas ferramentas de configuração.
349 %description -n tkinter -l tr
350 Python için Tcl/Tk'ye dayalý ve pek çok ayarlama aracý tarafýndan
351 kullanýlan grafik bir arayüzdür.
354 Summary: Depreciated Python modules
355 Summary(pl): Nieaktualne modu³y jêzyka Python
356 Group: Development/Languages/Python
357 Requires: %{name}-modules = %{version}
360 Install this package when one of your program written in Python is old
361 as Miss Universum of 1918, who only you want to see... ooops, which
362 only you want to run.
364 %description old -l pl
365 Zainstaluj ten pakiet, wtedy kiedy jeden z Twoich programów napisanych
366 w jêzyku Python jest tak stary jak Miss Universum z roku 1918, któr±
367 tylko ty chcesz zobaczyæ... przepraszam, który tylko ty chcesz
371 Summary: Example programs in Python
372 Summary(pl): Przyk³adowe programy w Pythonie
373 Group: Development/Languages/Python
374 Requires: %{name}-devel = %{version}
375 Obsoletes: python-tools
377 %description examples
378 Example programs in Python.
380 %description examples -l pl
381 Przyk³adowe programy w Pythonie.
384 %setup -q -n Python-%{version}
394 tar -xf %{SOURCE1} --use=bzip2 -C html-doc
396 install %{SOURCE2} Modules/Setup
399 export POSIXLY_CORRECT=TRUE
401 echo ': ${LDSHARED='gcc -shared'}' > config.cache
402 echo ': ${LINKFORSHARED='-rdynamic'}' >> config.cache
403 echo ': ${CCSHARED='-fPIC'}' >> config.cache
407 CPPFLAGS="-I%{_includedir}/ncurses -I%{_includedir}/db3"; export CPPFLAGS
411 %{__make} OPT="%{rpmcflags} -D_REENTRANT"
414 rm -rf $RPM_BUILD_ROOT
415 install -d $RPM_BUILD_ROOT{%{_bindir},%{_libdir},%{_mandir}}
417 LD_LIBRARY_PATH=$(pwd)
418 export LD_LIBRARY_PATH
420 BINDIR=$RPM_BUILD_ROOT%{_bindir} \
421 SCRIPTDIR=$RPM_BUILD_ROOT%{_libdir} \
422 LIBDIR=$RPM_BUILD_ROOT%{_libdir} \
423 MANDIR=$RPM_BUILD_ROOT%{_mandir} \
424 INCLUDEDIR=$RPM_BUILD_ROOT%{_includedir} \
425 CONFINCLUDEDIR=$RPM_BUILD_ROOT%{_includedir}
427 install Makefile.pre.in $RPM_BUILD_ROOT%{py_libdir}/config
429 install libpython%{py_ver}.a $RPM_BUILD_ROOT%{_libdir}
431 %py_comp $RPM_BUILD_ROOT%{py_libdir}
432 %py_ocomp $RPM_BUILD_ROOT%{py_libdir}
434 rm -f $RPM_BUILD_ROOT%{_bindir}/python%{py_ver}
435 ln -sf libpython%{py_ver}.a $RPM_BUILD_ROOT%{_libdir}/libpython.a
437 install -d $RPM_BUILD_ROOT%{_examplesdir}/python
438 cp -ar Tools Demo $RPM_BUILD_ROOT%{_examplesdir}/python
440 install Tools/scripts/pydoc $RPM_BUILD_ROOT%{_bindir}
442 gzip -9nf Misc/{ACKS,NEWS,README,unicode.txt}
444 echo "%defattr(644,root,root,755)" > modules.filelist
446 find $RPM_BUILD_ROOT%{py_libdir} \
449 -printf %{py_libdir}/%f\\n \
451 | grep -v -e 'UserDict\.py[oc]$'\
452 | grep -v -e 'codecs\.py[oc]$' \
453 | grep -v -e 'locale\.py[oc]$' \
454 | grep -v -e 'posixpath\.py[oc]$' \
455 | grep -v -e 'pydoc\.py[oc]$' \
456 | grep -v -e 'site\.py[oc]$' \
457 | grep -v -e 'stat\.py[oc]$' \
458 | grep -v -e 'os\.py[oc]$' \
459 | grep -v -e 'encodings\/.*\.py[oc]$' >> modules.filelist
461 find $RPM_BUILD_ROOT%{py_dyndir} \
464 -printf "%%%%attr(755,root,root) %{py_dyndir}/%f\\n" \
466 | grep -v -e 'codecsmodule\.so$' \
467 | grep -v -e 'readline\.so$' \
468 | grep -v -e 'structmodule\.so$' \
469 | grep -v -e '_tkinter\.so$' >> modules.filelist
472 rm -rf $RPM_BUILD_ROOT
474 %post -p /sbin/ldconfig
475 %postun -p /sbin/ldconfig
478 %defattr(644,root,root,755)
479 %attr(755,root,root) %{_bindir}/python
482 # readline support for python binary
483 %attr(755,root,root) %{py_dyndir}/readline.so
485 %files modules -f modules.filelist
486 %defattr(644,root,root,755)
488 %dir %{py_libdir}/plat-*
489 %attr(755,root,root) %{py_libdir}/plat-*/regen
490 %{py_libdir}/plat-*/*.py?
492 %dir %{py_libdir}/compiler
493 %{py_libdir}/compiler/*.py?
495 %dir %{py_libdir}/curses
496 %{py_libdir}/curses/*.py?
498 %dir %{py_libdir}/distutils
499 %{py_libdir}/distutils/*.py?
501 %dir %{py_libdir}/distutils/command
502 %{py_libdir}/distutils/command/*.py?
504 %dir %{py_libdir}/email
505 %{py_libdir}/email/*.py?
507 %dir %{py_libdir}/hotshot
508 %{py_libdir}/hotshot/*.py?
510 %dir %{py_libdir}/xml
511 %{py_libdir}/xml/*.py?
513 %dir %{py_libdir}/xml/parsers
514 %{py_libdir}/xml/parsers/*.py?
516 %dir %{py_libdir}/xml/sax
517 %{py_libdir}/xml/sax/*.py?
519 %dir %{py_libdir}/xml/dom
520 %{py_libdir}/xml/dom/*.py?
523 %defattr(644,root,root,755)
524 %attr(755,root,root) %{_libdir}/libpython*so.*
530 # required shared modules by python library
531 %attr(755,root,root) %{py_dyndir}/_codecsmodule.so
532 %attr(755,root,root) %{py_dyndir}/structmodule.so
534 # required modules by python library
535 %{py_libdir}/UserDict.py?
536 %{py_libdir}/codecs.py?
537 %{py_libdir}/locale.py?
538 %{py_libdir}/posixpath.py?
539 %{py_libdir}/site.py?
540 %{py_libdir}/stat.py?
543 # required encodings by python library
544 %dir %{py_libdir}/encodings
545 %{py_libdir}/encodings/*.py?
548 %defattr(644,root,root,755)
549 %attr(755,root,root) %{_bindir}/pydoc
550 %{py_libdir}/pydoc.py?
553 %defattr(644,root,root,755)
555 %attr(755,root,root) %{_libdir}/lib*.so
559 %dir %{py_libdir}/config
560 %attr(755,root,root) %{py_libdir}/config/makesetup
561 %attr(755,root,root) %{py_libdir}/config/install-sh
562 %{py_libdir}/config/Makefile
563 %{py_libdir}/config/Makefile.pre.in
564 %{py_libdir}/config/Setup
565 %{py_libdir}/config/Setup.config
566 %{py_libdir}/config/Setup.local
567 %{py_libdir}/config/config.c
568 %{py_libdir}/config/config.c.in
569 %{py_libdir}/config/python.o
572 %defattr(644,root,root,755)
573 %attr(-,root,root) %{py_libdir}/*.py
574 %{py_libdir}/plat-*/*.py
575 %{py_libdir}/compiler/*.py
576 %{py_libdir}/curses/*.py
577 %{py_libdir}/distutils/*.py
578 %{py_libdir}/distutils/command/*.py
579 %{py_libdir}/email/*.py
580 %{py_libdir}/hotshot/*.py
581 %{py_libdir}/xml/*.py
582 %{py_libdir}/xml/parsers/*.py
583 %{py_libdir}/xml/sax/*.py
584 %{py_libdir}/xml/dom/*.py
585 %{py_libdir}/encodings/*.py
588 %defattr(644,root,root,755)
592 %defattr(644,root,root,755)
593 %{_examplesdir}/python/Tools
594 %{_examplesdir}/python/Demo
597 %defattr(644,root,root,755)
599 %dir %{py_libdir}/test
600 %attr(-,root,root) %{py_libdir}/test/*
603 %defattr(644,root,root,755)
606 %attr(755,root,root) %{py_dyndir}/_tkinter.so
609 %defattr(644,root,root,755)
611 %dir %{py_libdir}/lib-old
612 %{py_libdir}/lib-old/*.py?