3 # - test_distutils fails for unknown reason: (does it still do with new lib64 patch?)
4 # AssertionError: '/tmp/tmpaomC0l/installation/share/python' != '/tmp/tmpaomC0l/installation/lib/python'
5 # - change searchpath order so /usr/lib* is before /usr/share
6 # - kill lib-tk from searchpath
7 # - kill BR: file requirement from lib64 patch
10 %bcond_with info # build info pages (requires emacs, fails in python-2.5.0)
11 %bcond_without tkinter # disables tkinter module building
12 %bcond_without tests # disables Python testing
13 %bcond_with verbose_tests # runs tests in verbose mode
14 %bcond_with openssl097
16 # tests which will not work on 64-bit platforms
17 %define no64bit_tests test_audioop test_rgbimg test_imageop
18 # tests which may fail because of builder environment limitations (no /proc or /dev/pts)
19 %define nobuilder_tests test_resource test_openpty test_socket test_nis test_posix test_locale test_pty
20 # tests which fail because of some unknown/unresolved reason (this list should be empty)
21 %define broken_tests test_anydbm test_bsddb test_re test_shelve test_whichdb test_zipimport test_distutils
26 %define py_prefix %{_prefix}
27 %define py_libdir %{py_prefix}/%{_lib}/python%{py_ver}
28 %define py_incdir %{_includedir}/python%{py_ver}
29 %define py_sitedir %{py_libdir}/site-packages
30 %define py_dyndir %{py_libdir}/lib-dynload
32 Summary: Very high level scripting language with X interface
33 Summary(es.UTF-8): Lenguaje script de alto nivel con interfaz X
34 Summary(fr.UTF-8): Langage de script de très haut niveau avec interface X
35 Summary(pl.UTF-8): Python - język obiektowy wysokiego poziomu
36 Summary(pt_BR.UTF-8): Linguagem de programação interpretada de alto nível
37 Summary(ru.UTF-8): Язык программирования очень высокого уровня с X-интерфейсом
38 Summary(tr.UTF-8): X arayüzlü, yüksek düzeyli, kabuk yorumlayıcı dili
39 Summary(uk.UTF-8): Мова програмування дуже високого рівня з X-інтерфейсом
46 Source0: http://www.python.org/ftp/python/%{py_ver}/Python-%{version}%{beta}.tar.bz2
47 # Source0-md5: ddb7401e711354ca83b7842b733825a3
48 Source1: http://www.python.org/ftp/python/doc/%{version}%{beta}/html-%{version}%{beta}.tar.bz2
49 # Source1-md5: 3badfa2d460f52b7f9face12abdb2e91
50 Patch0: %{name}-readline.patch
51 Patch1: %{name}-%{name}path.patch
52 Patch2: %{name}-no_ndbm.patch
53 Patch3: %{name}-ac_fixes.patch
54 Patch4: %{name}-noarch_to_datadir.patch
55 Patch5: %{name}-lib64.patch
56 Patch6: %{name}-doc_path.patch
57 Patch7: %{name}-info.patch
58 Patch8: %{name}-db.patch
59 Patch9: %{name}-bug-1588287.patch
60 Patch10: %{name}-segfault-onwarn.patch
61 Patch11: %{name}-bug-1557232.patch
62 Patch12: %{name}-bug-1572832.patch
63 URL: http://www.python.org/
64 BuildRequires: autoconf
65 BuildRequires: bzip2-devel
66 BuildRequires: db-devel >= 4
67 %{?with_info:BuildRequires: emacs >= 21}
68 BuildRequires: expat-devel >= 1:1.95.7
70 BuildRequires: gdbm-devel >= 1.8.3
71 BuildRequires: gmp-devel >= 4.0
72 BuildRequires: libstdc++-devel
73 BuildRequires: ncurses-ext-devel >= 5.2
74 %if %{with openssl097}
75 BuildRequires: openssl-devel < 0.9.8
77 BuildRequires: openssl-devel >= 0.9.8
79 BuildRequires: readline-devel >= 5.0
80 BuildRequires: rpm-pythonprov
81 BuildRequires: sed >= 4.0
82 BuildRequires: sqlite3-devel >= 3.3.5
83 %{?with_info:BuildRequires: tetex-makeindex}
84 %{?with_tkinter:BuildRequires: tix-devel >= 1:8.1.4-4}
85 %{?with_tkinter:BuildRequires: tk-devel >= 8.4.3}
86 BuildRequires: zlib-devel
87 Requires: %{name}-libs = %{epoch}:%{version}-%{release}
88 Obsoletes: python-curses
89 Obsoletes: python-gdbm
90 Obsoletes: python-intl
92 Obsoletes: python-zlib
94 Obsoletes: python2-devel
95 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
97 %if %{with verbose_tests}
98 %define test_flags -v -l -x
100 %define test_flags -l -x
103 %ifarch alpha ia64 ppc64 sparc64 ppc64 %{x8664}
104 %define test_list %{nobuilder_tests} %{broken_tests} %{no64bit_tests}
106 %define test_list %{nobuilder_tests} %{broken_tests}
110 Python is an interpreted, interactive, object-oriented programming
111 language. It incorporates modules, exceptions, dynamic typing, very
112 high level dynamic data types, and classes. Python combines remarkable
113 power with very clear syntax. It has interfaces to many system calls
114 and libraries, as well as to various window systems, and is extensible
115 in C or C++. It is also usable as an extension language for
116 applications that need a programmable interface. Finally, Python is
117 portable: it runs on many brands of UNIX, on the Mac, and on PCs under
118 MS-DOS, Windows, Windows NT, and OS/2.
120 This package contains the Python binary.
122 %description -l de.UTF-8
123 Python ist eine interpretierte, interaktive, objektorientierte
124 Programmiersprache, vergleichbar zu Tcl, Perl, Scheme oder Java.
125 Python enthält Module, Klassen, Exceptions, High-Level dynamische
126 Datentypen und dynamisches Typisieren. Python unterstützt Interfaces
127 zu vielen Systemaufrufen und Libraries, sowie verschiedene
128 Fenstersysteme (X11, Motif, Tk, Mac und MFC)
130 Programmierer können neue built-in-Module für Python in C oder C++
131 schreiben. Python kann auch als Erweiterungssprache für Applikationen
132 benutzt werden, die ein programmierbares Interface brauchen. Dieses
133 Paket enthält die meisten Standard-Python-Module, und Module zum
134 Ansprechen von Tix (Tk-widget set) und RPM.
136 %description -l es.UTF-8
137 Python es un lenguaje de scripts interpretado orientado a objetos.
138 Contiene soporte para carga dinámica de objetos, clases, módulos y
141 Es sencillo adicionar interfaces para nuevos sistemas de biblioteca a
142 través de código C, tornando Python fácil de usar en ambientes
143 particulares/personalizados. Este paquete Python incluye la mayoría de
144 los módulos padrón Python, junto con módulos para crear interfaces
145 para el conjunto de componentes Tix para Tk y RPM.
147 %description -l fr.UTF-8
148 Python est un langage de script interprété et orienté objet. Il gère
149 le chargement dynamique des objets, les classes, les modules et les
150 exceptions. L'ajout d'interfaces aux nouvelles bibliothèques systèmes
151 avec du code C est simple, ce qui rend Python facile à utiliser dans
152 des configs personnalisées.
154 Ce paquetage Python contient la plupart des modules Python standards,
155 ainsi que ceux permettant l'interfaçage avec les widgets Tix pour Tk
158 %description -l pl.UTF-8
159 Python jest interpretowanym, interaktywnym i zorientowanym obiektowo
160 językiem programowania. Jest modularny, obsługuje wyjątki, dynamiczne
161 typy, zaawansowane dynamiczne struktury danych i klasy. Python łączy w
162 sobie duże możliwości i przejrzystą składnię. Posiada interfejsy do
163 wielu wywołań systemowych i bibliotek, w tym również do różnych
164 bibliotek okienkowych. Możliwości jego można jeszcze rozszerzać
165 poprzez odpowiednie moduły pisane w C lub C++. Python może być również
166 użyty jako element aplikacji, którym potrzebny jest interpreter do
167 skryptów. I wreszcie, Python jest wieloplatformowy, działa na wielu
168 odmianach UNIX-a, Macu oraz PC pod DOS-em, Windows, WindowsNT oraz
171 Ten pakiet zawiera binarkę Pythona.
173 %description -l pt_BR.UTF-8
174 Python é uma linguagem de scripts interpretada orientada a objetos.
175 Contém suporte para carga dinâmica de objetos, classes, módulos e
176 exceções. Adicionar interfaces para novos sistemas de biblioteca
177 através de código C é simples, tornando Python fácil de usar em
178 ambientes particulares/personalizados.
180 Este pacote Python inclui a maioria do módulos padrão Python, junto
181 com módulos para interfaceamento para o conjunto de componentes Tix
184 %description -l ru.UTF-8
185 Python - это интерпретируемый, объектно-ориентированный язык
186 программирования. Он поддерживает динамическую загрузку объектов,
187 классы, модули и обработку исключительных ситуаций (exceptions).
188 Простота добавления интерфейсов к новым системным библиотекам через
189 код на языке C делает Python хорошим выбором для использования в
190 специальных конфигурациях.
192 %description -l tr.UTF-8
193 Python, nesneye yönelik bir kabuk yorumlayıcıdır. Nesnelerin,
194 sınıfların, modüllerin ve aykırı durumların dinamik yüklenmelerine
195 destek verir. C koduyla birlikte kullanımı son derece kolaydır. Bu
196 paket, standart Python birimlerinin çoğunun yanısıra Tk ve RPM için
197 arayüz birimlerini de içerir.
199 %description -l uk.UTF-8
200 Python - це інтерпретована, об'єктно-орієнтована мова програмування.
201 Він підтримує динамічну загрузку об'єктів, класи, модулі та обробку
202 виключних ситуацій (exceptions). Простота додавання інтерфейсів для
203 нових системних бібліотек через код на мові C робить Python добрим
204 вибором для використання в спеціальних конфігураціях.
207 Summary: Python library
208 Summary(pl.UTF-8): Biblioteka języka Python
209 Group: Libraries/Python
210 # broken detection in rpm/pythondeps.sh
211 Provides: python(abi) = %{py_ver}
212 # for compatibility with existing Ac packages
213 Provides: python(bytecode) = %{py_ver}
214 %{!?with_info:Obsoletes: python-doc-info}
217 Python shared library and very essental modules for Python binary.
219 %description libs -l pl.UTF-8
220 Biblioteka współdzielona języka Python oraz bardzo podstawowe moduły
224 Summary: Python modules
225 Summary(pl.UTF-8): Moduły języka Python
226 Group: Libraries/Python
227 Requires: %{name}-libs = %{epoch}:%{version}-%{release}
228 Obsoletes: python-ctypes
229 Obsoletes: python-cElementTree
230 Obsoletes: python-elementtree
231 Obsoletes: python-logging
232 Obsoletes: python-old
233 Obsoletes: python-optik
234 Obsoletes: python-xmlrpc <= 1.0.1
235 Provides: python-cElementTree
236 Provides: python-elementtree
239 Python officially distributed modules.
241 %description modules -l pl.UTF-8
242 Oficjalnie rozprowadzane moduły języka Python.
244 %package modules-sqlite
245 Summary: Python SQLite modules
246 Summary(pl.UTF-8): Moduły SQLite języka Python
247 Group: Libraries/Python
248 Requires: %{name}-modules = %{epoch}:%{version}-%{release}
250 %description modules-sqlite
251 Python officially distributed sqlite module.
253 %description modules-sqlite -l pl.UTF-8
254 Oficjalnie rozprowadzany moduł sqlite języka Python.
257 Summary: Python interactive module documentation access support
258 Summary(pl.UTF-8): Interaktywne korzystanie z dokumentacji modułów języka Python
260 Requires: %{name}-modules = %{epoch}:%{version}-%{release}
261 Obsoletes: python-pydoc
263 %description -n pydoc
264 Python interactive module documentation access support.
266 %description -n pydoc -l pl.UTF-8
267 Interaktywne korzystanie z dokumentacji modułów języka Python.
270 Summary: IDE for Python language
271 Summary(pl.UTF-8): IDE dla języka Python
273 Requires: %{name}-tkinter = %{epoch}:%{version}-%{release}
274 Obsoletes: python-idle
277 IDE for Python language.
279 %description -n idle -l pl.UTF-8
280 IDE dla języka Python.
283 Summary: Libraries and header files for building python code
284 Summary(de.UTF-8): Libraries und Header-Dateien zum Erstellen von Python-Code
285 Summary(es.UTF-8): Bibliotecas y archivos de inclusión para construir programas en python
286 Summary(fr.UTF-8): Bibliothèques et en-têtes pour construire du code python
287 Summary(pl.UTF-8): Pliki nagłówkowe i biblioteki Pythona
288 Summary(pt_BR.UTF-8): Bibliotecas e arquivos de inclusão para o Python
289 Summary(ru.UTF-8): Библиотеки и хедеры для построения кода на языке Python
290 Summary(tr.UTF-8): Python ile geliştirme yapmak için gerekli dosyalar
291 Summary(uk.UTF-8): Бібліотеки та хедери для програмування на мові Python
292 Group: Development/Languages/Python
293 Requires: %{name}-libs = %{epoch}:%{version}-%{release}
296 The Python interpreter is relatively easy to extend with dynamically
297 loaded extensions and to embed in other programs. This package
298 contains the header files and libraries which are needed to do both of
301 %description devel -l de.UTF-8
302 Der Python-Interpretierer ist relativ einfach anhand von dynamisch
303 ladbaren Erweiterungen auszubauen und läßt sich in andere Programme
304 integrieren. Dieses Paket enthält die Header-Dateien und Libraries,
305 die für beide Aufgaben erforderlich sind.
307 %description devel -l es.UTF-8
308 El interpretador Python permite incluir con facilidad extensiones
309 cargadas dinámicamente. Python es también fácil de ser empotrado en
310 otros programas. Este paquete contiene los archivos de inclusión y
311 bibliotecas necesarios para estas dos tareas.
313 %description devel -l fr.UTF-8
314 L'interpréteur Python est relativement facile à étendre avec des
315 extensions chargées dynamiquement et à insérer dans d'autres
316 programmes. Ce paquetage contient les en-têtes et les bibliothèques
317 nécessaires à ces deux tâches.
319 %description devel -l pl.UTF-8
320 Interpreter Pythona jest w miarę łatwy do rozszerzania przy pomocy
321 dynamicznie ładowanych rozszerzeń napisanych w C lub C++ oraz
322 osadzania w innych programach. Ten pakiet zawiera pliki nagłówkowe i
323 wszystko inne co potrzebne do tych celów.
325 %description devel -l pt_BR.UTF-8
326 O interpretador Python permite incluir com facilidade extensões
327 carregadas dinamicamente. Python é também fácil de ser embutido em
328 outros programas. Este pacote contém os arquivos de inclusão e
329 bibliotecas necessários para estas duas tarefas.
331 %description devel -l ru.UTF-8
332 Интерпретатор Python относительно легко расширяется при помощи
333 динамически загружаемых расширений и встраивается в другие программы.
334 Этот пакет содержит хедеры и библиотеки, необходимые для обеих этих
337 %description devel -l tr.UTF-8
338 Bu paket, Python ile geliştirme yapılabilmesi için gerekli başlık
339 dosyalarını ve kitaplıkları içerir.
341 %description devel -l uk.UTF-8
342 Інтерпретатор Python відносно легко розширюється за допомогою
343 розширень з динамічною загрузкою та вбудовується в інші програми. Цей
344 пакет містить хедери та бібліотеки, необхідні для обох цих задач.
347 Summary: Python module sources
348 Summary(pl.UTF-8): Pliki źródłowe modułów Pythona
349 Group: Development/Languages/Python
350 Requires: %{name}-modules = %{epoch}:%{version}-%{release}
352 %description devel-src
353 Python module sources.
355 %description devel-src -l pl.UTF-8
356 Pliki źródłowe modułów Pythona.
359 Summary: Python development tools
360 Summary(pl.UTF-8): Narzędzia programistyczne języka Python
361 Group: Development/Languages/Python
362 Requires: %{name}-modules = %{epoch}:%{version}-%{release}
364 %description devel-tools
365 Python development tools such as profilers and debugger.
367 %description devel-tools -l pl.UTF-8
368 Narzędzia programistyczne języka Python takie jak profiler oraz
372 Summary: Static python library
373 Summary(pl.UTF-8): Statyczna biblioteka Pythona
374 Group: Development/Languages/Python
375 Requires: %{name}-devel = %{epoch}:%{version}-%{release}
378 Static python library.
380 %description static -l pl.UTF-8
381 Statyczna biblioteka Pythona.
384 Summary: Documentation on Python
385 Summary(de.UTF-8): Dokumentation zu Python
386 Summary(es.UTF-8): Documentación para Python
387 Summary(fr.UTF-8): Documentation sur Python
388 Summary(pl.UTF-8): Dokumentacja do Pythona
389 Summary(pt_BR.UTF-8): Documentação para a linguagem de programação Python
390 Summary(ru.UTF-8): Документация по языку Python
391 Summary(tr.UTF-8): Python belgeleri
392 Summary(uk.UTF-8): Документація по мові Python
394 Obsoletes: python-docs
397 This package contains documentation on the Python language and
398 interpretor as a mix of plain ASCII files and LaTeX sources.
400 %description doc -l de.UTF-8
401 Dieses Paket enthält Dokumentationen zu Python (Sprache und
402 Interpreter) in Form von einfachen ASCII-Dateien und LaTeX-Quellen.
404 %description doc -l es.UTF-8
405 Documentación para Python. Contiene archivos en texto y PostScript.
407 %description doc -l fr.UTF-8
408 Ce paquetage contient la documentation sur le langage python et sur
409 son interpréteur sous forme de fichiers ASCII et LaTeX.
411 %description doc -l pl.UTF-8
412 Oficjalna dokumentacja do Pythona. Zawiera przykładowe programy,
413 narzędzia i dokumentację. Strony podręcznika man znajdują się w
414 głównym pakiecie. Ten pakiet nie zawiera źródeł dokumentacji
415 napisanych w LaTeXu, tylko gotowe do wykorzystania pliki postscriptowe
418 %description doc -l pt_BR.UTF-8
419 O pacote python-doc contém documentação para a linguagem de
420 programação e para o interpretador Python. Fornecida em arquivos texto
423 %description doc -l ru.UTF-8
424 Этот пакет содержит документацию по собственно языку Python и по
425 исполняющему его интерпретатору в виде набора текстовых файлов и
426 исходных текстов в формате LaTeX.
428 %description doc -l tr.UTF-8
429 Bu paket, Python dili ile ilgili belgeleri ve düz ASCII dosyaları ve
430 LaTeX kaynaklarının bir karışımı olan yorumlayıcıyı içerir.
432 %description doc -l uk.UTF-8
433 Цей пакет містить документацію по власне мові Python та по виконуючому
434 її інтерпретатору у вигляді набора текстових файлів та вихідних
435 текстів у форматі LaTeX.
438 Summary: Documentation on Python in texinfo format
439 Summary(pl.UTF-8): Dokumentacja do Pythona w formacie texinfo
442 %description doc-info
443 Documentation on Python in texinfo format.
445 %description doc-info -l pl.UTF-8
446 Dokumentacja do Pythona w formacie texinfo.
449 Summary: Standard Python interface to the Tk GUI toolkit
450 Summary(de.UTF-8): Grafische Tk-Schnittstelle für Python
451 Summary(es.UTF-8): Interfaz de GUI Tk para Python
452 Summary(fr.UTF-8): Interface graphique Tk pour Python
453 Summary(pl.UTF-8): Standardowy interfejs Pythona do biblioteki Tk
454 Summary(pt_BR.UTF-8): Interface GUI Tk para Phyton
455 Summary(tr.UTF-8): Python için grafik kullanıcı arayüzü
456 Group: Libraries/Python
457 Requires: %{name}-modules = %{epoch}:%{version}-%{release}
458 Requires: tcl >= 8.4.3
459 Requires: tix >= 1:8.1.4-4
460 Requires: tk >= 8.4.3
464 Standard Python interface to the Tk GUI toolkit.
466 %description tkinter -l de.UTF-8
467 Eine grafische Schnittstelle für Python, basierend auf Tcl/Tk, und von
468 vielen Konfigurations-Tools genutzt.
470 %description tkinter -l es.UTF-8
471 Una interfaz gráfica para Python, basada en Tcl/Tk, y usada por muchas
472 herramientas de configuración.
474 %description tkinter -l fr.UTF-8
475 Interface graphique pour Python, basée sur Tcl/Tk et utilisée par
476 beaucoup des outils de configuration.
478 %description tkinter -l pl.UTF-8
479 Standardowy interfejs Pythona do biblioteki Tk.
481 %description tkinter -l pt_BR.UTF-8
482 Uma interface gráfica para Python, baseada em Tcl/Tk, e usada por
483 muitas ferramentas de configuração.
485 %description tkinter -l ru.UTF-8
486 Графический интерфейс (GUI) для Python, построенный на Tcl/Tk.
488 %description tkinter -l tr.UTF-8
489 Python için Tcl/Tk'ye dayalı ve pek çok ayarlama aracı tarafından
490 kullanılan grafik bir arayüzdür.
492 %description tkinter -l uk.UTF-8
493 Графічний інтерфейс (GUI) для Python, побудований на Tcl/Tk.
496 Summary: Example programs in Python
497 Summary(pl.UTF-8): Przykładowe programy w Pythonie
498 Group: Development/Languages/Python
499 Obsoletes: python-tools
501 %description examples
502 Example programs in Python.
504 These are for Python 2.3.4, not %{version}.
506 %description examples -l pl.UTF-8
507 Przykładowe programy w Pythonie.
509 Przykłady te są dla Pythona 2.3.4, nie %{version}.
512 %setup -q -n Python-%{version}%{beta}
527 tar -xf %{SOURCE1} --use=bzip2
530 sed -i -e 's#-ltermcap#-ltinfo#g' configure*
532 CPPFLAGS="-I/usr/include/ncurses"; export CPPFLAGS
535 --with-cxx="%{__cxx}" \
536 --enable-unicode=ucs4 \
538 LINKCC='$(PURIFY) $(CXX)' \
539 LDSHARED='$(CC) $(CFLAGS) -shared' \
540 BLDSHARED='$(CC) $(CFLAGS) -shared' \
541 LDFLAGS="%{rpmcflags} %{rpmldflags}"
543 ./Doc/tools/getversioninfo
546 OPT="%{rpmcflags}" 2>&1 | awk '
547 BEGIN { fail = 0; logmsg = ""; }
549 if ($0 ~ /\*\*\* WARNING:/) {
555 END { if (fail) { print "\nPROBLEMS FOUND:"; print logmsg; exit(1); } }'
560 binlibdir=`echo build/lib.*`
562 TESTOPTS="%{test_flags} %{test_list}" \
563 TESTPYTHON="LD_LIBRARY_PATH=`pwd` PYTHONHOME=`pwd` PYTHONPATH=`pwd`/Lib:$binlibdir ./python -tt"
567 rm -rf $RPM_BUILD_ROOT
568 install -d $RPM_BUILD_ROOT{%{_bindir},%{_libdir}} \
569 $RPM_BUILD_ROOT{%{py_sitedir},%{_mandir}/man1} \
570 $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version} \
571 $RPM_BUILD_ROOT%{_infodir} \
572 $RPM_BUILD_ROOT/etc/shrc.d
575 DESTDIR=$RPM_BUILD_ROOT
578 %{__make} -C Doc/info
579 install Doc/info/python*info* $RPM_BUILD_ROOT%{_infodir}
582 install Makefile.pre.in $RPM_BUILD_ROOT%{py_libdir}/config
584 mv $RPM_BUILD_ROOT{%{py_libdir}/config,%{_libdir}}/libpython%{py_ver}.a
585 ln -sf libpython%{py_ver}.a $RPM_BUILD_ROOT%{_libdir}/libpython.a
586 ln -sf libpython%{py_ver}.so.1.0 $RPM_BUILD_ROOT%{_libdir}/libpython.so
587 ln -sf libpython%{py_ver}.so.1.0 $RPM_BUILD_ROOT%{_libdir}/libpython%{py_ver}.so
589 rm -f $RPM_BUILD_ROOT%{_bindir}/python%{py_ver}
591 install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
592 cp -a Tools Demo $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
595 # create several useful aliases, such as timeit.py, profile.py, pdb.py, smtpd.py
598 # for python devel tools
599 for script in timeit profile pdb pstats; do
600 echo alias $script.py=\"python -m ${script}\"
601 done > $RPM_BUILD_ROOT/etc/shrc.d/python-devel.sh
603 echo alias pygettext.py='"pygettext"' \
604 >> $RPM_BUILD_ROOT/etc/shrc.d/python-devel.sh
607 < $RPM_BUILD_ROOT/etc/shrc.d/python-devel.sh \
608 > $RPM_BUILD_ROOT/etc/shrc.d/python-devel.csh
611 for script in smtpd webbrowser; do
612 echo alias $script.py=\"python -m ${script}\"
613 done > $RPM_BUILD_ROOT/etc/shrc.d/python-modules.sh
616 < $RPM_BUILD_ROOT/etc/shrc.d/python-modules.sh \
617 > $RPM_BUILD_ROOT/etc/shrc.d/python-modules.csh
619 # xgettext specific for Python code
621 # we will have two commands: pygettext.py (an alias) and pygettext;
622 # this way there are no import (which is impossible now) conflicts and
623 # pygettext.py is provided for compatibility
624 install Tools/i18n/pygettext.py $RPM_BUILD_ROOT%{_bindir}/pygettext
626 # just to cut the noise, as they are not packaged (now)
628 rm -rf $RPM_BUILD_ROOT%{py_scriptdir}/test
629 rm -rf $RPM_BUILD_ROOT%{py_scriptdir}/bsddb/test
630 rm -rf $RPM_BUILD_ROOT%{py_scriptdir}/ctypes/test
631 rm -rf $RPM_BUILD_ROOT%{py_scriptdir}/distutils/tests
632 rm -rf $RPM_BUILD_ROOT%{py_scriptdir}/email/test
633 rm -rf $RPM_BUILD_ROOT%{py_scriptdir}/sqlite3/test
636 rm -rf $RPM_BUILD_ROOT%{py_scriptdir}/plat-*/regen
637 find $RPM_BUILD_ROOT%{py_scriptdir} -name \*.egg-info -exec rm {} \;
638 find $RPM_BUILD_ROOT%{py_scriptdir} -name \*.bat -exec rm {} \;
639 find $RPM_BUILD_ROOT%{py_scriptdir} -name \*.txt -exec rm {} \;
640 find $RPM_BUILD_ROOT%{py_scriptdir} -name README\* -exec rm {} \;
643 rm -rf $RPM_BUILD_ROOT
645 %post libs -p /sbin/ldconfig
646 %postun libs -p /sbin/ldconfig
649 [ ! -x /usr/sbin/fix-info-dir ] || /usr/sbin/fix-info-dir -c %{_infodir} >/dev/null 2>&1
652 [ ! -x /usr/sbin/fix-info-dir ] || /usr/sbin/fix-info-dir -c %{_infodir} >/dev/null 2>&1
655 %defattr(644,root,root,755)
656 %attr(755,root,root) %{_bindir}/python
660 %defattr(644,root,root,755)
661 /etc/shrc.d/python-modules*
662 %exclude %{py_scriptdir}/UserDict.py[co]
663 %exclude %{py_scriptdir}/codecs.py[co]
664 %exclude %{py_scriptdir}/copy_reg.py[co]
665 %exclude %{py_scriptdir}/locale.py[co]
666 %exclude %{py_scriptdir}/posixpath.py[co]
667 %exclude %{py_scriptdir}/pdb.py[co]
668 %exclude %{py_scriptdir}/profile.py[co]
669 %exclude %{py_scriptdir}/pstats.py[co]
670 %exclude %{py_scriptdir}/pydoc.py[co]
671 %exclude %{py_scriptdir}/site.py[co]
672 %exclude %{py_scriptdir}/stat.py[co]
673 %exclude %{py_scriptdir}/timeit.py[co]
674 %exclude %{py_scriptdir}/os.py[co]
675 %exclude %{py_scriptdir}/encodings/*.py[co]
676 %exclude %{py_scriptdir}/types.py[co]
678 %{py_scriptdir}/*.py[co]
680 %{py_dyndir}/*.egg-info
683 # list .so modules to be sure that all of them are built
686 # three modules below do not work on 64-bit architectures
687 # see Python README file for explanation
688 %ifnarch alpha ia64 ppc64 sparc64 %{x8664}
689 %attr(755,root,root) %{py_dyndir}/audioop.so
690 %attr(755,root,root) %{py_dyndir}/rgbimg.so
691 %attr(755,root,root) %{py_dyndir}/imageop.so
692 # sizeof(long) != sizeof(int), so dl module will not be built on 64-bit
694 %attr(755,root,root) %{py_dyndir}/dl.so
697 %attr(755,root,root) %{py_dyndir}/array.so
698 %attr(755,root,root) %{py_dyndir}/binascii.so
699 %attr(755,root,root) %{py_dyndir}/_bisect.so
700 %attr(755,root,root) %{py_dyndir}/_bsddb.so
701 %attr(755,root,root) %{py_dyndir}/bz2.so
702 %attr(755,root,root) %{py_dyndir}/cmath.so
703 %attr(755,root,root) %{py_dyndir}/_codecs_cn.so
704 %attr(755,root,root) %{py_dyndir}/_codecs_hk.so
705 %attr(755,root,root) %{py_dyndir}/_codecs_iso2022.so
706 %attr(755,root,root) %{py_dyndir}/_codecs_jp.so
707 %attr(755,root,root) %{py_dyndir}/_codecs_kr.so
708 %attr(755,root,root) %{py_dyndir}/_codecs_tw.so
709 %attr(755,root,root) %{py_dyndir}/collections.so
710 %attr(755,root,root) %{py_dyndir}/cPickle.so
711 %attr(755,root,root) %{py_dyndir}/crypt.so
712 %attr(755,root,root) %{py_dyndir}/cStringIO.so
713 %attr(755,root,root) %{py_dyndir}/_csv.so
714 %attr(755,root,root) %{py_dyndir}/_ctypes*.so
715 %attr(755,root,root) %{py_dyndir}/_curses_panel.so
716 %attr(755,root,root) %{py_dyndir}/_curses.so
717 %attr(755,root,root) %{py_dyndir}/datetime.so
718 %attr(755,root,root) %{py_dyndir}/_elementtree.so
719 %attr(755,root,root) %{py_dyndir}/_functools.so
720 %attr(755,root,root) %{py_dyndir}/_hashlib.so
721 %attr(755,root,root) %{py_dyndir}/_heapq.so
722 %attr(755,root,root) %{py_dyndir}/_locale.so
723 %attr(755,root,root) %{py_dyndir}/_lsprof.so
724 %attr(755,root,root) %{py_dyndir}/_multibytecodec.so
725 %attr(755,root,root) %{py_dyndir}/_random.so
726 %{?with_openssl097:%attr(755,root,root) %{py_dyndir}/_sha*.so}
727 %attr(755,root,root) %{py_dyndir}/_socket.so
728 %attr(755,root,root) %{py_dyndir}/_ssl.so
729 %attr(755,root,root) %{py_dyndir}/_testcapi.so
730 %attr(755,root,root) %{py_dyndir}/_weakref.so
732 %attr(755,root,root) %{py_dyndir}/dbm.so
734 %attr(755,root,root) %{py_dyndir}/fcntl.so
735 %attr(755,root,root) %{py_dyndir}/gdbm.so
736 %attr(755,root,root) %{py_dyndir}/grp.so
737 %attr(755,root,root) %{py_dyndir}/itertools.so
738 %attr(755,root,root) %{py_dyndir}/linuxaudiodev.so
739 %attr(755,root,root) %{py_dyndir}/math.so
740 %attr(755,root,root) %{py_dyndir}/mmap.so
741 %attr(755,root,root) %{py_dyndir}/nis.so
742 %attr(755,root,root) %{py_dyndir}/operator.so
743 %attr(755,root,root) %{py_dyndir}/ossaudiodev.so
744 %attr(755,root,root) %{py_dyndir}/parser.so
745 %attr(755,root,root) %{py_dyndir}/pyexpat.so
746 %attr(755,root,root) %{py_dyndir}/readline.so
747 %attr(755,root,root) %{py_dyndir}/resource.so
748 %attr(755,root,root) %{py_dyndir}/select.so
749 %attr(755,root,root) %{py_dyndir}/strop.so
750 %attr(755,root,root) %{py_dyndir}/syslog.so
751 %attr(755,root,root) %{py_dyndir}/termios.so
752 %attr(755,root,root) %{py_dyndir}/time.so
753 %attr(755,root,root) %{py_dyndir}/spwd.so
754 %attr(755,root,root) %{py_dyndir}/unicodedata.so
755 %attr(755,root,root) %{py_dyndir}/zlib.so
757 %dir %{py_scriptdir}/plat-*
758 %{py_scriptdir}/plat-*/*.py[co]
760 %dir %{py_scriptdir}/bsddb
761 %{py_scriptdir}/bsddb/*.py[co]
763 %dir %{py_scriptdir}/compiler
764 %{py_scriptdir}/compiler/*.py[co]
766 %dir %{py_scriptdir}/ctypes
767 %dir %{py_scriptdir}/ctypes/macholib
768 %{py_scriptdir}/ctypes/*.py[co]
769 %{py_scriptdir}/ctypes/macholib/*.py[co]
771 %dir %{py_scriptdir}/curses
772 %{py_scriptdir}/curses/*.py[co]
774 %dir %{py_scriptdir}/distutils
775 %dir %{py_scriptdir}/distutils/command
776 %{py_scriptdir}/distutils/*.py[co]
777 %{py_scriptdir}/distutils/command/*.py[co]
779 %dir %{py_scriptdir}/email
780 %dir %{py_scriptdir}/email/mime
781 %{py_scriptdir}/email/*.py[co]
782 %{py_scriptdir}/email/mime/*.py[co]
784 %dir %{py_scriptdir}/logging
785 %{py_scriptdir}/logging/*.py[co]
787 %dir %{py_scriptdir}/sqlite3
788 %{py_scriptdir}/sqlite3/*.py[co]
790 %dir %{py_scriptdir}/wsgiref
791 %{py_scriptdir}/wsgiref/*.py[co]
793 %dir %{py_scriptdir}/xml
794 %dir %{py_scriptdir}/xml/dom
795 %dir %{py_scriptdir}/xml/etree
796 %dir %{py_scriptdir}/xml/parsers
797 %dir %{py_scriptdir}/xml/sax
798 %{py_scriptdir}/xml/*.py[co]
799 %{py_scriptdir}/xml/dom/*.py[co]
800 %{py_scriptdir}/xml/etree/*.py[co]
801 %{py_scriptdir}/xml/parsers/*.py[co]
802 %{py_scriptdir}/xml/sax/*.py[co]
804 %files modules-sqlite
805 %defattr(644,root,root,755)
806 %attr(755,root,root) %{py_dyndir}/_sqlite3.so
809 %defattr(644,root,root,755)
810 %attr(755,root,root) %{_libdir}/libpython*.so.*
815 %dir %{py_sitescriptdir}
818 # shared modules required by python library
819 %attr(755,root,root) %{py_dyndir}/_struct.so
821 # modules required by python library
822 %{py_scriptdir}/UserDict.py[co]
823 %{py_scriptdir}/codecs.py[co]
824 %{py_scriptdir}/copy_reg.py[co]
825 %{py_scriptdir}/locale.py[co]
826 %{py_scriptdir}/posixpath.py[co]
827 %{py_scriptdir}/site.py[co]
828 %{py_scriptdir}/stat.py[co]
829 %{py_scriptdir}/os.py[co]
830 # needed by the dynamic sys.lib patch
831 %{py_scriptdir}/types.py[co]
833 # encodings required by python library
834 %dir %{py_scriptdir}/encodings
835 %{py_scriptdir}/encodings/*.py[co]
838 %defattr(644,root,root,755)
839 %attr(755,root,root) %{_bindir}/pydoc
840 %{py_scriptdir}/pydoc.py[co]
843 %defattr(644,root,root,755)
844 %attr(755,root,root) %{_bindir}/idle
845 %dir %{py_scriptdir}/idlelib
846 %dir %{py_scriptdir}/idlelib/Icons
847 %{py_scriptdir}/idlelib/*.py[co]
848 %{py_scriptdir}/idlelib/Icons/*
849 %{py_scriptdir}/idlelib/*.def
852 %defattr(644,root,root,755)
853 %doc Misc/{ACKS,NEWS,README,README.valgrind,valgrind-python.supp}
854 %attr(755,root,root) %{_bindir}/python%{py_ver}-config
855 %attr(755,root,root) %{_libdir}/lib*.so
859 %dir %{py_libdir}/config
860 %attr(755,root,root) %{py_libdir}/config/makesetup
861 %attr(755,root,root) %{py_libdir}/config/install-sh
862 %{py_libdir}/config/Makefile
863 %{py_libdir}/config/Makefile.pre.in
864 %{py_libdir}/config/Setup
865 %{py_libdir}/config/Setup.config
866 %{py_libdir}/config/Setup.local
867 %{py_libdir}/config/config.c
868 %{py_libdir}/config/config.c.in
869 %{py_libdir}/config/python.o
872 %defattr(644,root,root,755)
873 %attr(-,root,root) %{py_scriptdir}/*.py
874 %{py_scriptdir}/plat-*/*.py
875 %{py_scriptdir}/bsddb/*.py
876 %{py_scriptdir}/ctypes/*.py
877 %{py_scriptdir}/ctypes/macholib/*.py
878 %{py_scriptdir}/compiler/*.py
879 %{py_scriptdir}/curses/*.py
880 %{py_scriptdir}/distutils/*.py
881 %{py_scriptdir}/distutils/command/*.py
882 %{py_scriptdir}/email/*.py
883 %{py_scriptdir}/email/mime/*.py
884 %{py_scriptdir}/hotshot/*.py
885 %{py_scriptdir}/logging/*.py
886 %{py_scriptdir}/sqlite3/*.py
887 %{py_scriptdir}/wsgiref/*.py
888 %{py_scriptdir}/xml/*.py
889 %{py_scriptdir}/xml/dom/*.py
890 %{py_scriptdir}/xml/etree/*.py
891 %{py_scriptdir}/xml/parsers/*.py
892 %{py_scriptdir}/xml/sax/*.py
893 %{py_scriptdir}/encodings/*.py
894 %{py_scriptdir}/idlelib/*.py
897 %defattr(644,root,root,755)
899 /etc/shrc.d/python-devel*
901 %attr(755,root,root) %{_bindir}/pygettext
903 %attr(755,root,root) %{py_dyndir}/_hotshot.so
904 %dir %{py_scriptdir}/hotshot
905 %{py_scriptdir}/hotshot/*.py[co]
906 %{py_scriptdir}/pdb.py[co]
907 %{py_scriptdir}/profile.py[co]
908 %{py_scriptdir}/pstats.py[co]
909 %{py_scriptdir}/timeit.py[co]
912 %defattr(644,root,root,755)
916 %defattr(644,root,root,755)
917 %{_examplesdir}/%{name}-%{version}
921 %defattr(644,root,root,755)
922 %doc Python-Docs-%{version}%{beta}/*
926 %defattr(644,root,root,755)
932 %defattr(644,root,root,755)
933 %{py_scriptdir}/lib-tk
934 %attr(755,root,root) %{py_dyndir}/_tkinter.so