3 # - test_pydoc fails because of PYTHONPATH override
4 # - change searchpath order so /usr/lib* is before /usr/share
5 # - kill lib-tk from searchpath
6 # - kill BR: file requirement from lib64 patch
7 # - security(CVE-2008-4108)
8 # http://securitytracker.com/alerts/2008/Sep/1020904.html
11 %bcond_with info # build info pages (requires emacs, fails in python-2.5.0)
12 %bcond_without tkinter # disables tkinter module building
13 %bcond_without tests # disables Python testing
14 %bcond_with verbose_tests # runs tests in verbose mode
15 %bcond_with openssl097 # build for openssl < 0.9.8
17 # tests which will not work on 64-bit platforms
18 %define no64bit_tests test_audioop test_rgbimg test_imageop
19 # tests which may fail because of builder environment limitations (no /proc or /dev/pts)
20 %define nobuilder_tests test_resource test_openpty test_socket test_nis test_posix test_locale test_pty test_urllib2
21 # tests which fail because of some unknown/unresolved reason (this list should be ideally just %{nil})
22 %define broken_tests test_doctest test_pydoc test_distutils test_gdb
27 %define py_prefix %{_prefix}
28 %define py_libdir %{py_prefix}/%{_lib}/python%{py_ver}
29 %define py_incdir %{_includedir}/python%{py_ver}
30 %define py_sitedir %{py_libdir}/site-packages
31 %define py_sitescriptdir %{_datadir}/python%{py_ver}/site-packages
32 %define py_dyndir %{py_libdir}/lib-dynload
34 %define dver %{version}
35 Summary: Very high level scripting language with X interface
36 Summary(es.UTF-8): Lenguaje script de alto nivel con interfaz X
37 Summary(fr.UTF-8): Langage de script de très haut niveau avec interface X
38 Summary(pl.UTF-8): Python - język obiektowy wysokiego poziomu
39 Summary(pt_BR.UTF-8): Linguagem de programação interpretada de alto nível
40 Summary(ru.UTF-8): Язык программирования очень высокого уровня с X-интерфейсом
41 Summary(tr.UTF-8): X arayüzlü, yüksek düzeyli, kabuk yorumlayıcı dili
42 Summary(uk.UTF-8): Мова програмування дуже високого рівня з X-інтерфейсом
48 Group: Development/Languages/Python
49 Source0: https://www.python.org/ftp/python/%{version}/Python-%{version}%{beta}.tar.xz
50 # Source0-md5: a80ae3cc478460b922242f43a1b4094d
51 Source1: https://www.python.org/ftp/python/doc/%{dver}/%{name}-%{dver}-docs-html.tar.bz2
52 # Source1-md5: e82bf965f5c6da914fb060640310e080
53 Source2: pyconfig.h.in
54 Patch0: %{name}-db.patch
55 Patch1: %{name}-pythonpath.patch
56 Patch2: %{name}-ac_fixes.patch
57 Patch3: %{name}-multilib.patch
58 Patch4: %{name}-verbose.patch
59 Patch5: %{name}-distro.patch
60 Patch6: %{name}-DNStests.patch
61 Patch7: %{name}-install_prefix.patch
62 Patch8: %{name}-bdist_rpm.patch
63 # https://bugs.python.org/issue10496
64 Patch9: https://bugs.python.org/file21896/nonexistent_user.patch
65 # Patch9-md5: db706fbe6de467c6e4c97c675eddf29a
66 URL: https://www.python.org/
67 BuildRequires: autoconf >= 2.65
68 BuildRequires: automake
69 BuildRequires: bluez-libs-devel
70 BuildRequires: bzip2-devel
71 BuildRequires: db-devel >= 4
72 %{?with_info:BuildRequires: emacs >= 21}
73 BuildRequires: expat-devel >= 1:1.95.7
75 BuildRequires: gdbm-devel >= 1.8.3
76 BuildRequires: gmp-devel >= 4.0
77 BuildRequires: libstdc++-devel
78 BuildRequires: ncurses-ext-devel >= 5.2
79 BuildRequires: pkgconfig
80 %if %{with openssl097}
81 BuildRequires: openssl-devel < 0.9.8
83 BuildRequires: openssl-devel >= 0.9.8
85 BuildRequires: readline-devel >= 5.0
86 BuildRequires: rpm-pythonprov
87 BuildRequires: sed >= 4.0
88 BuildRequires: sqlite3-devel >= 3.3.5
89 %{?with_info:BuildRequires: tetex-makeindex}
90 #%{?with_tkinter:BuildRequires: tix-devel >= 1:8.1.4-4}
91 %{?with_tkinter:BuildRequires: tk-devel >= 8.4.3}
92 BuildRequires: zlib-devel
93 Requires: %{name}-libs = %{epoch}:%{version}-%{release}
97 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
99 %if %{with verbose_tests}
100 %define test_flags -v -l -x
102 %define test_flags -w -l -x
105 %ifarch alpha ia64 ppc64 ppc64 %{x8664}
106 %define test_list %{nobuilder_tests} %{broken_tests} %{no64bit_tests}
108 %define test_list %{nobuilder_tests} %{broken_tests}
111 %ifarch sparc sparcv9
112 %define test_list %{nobuilder_tests} %{broken_tests} test_fcntl test_ioctl
116 %define test_list %{nobuilder_tests} %{broken_tests} %{no64bit_tests} test_fcntl test_ioctl
120 Python is an interpreted, interactive, object-oriented programming
121 language. It incorporates modules, exceptions, dynamic typing, very
122 high level dynamic data types, and classes. Python combines remarkable
123 power with very clear syntax. It has interfaces to many system calls
124 and libraries, as well as to various window systems, and is extensible
125 in C or C++. It is also usable as an extension language for
126 applications that need a programmable interface. Finally, Python is
127 portable: it runs on many brands of UNIX, on the Mac, and on PCs under
128 MS-DOS, Windows, Windows NT, and OS/2.
130 This package contains the Python binary.
132 %description -l de.UTF-8
133 Python ist eine interpretierte, interaktive, objektorientierte
134 Programmiersprache, vergleichbar zu Tcl, Perl, Scheme oder Java.
135 Python enthält Module, Klassen, Exceptions, High-Level dynamische
136 Datentypen und dynamisches Typisieren. Python unterstützt Interfaces
137 zu vielen Systemaufrufen und Libraries, sowie verschiedene
138 Fenstersysteme (X11, Motif, Tk, Mac und MFC)
140 Programmierer können neue built-in-Module für Python in C oder C++
141 schreiben. Python kann auch als Erweiterungssprache für Applikationen
142 benutzt werden, die ein programmierbares Interface brauchen. Dieses
143 Paket enthält die meisten Standard-Python-Module, und Module zum
144 Ansprechen von Tix (Tk-widget set) und RPM.
146 %description -l es.UTF-8
147 Python es un lenguaje de scripts interpretado orientado a objetos.
148 Contiene soporte para carga dinámica de objetos, clases, módulos y
151 Es sencillo adicionar interfaces para nuevos sistemas de biblioteca a
152 través de código C, tornando Python fácil de usar en ambientes
153 particulares/personalizados. Este paquete Python incluye la mayoría de
154 los módulos padrón Python, junto con módulos para crear interfaces
155 para el conjunto de componentes Tix para Tk y RPM.
157 %description -l fr.UTF-8
158 Python est un langage de script interprété et orienté objet. Il gère
159 le chargement dynamique des objets, les classes, les modules et les
160 exceptions. L'ajout d'interfaces aux nouvelles bibliothèques systèmes
161 avec du code C est simple, ce qui rend Python facile à utiliser dans
162 des configs personnalisées.
164 Ce paquetage Python contient la plupart des modules Python standards,
165 ainsi que ceux permettant l'interfaçage avec les widgets Tix pour Tk
168 %description -l pl.UTF-8
169 Python jest interpretowanym, interaktywnym i zorientowanym obiektowo
170 językiem programowania. Jest modularny, obsługuje wyjątki, dynamiczne
171 typy, zaawansowane dynamiczne struktury danych i klasy. Python łączy w
172 sobie duże możliwości i przejrzystą składnię. Posiada interfejsy do
173 wielu wywołań systemowych i bibliotek, w tym również do różnych
174 bibliotek okienkowych. Możliwości jego można jeszcze rozszerzać
175 poprzez odpowiednie moduły pisane w C lub C++. Python może być również
176 użyty jako element aplikacji, którym potrzebny jest interpreter do
177 skryptów. I wreszcie, Python jest wieloplatformowy, działa na wielu
178 odmianach UNIX-a, Macu oraz PC pod DOS-em, Windows, WindowsNT oraz
181 Ten pakiet zawiera binarkę Pythona.
183 %description -l pt_BR.UTF-8
184 Python é uma linguagem de scripts interpretada orientada a objetos.
185 Contém suporte para carga dinâmica de objetos, classes, módulos e
186 exceções. Adicionar interfaces para novos sistemas de biblioteca
187 através de código C é simples, tornando Python fácil de usar em
188 ambientes particulares/personalizados.
190 Este pacote Python inclui a maioria do módulos padrão Python, junto
191 com módulos para interfaceamento para o conjunto de componentes Tix
194 %description -l ru.UTF-8
195 Python - это интерпретируемый, объектно-ориентированный язык
196 программирования. Он поддерживает динамическую загрузку объектов,
197 классы, модули и обработку исключительных ситуаций (exceptions).
198 Простота добавления интерфейсов к новым системным библиотекам через
199 код на языке C делает Python хорошим выбором для использования в
200 специальных конфигурациях.
202 %description -l tr.UTF-8
203 Python, nesneye yönelik bir kabuk yorumlayıcıdır. Nesnelerin,
204 sınıfların, modüllerin ve aykırı durumların dinamik yüklenmelerine
205 destek verir. C koduyla birlikte kullanımı son derece kolaydır. Bu
206 paket, standart Python birimlerinin çoğunun yanısıra Tk ve RPM için
207 arayüz birimlerini de içerir.
209 %description -l uk.UTF-8
210 Python - це інтерпретована, об'єктно-орієнтована мова програмування.
211 Він підтримує динамічну загрузку об'єктів, класи, модулі та обробку
212 виключних ситуацій (exceptions). Простота додавання інтерфейсів для
213 нових системних бібліотек через код на мові C робить Python добрим
214 вибором для використання в спеціальних конфігураціях.
217 Summary: Python library
218 Summary(pl.UTF-8): Biblioteka języka Python
219 Group: Libraries/Python
220 # broken detection in rpm/pythondeps.sh
221 Provides: python(abi) = %{py_ver}
222 # for compatibility with existing Ac packages
223 Provides: python(bytecode) = %{py_ver}
224 %{!?with_info:Obsoletes: python-doc-info}
225 Obsoletes: python-intl
228 Python shared library and very essental modules for Python binary.
230 %description libs -l pl.UTF-8
231 Biblioteka współdzielona języka Python oraz bardzo podstawowe moduły
235 Summary: Python modules
236 Summary(pl.UTF-8): Moduły języka Python
237 Group: Libraries/Python
238 Requires: %{name}-libs = %{epoch}:%{version}-%{release}
239 Provides: python-argparse = 1.1
240 Provides: python-cElementTree
241 Provides: python-elementtree
242 Provides: pythonegg(argparse) = 1.1
243 Obsoletes: python-argparse < 1.1.99
244 Obsoletes: python-cElementTree
245 Obsoletes: python-ctypes
246 Obsoletes: python-curses
247 Obsoletes: python-elementtree
248 Obsoletes: python-gdbm
249 Obsoletes: python-hashlib
250 Obsoletes: python-logging
251 Obsoletes: python-old
252 Obsoletes: python-optik
253 Obsoletes: python-ssl
254 Obsoletes: python-xml
255 Obsoletes: python-xmlrpc <= 1.0.1
256 Obsoletes: python-zlib
257 %requires_ge_to openssl openssl-devel
260 Python officially distributed modules.
262 %description modules -l pl.UTF-8
263 Oficjalnie rozprowadzane moduły języka Python.
265 %package modules-sqlite
266 Summary: Python SQLite modules
267 Summary(pl.UTF-8): Moduły SQLite języka Python
268 Group: Libraries/Python
269 Requires: %{name}-modules = %{epoch}:%{version}-%{release}
270 Provides: python(sqlite)
272 %description modules-sqlite
273 Python officially distributed sqlite module.
275 %description modules-sqlite -l pl.UTF-8
276 Oficjalnie rozprowadzany moduł sqlite języka Python.
279 Summary: Python interactive module documentation access support
280 Summary(pl.UTF-8): Interaktywne korzystanie z dokumentacji modułów języka Python
282 Requires: %{name}-modules = %{epoch}:%{version}-%{release}
283 Obsoletes: python-pydoc
285 %description -n pydoc
286 Python interactive module documentation access support.
288 %description -n pydoc -l pl.UTF-8
289 Interaktywne korzystanie z dokumentacji modułów języka Python.
292 Summary: IDE for Python language
293 Summary(pl.UTF-8): IDE dla języka Python
294 Group: Applications/Editors
295 Requires: %{name}-tkinter = %{epoch}:%{version}-%{release}
296 Obsoletes: python-idle
299 IDE for Python language.
301 %description -n idle -l pl.UTF-8
302 IDE dla języka Python.
305 Summary: Libraries and header files for building python code
306 Summary(de.UTF-8): Libraries und Header-Dateien zum Erstellen von Python-Code
307 Summary(es.UTF-8): Bibliotecas y archivos de inclusión para construir programas en python
308 Summary(fr.UTF-8): Bibliothèques et en-têtes pour construire du code python
309 Summary(pl.UTF-8): Pliki nagłówkowe i biblioteki Pythona
310 Summary(pt_BR.UTF-8): Bibliotecas e arquivos de inclusão para o Python
311 Summary(ru.UTF-8): Библиотеки и хедеры для построения кода на языке Python
312 Summary(tr.UTF-8): Python ile geliştirme yapmak için gerekli dosyalar
313 Summary(uk.UTF-8): Бібліотеки та хедери для програмування на мові Python
314 Group: Development/Languages/Python
315 Requires: %{name}-libs = %{epoch}:%{version}-%{release}
316 Requires: %{name}-modules = %{epoch}:%{version}-%{release}
317 Obsoletes: python2-devel
320 The Python interpreter is relatively easy to extend with dynamically
321 loaded extensions and to embed in other programs. This package
322 contains the header files and libraries which are needed to do both of
325 %description devel -l de.UTF-8
326 Der Python-Interpretierer ist relativ einfach anhand von dynamisch
327 ladbaren Erweiterungen auszubauen und läßt sich in andere Programme
328 integrieren. Dieses Paket enthält die Header-Dateien und Libraries,
329 die für beide Aufgaben erforderlich sind.
331 %description devel -l es.UTF-8
332 El interpretador Python permite incluir con facilidad extensiones
333 cargadas dinámicamente. Python es también fácil de ser empotrado en
334 otros programas. Este paquete contiene los archivos de inclusión y
335 bibliotecas necesarios para estas dos tareas.
337 %description devel -l fr.UTF-8
338 L'interpréteur Python est relativement facile à étendre avec des
339 extensions chargées dynamiquement et à insérer dans d'autres
340 programmes. Ce paquetage contient les en-têtes et les bibliothèques
341 nécessaires à ces deux tâches.
343 %description devel -l pl.UTF-8
344 Interpreter Pythona jest w miarę łatwy do rozszerzania przy pomocy
345 dynamicznie ładowanych rozszerzeń napisanych w C lub C++ oraz
346 osadzania w innych programach. Ten pakiet zawiera pliki nagłówkowe i
347 wszystko inne co potrzebne do tych celów.
349 %description devel -l pt_BR.UTF-8
350 O interpretador Python permite incluir com facilidade extensões
351 carregadas dinamicamente. Python é também fácil de ser embutido em
352 outros programas. Este pacote contém os arquivos de inclusão e
353 bibliotecas necessários para estas duas tarefas.
355 %description devel -l ru.UTF-8
356 Интерпретатор Python относительно легко расширяется при помощи
357 динамически загружаемых расширений и встраивается в другие программы.
358 Этот пакет содержит хедеры и библиотеки, необходимые для обеих этих
361 %description devel -l tr.UTF-8
362 Bu paket, Python ile geliştirme yapılabilmesi için gerekli başlık
363 dosyalarını ve kitaplıkları içerir.
365 %description devel -l uk.UTF-8
366 Інтерпретатор Python відносно легко розширюється за допомогою
367 розширень з динамічною загрузкою та вбудовується в інші програми. Цей
368 пакет містить хедери та бібліотеки, необхідні для обох цих задач.
371 Summary: Python module sources
372 Summary(pl.UTF-8): Pliki źródłowe modułów Pythona
373 Group: Development/Languages/Python
374 Requires: %{name}-modules = %{epoch}:%{version}-%{release}
376 %description devel-src
377 Python module sources.
379 %description devel-src -l pl.UTF-8
380 Pliki źródłowe modułów Pythona.
383 Summary: Python development tools
384 Summary(pl.UTF-8): Narzędzia programistyczne języka Python
385 Group: Development/Languages/Python
386 Requires: %{name}-modules = %{epoch}:%{version}-%{release}
388 %description devel-tools
389 Python development tools such as profilers and debugger.
391 %description devel-tools -l pl.UTF-8
392 Narzędzia programistyczne języka Python takie jak profiler oraz
396 Summary: Automated Python 2 to 3 code translation
397 Summary(pl.UTF-8): Automatyczne tłumaczenie kodu Pythona 2 na 3
398 Group: Development/Languages/Python
401 2to3 is a Python program that reads Python 2.x source code and applies
402 a series of fixers to transform it into valid Python 3.x code. The
403 standard library contains a rich set of fixers that will handle almost
404 all code. 2to3 supporting library lib2to3 is, however, a flexible and
405 generic library, so it is possible to write your own fixers for 2to3.
406 lib2to3 could also be adapted to custom applications in which Python
407 code needs to be edited automatically.
409 %description 2to3 -l pl.UTF-8
410 2to3 to program w Pythonie czytający od źródłowy w Pythonie 2.x i
411 aplikujący serię poprawek przekształcających go w poprawny kod w
412 Pythonie 3.x. Biblioteka standardowa zawiera duży zbiór poprawek
413 obsługujących większość kodu. Biblioteka wspierająca 2to3 (lib2to3)
414 jest jednak elastyczną i ogólną biblioteką, więc można pisać własne
415 poprawki dla 2to3. lib2to3 można także zaadaptować na potrzeby
416 własnych zastosowań, w których kod w Pythonie musi być modyfikowany
420 Summary: Static python library
421 Summary(pl.UTF-8): Statyczna biblioteka Pythona
422 Group: Development/Languages/Python
423 Requires: %{name}-devel = %{epoch}:%{version}-%{release}
426 Static python library.
428 %description static -l pl.UTF-8
429 Statyczna biblioteka Pythona.
432 Summary: Documentation on Python
433 Summary(de.UTF-8): Dokumentation zu Python
434 Summary(es.UTF-8): Documentación para Python
435 Summary(fr.UTF-8): Documentation sur Python
436 Summary(pl.UTF-8): Dokumentacja do Pythona
437 Summary(pt_BR.UTF-8): Documentação para a linguagem de programação Python
438 Summary(ru.UTF-8): Документация по языку Python
439 Summary(tr.UTF-8): Python belgeleri
440 Summary(uk.UTF-8): Документація по мові Python
442 Obsoletes: python-docs
445 This package contains documentation on the Python language and
446 interpretor as a mix of plain ASCII files and LaTeX sources.
448 %description doc -l de.UTF-8
449 Dieses Paket enthält Dokumentationen zu Python (Sprache und
450 Interpreter) in Form von einfachen ASCII-Dateien und LaTeX-Quellen.
452 %description doc -l es.UTF-8
453 Documentación para Python. Contiene archivos en texto y PostScript.
455 %description doc -l fr.UTF-8
456 Ce paquetage contient la documentation sur le langage python et sur
457 son interpréteur sous forme de fichiers ASCII et LaTeX.
459 %description doc -l pl.UTF-8
460 Oficjalna dokumentacja do Pythona. Zawiera przykładowe programy,
461 narzędzia i dokumentację. Strony podręcznika man znajdują się w
462 głównym pakiecie. Ten pakiet nie zawiera źródeł dokumentacji
463 napisanych w LaTeXu, tylko gotowe do wykorzystania pliki postscriptowe
466 %description doc -l pt_BR.UTF-8
467 O pacote python-doc contém documentação para a linguagem de
468 programação e para o interpretador Python. Fornecida em arquivos texto
471 %description doc -l ru.UTF-8
472 Этот пакет содержит документацию по собственно языку Python и по
473 исполняющему его интерпретатору в виде набора текстовых файлов и
474 исходных текстов в формате LaTeX.
476 %description doc -l tr.UTF-8
477 Bu paket, Python dili ile ilgili belgeleri ve düz ASCII dosyaları ve
478 LaTeX kaynaklarının bir karışımı olan yorumlayıcıyı içerir.
480 %description doc -l uk.UTF-8
481 Цей пакет містить документацію по власне мові Python та по виконуючому
482 її інтерпретатору у вигляді набора текстових файлів та вихідних
483 текстів у форматі LaTeX.
486 Summary: Documentation on Python in texinfo format
487 Summary(pl.UTF-8): Dokumentacja do Pythona w formacie texinfo
490 %description doc-info
491 Documentation on Python in texinfo format.
493 %description doc-info -l pl.UTF-8
494 Dokumentacja do Pythona w formacie texinfo.
497 Summary: Standard Python interface to the Tk GUI toolkit
498 Summary(de.UTF-8): Grafische Tk-Schnittstelle für Python
499 Summary(es.UTF-8): Interfaz de GUI Tk para Python
500 Summary(fr.UTF-8): Interface graphique Tk pour Python
501 Summary(pl.UTF-8): Standardowy interfejs Pythona do biblioteki Tk
502 Summary(pt_BR.UTF-8): Interface GUI Tk para Phyton
503 Summary(tr.UTF-8): Python için grafik kullanıcı arayüzü
504 Group: Libraries/Python
505 Requires: %{name}-modules = %{epoch}:%{version}-%{release}
506 Requires: tcl >= 8.4.3
507 Requires: tix >= 1:8.1.4-4
508 Requires: tk >= 8.4.3
512 Standard Python interface to the Tk GUI toolkit.
514 %description tkinter -l de.UTF-8
515 Eine grafische Schnittstelle für Python, basierend auf Tcl/Tk, und von
516 vielen Konfigurations-Tools genutzt.
518 %description tkinter -l es.UTF-8
519 Una interfaz gráfica para Python, basada en Tcl/Tk, y usada por muchas
520 herramientas de configuración.
522 %description tkinter -l fr.UTF-8
523 Interface graphique pour Python, basée sur Tcl/Tk et utilisée par
524 beaucoup des outils de configuration.
526 %description tkinter -l pl.UTF-8
527 Standardowy interfejs Pythona do biblioteki Tk.
529 %description tkinter -l pt_BR.UTF-8
530 Uma interface gráfica para Python, baseada em Tcl/Tk, e usada por
531 muitas ferramentas de configuração.
533 %description tkinter -l ru.UTF-8
534 Графический интерфейс (GUI) для Python, построенный на Tcl/Tk.
536 %description tkinter -l tr.UTF-8
537 Python için Tcl/Tk'ye dayalı ve pek çok ayarlama aracı tarafından
538 kullanılan grafik bir arayüzdür.
540 %description tkinter -l uk.UTF-8
541 Графічний інтерфейс (GUI) для Python, побудований на Tcl/Tk.
544 Summary: Example programs in Python
545 Summary(pl.UTF-8): Przykładowe programy w Pythonie
546 Group: Development/Languages/Python
547 Obsoletes: python-tools
549 %description examples
550 Example programs in Python.
552 These are for Python 2.3.4, not %{version}.
554 %description examples -l pl.UTF-8
555 Przykładowe programy w Pythonie.
557 Przykłady te są dla Pythona 2.3.4, nie %{version}.
560 Summary: Python test modules
561 Summary(pl.UTF-8): Moduły testowe Pythona
562 Group: Development/Languages/Python
563 Requires: %{name}-modules = %{epoch}:%{version}-%{release}
564 Suggests: %{name}-devel-src = %{epoch}:%{version}-%{release}
569 Unit tests for Python, some may be reused for testing other Python
572 %description test -l pl.UTF-8
573 Moduły testowe Pythona.
575 Niektóre z nich mogą być używane do testowania oprogramowania
576 napisanego w Pythonie.
579 %setup -q -n Python-%{version}%{beta}
593 sed -i -e 's#db_setup_debug = False#db_setup_debug = True#g' setup.py
595 # remove if Lib/plat-linux3 exists
596 [ -d Lib/plat-linux3 ] && exit 1
597 cp -a Lib/plat-linux2 Lib/plat-linux3
605 CPPFLAGS="%{rpmcppflags}" \
606 LDFLAGS="%{rpmldflags}" \
607 ac_cv_posix_semaphores_enabled=yes \
608 ac_cv_broken_sem_getvalue=no \
609 %{?with_debug:--with-pydebug} \
613 --enable-unicode=ucs4 \
615 --with-dbmliborder=gdbm:bdb \
618 %{__make} 2>&1 | awk '
619 BEGIN { fail = 0; logmsg = ""; }
621 if ($0 ~ /\*\*\* WARNING:/) {
627 END { if (fail) { print "\nPROBLEMS FOUND:"; print logmsg; exit(1); } }'
631 WITHIN_PYTHON_RPM_BUILD=1 %{__make} -j1 test \
632 TESTOPTS="%{test_flags} %{test_list}" \
633 TESTPYTHON="LD_LIBRARY_PATH=`pwd` PYTHONHOME=`pwd` PYTHONPATH=`pwd`/Lib:`pwd`/Lib/lib-tk:`pwd`/build/lib.linux-`uname -m`-%{py_ver} ./python -tt"
637 rm -rf $RPM_BUILD_ROOT
638 install -d $RPM_BUILD_ROOT{%{_bindir},%{_libdir}} \
639 $RPM_BUILD_ROOT{%{py_sitedir},%{_mandir}/man1} \
640 $RPM_BUILD_ROOT%{_prefix}/local/%{_lib}/python%{py_ver}/site-packages \
641 $RPM_BUILD_ROOT%{py_sitescriptdir} \
642 $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version} \
643 $RPM_BUILD_ROOT%{_infodir} \
644 $RPM_BUILD_ROOT%{_docdir} \
645 $RPM_BUILD_ROOT/etc/shrc.d
648 DESTDIR=$RPM_BUILD_ROOT
650 # docs in constant location
651 ln -sf python-doc-%{version} $RPM_BUILD_ROOT%{_docdir}/python-doc
654 %{__make} -C Doc/info
655 cp -p Doc/info/python*info* $RPM_BUILD_ROOT%{_infodir}
658 cp -p Makefile.pre.in $RPM_BUILD_ROOT%{py_libdir}/config
660 mv $RPM_BUILD_ROOT{%{py_libdir}/config,%{_libdir}}/libpython%{py_ver}.a
661 ln -sf libpython%{py_ver}.a $RPM_BUILD_ROOT%{_libdir}/libpython.a
662 ln -sf libpython%{py_ver}.so.1.0 $RPM_BUILD_ROOT%{_libdir}/libpython.so
663 ln -sf libpython%{py_ver}.so.1.0 $RPM_BUILD_ROOT%{_libdir}/libpython%{py_ver}.so
665 install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
666 cp -a Tools Demo $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
669 # create several useful aliases, such as timeit.py, profile.py, pdb.py, smtpd.py
672 # for python devel tools
673 for script in timeit profile pdb pstats; do
674 echo alias $script.py=\"python -m ${script}\"
675 done > $RPM_BUILD_ROOT/etc/shrc.d/python-devel.sh
678 < $RPM_BUILD_ROOT/etc/shrc.d/python-devel.sh \
679 > $RPM_BUILD_ROOT/etc/shrc.d/python-devel.csh
682 for script in smtpd webbrowser; do
683 echo alias $script.py=\"python -m ${script}\"
684 done > $RPM_BUILD_ROOT/etc/shrc.d/python-modules.sh
685 %{__rm} $RPM_BUILD_ROOT%{_bindir}/smtpd.py
688 < $RPM_BUILD_ROOT/etc/shrc.d/python-modules.sh \
689 > $RPM_BUILD_ROOT/etc/shrc.d/python-modules.csh
691 # just to cut the noise, as they are not packaged (now)
692 %{__rm} $RPM_BUILD_ROOT%{py_libdir}/ctypes/macholib/fetch_macholib
693 %{__rm} $RPM_BUILD_ROOT%{py_libdir}/distutils/command/command_template
694 %{__rm} $RPM_BUILD_ROOT%{py_libdir}/distutils/command/wininst-*.exe
695 %{__rm} -r $RPM_BUILD_ROOT%{py_libdir}/idlelib/idle_test
696 %{__rm} $RPM_BUILD_ROOT%{py_libdir}/idlelib/ChangeLog
697 %{__rm} $RPM_BUILD_ROOT%{py_libdir}/idlelib/help.html
698 %{__rm} $RPM_BUILD_ROOT%{py_libdir}/idlelib/idle.pyw
699 %{__rm} -r $RPM_BUILD_ROOT%{py_libdir}/plat-*/regen
701 %{__rm} $RPM_BUILD_ROOT%{py_libdir}/pdb.doc
703 find $RPM_BUILD_ROOT%{py_libdir} -name \*.bat -exec rm {} \;
704 find $RPM_BUILD_ROOT%{py_libdir} -name \*.txt -exec rm {} \;
705 find $RPM_BUILD_ROOT%{py_libdir} -name README\* -exec rm {} \;
707 %{__mv} $RPM_BUILD_ROOT%{py_incdir}/pyconfig.h $RPM_BUILD_ROOT%{py_libdir}/config/pyconfig.h
708 sed -e's#@PREFIX@#%{_prefix}#g;s#@PY_VER@#%{py_ver}#g' %{SOURCE2} > $RPM_BUILD_ROOT%{py_incdir}/pyconfig.h
711 rm -rf $RPM_BUILD_ROOT
713 %post libs -p /sbin/ldconfig
715 %postun libs -p /sbin/ldconfig
717 %post doc-info -p /sbin/postshell
718 -/usr/sbin/fix-info-dir -c %{_infodir}
720 %postun doc-info -p /sbin/postshell
721 -/usr/sbin/fix-info-dir -c %{_infodir}
724 %defattr(644,root,root,755)
725 %attr(755,root,root) %{_bindir}/python
726 %attr(755,root,root) %{_bindir}/python2
727 %attr(755,root,root) %{_bindir}/python%{py_ver}
728 %{_mandir}/man1/python.1*
729 %{_mandir}/man1/python2.1*
732 %defattr(644,root,root,755)
734 %config(noreplace) %verify(not md5 mtime size) /etc/shrc.d/python-modules*
735 %exclude %{py_libdir}/_abcoll.py[co]
736 %exclude %{py_libdir}/abc.py[co]
737 %exclude %{py_libdir}/UserDict.py[co]
738 %exclude %{py_libdir}/codecs.py[co]
739 %exclude %{py_libdir}/copy_reg.py[co]
740 %exclude %{py_libdir}/genericpath.py[co]
741 %exclude %{py_libdir}/linecache.py[co]
742 %exclude %{py_libdir}/locale.py[co]
743 %exclude %{py_libdir}/posixpath.py[co]
744 %exclude %{py_libdir}/profile.py[co]
745 %exclude %{py_libdir}/pstats.py[co]
746 %exclude %{py_libdir}/pydoc.py[co]
747 %exclude %{py_libdir}/re.py[co]
748 %exclude %{py_libdir}/site.py[co]
749 %exclude %{py_libdir}/sre_*.py[co]
750 %exclude %{py_libdir}/stat.py[co]
751 %exclude %{py_libdir}/sysconfig.py[co]
752 %exclude %{py_libdir}/timeit.py[co]
753 %exclude %{py_libdir}/os.py[co]
754 %exclude %{py_libdir}/_weakrefset.py[co]
755 %exclude %{py_libdir}/encodings/*.py[co]
756 %exclude %{py_libdir}/types.py[co]
757 %exclude %{py_libdir}/warnings.py[co]
759 %{py_libdir}/*.py[co]
761 %{py_dyndir}/Python-%{version}-py%{py_ver}.egg-info
764 # list .so modules to be sure that all of them are built
767 # three modules below do not work on 64-bit architectures
768 # see Python README file for explanation
769 %ifnarch alpha ia64 ppc64 sparc64 %{x8664}
770 %attr(755,root,root) %{py_dyndir}/imageop.so
771 # sizeof(long) != sizeof(int), so dl module will not be built on 64-bit
773 %attr(755,root,root) %{py_dyndir}/dl.so
776 %attr(755,root,root) %{py_dyndir}/audioop.so
777 %attr(755,root,root) %{py_dyndir}/array.so
778 %attr(755,root,root) %{py_dyndir}/binascii.so
779 %attr(755,root,root) %{py_dyndir}/_bisect.so
780 %attr(755,root,root) %{py_dyndir}/_bsddb.so
781 %attr(755,root,root) %{py_dyndir}/bz2.so
782 %attr(755,root,root) %{py_dyndir}/cmath.so
783 %attr(755,root,root) %{py_dyndir}/_codecs_cn.so
784 %attr(755,root,root) %{py_dyndir}/_codecs_hk.so
785 %attr(755,root,root) %{py_dyndir}/_codecs_iso2022.so
786 %attr(755,root,root) %{py_dyndir}/_codecs_jp.so
787 %attr(755,root,root) %{py_dyndir}/_codecs_kr.so
788 %attr(755,root,root) %{py_dyndir}/_codecs_tw.so
789 %attr(755,root,root) %{py_dyndir}/_collections.so
790 %attr(755,root,root) %{py_dyndir}/cPickle.so
791 %attr(755,root,root) %{py_dyndir}/crypt.so
792 %attr(755,root,root) %{py_dyndir}/cStringIO.so
793 %attr(755,root,root) %{py_dyndir}/_csv.so
794 %attr(755,root,root) %{py_dyndir}/_ctypes*.so
795 %attr(755,root,root) %{py_dyndir}/_curses_panel.so
796 %attr(755,root,root) %{py_dyndir}/_curses.so
797 %attr(755,root,root) %{py_dyndir}/datetime.so
798 %attr(755,root,root) %{py_dyndir}/_elementtree.so
799 %attr(755,root,root) %{py_dyndir}/_functools.so
800 %attr(755,root,root) %{py_dyndir}/_hashlib.so
801 %attr(755,root,root) %{py_dyndir}/_heapq.so
802 %attr(755,root,root) %{py_dyndir}/_io.so
803 %attr(755,root,root) %{py_dyndir}/_json.so
804 %attr(755,root,root) %{py_dyndir}/_locale.so
805 %attr(755,root,root) %{py_dyndir}/_lsprof.so
806 %attr(755,root,root) %{py_dyndir}/_multibytecodec.so
807 %attr(755,root,root) %{py_dyndir}/_multiprocessing.so
808 %attr(755,root,root) %{py_dyndir}/_random.so
809 %{?with_openssl097:%attr(755,root,root) %{py_dyndir}/_sha*.so}
810 %attr(755,root,root) %{py_dyndir}/_socket.so
811 %attr(755,root,root) %{py_dyndir}/_ssl.so
812 %attr(755,root,root) %{py_dyndir}/_testcapi.so
814 %attr(755,root,root) %{py_dyndir}/dbm.so
816 %attr(755,root,root) %{py_dyndir}/fcntl.so
817 %attr(755,root,root) %{py_dyndir}/future_builtins.so
818 %attr(755,root,root) %{py_dyndir}/gdbm.so
819 %attr(755,root,root) %{py_dyndir}/grp.so
820 %attr(755,root,root) %{py_dyndir}/itertools.so
821 %attr(755,root,root) %{py_dyndir}/linuxaudiodev.so
822 %attr(755,root,root) %{py_dyndir}/math.so
823 %attr(755,root,root) %{py_dyndir}/mmap.so
824 %attr(755,root,root) %{py_dyndir}/nis.so
825 %attr(755,root,root) %{py_dyndir}/operator.so
826 %attr(755,root,root) %{py_dyndir}/ossaudiodev.so
827 %attr(755,root,root) %{py_dyndir}/parser.so
828 %attr(755,root,root) %{py_dyndir}/pyexpat.so
829 %attr(755,root,root) %{py_dyndir}/readline.so
830 %attr(755,root,root) %{py_dyndir}/resource.so
831 %attr(755,root,root) %{py_dyndir}/select.so
832 %attr(755,root,root) %{py_dyndir}/strop.so
833 %attr(755,root,root) %{py_dyndir}/syslog.so
834 %attr(755,root,root) %{py_dyndir}/termios.so
835 %attr(755,root,root) %{py_dyndir}/time.so
836 %attr(755,root,root) %{py_dyndir}/spwd.so
837 %attr(755,root,root) %{py_dyndir}/unicodedata.so
838 %attr(755,root,root) %{py_dyndir}/zlib.so
840 %dir %{py_libdir}/plat-*
841 %{py_libdir}/plat-*/*.py[co]
843 %dir %{py_libdir}/bsddb
844 %{py_libdir}/bsddb/*.py[co]
846 %dir %{py_libdir}/compiler
847 %{py_libdir}/compiler/*.py[co]
849 %dir %{py_libdir}/ctypes
850 %dir %{py_libdir}/ctypes/macholib
851 %{py_libdir}/ctypes/*.py[co]
852 %{py_libdir}/ctypes/macholib/*.py[co]
854 %dir %{py_libdir}/curses
855 %{py_libdir}/curses/*.py[co]
857 %dir %{py_libdir}/distutils
858 %dir %{py_libdir}/distutils/command
859 %{py_libdir}/distutils/*.py[co]
860 %{py_libdir}/distutils/command/*.py[co]
862 %dir %{py_libdir}/email
863 %dir %{py_libdir}/email/mime
864 %{py_libdir}/email/*.py[co]
865 %{py_libdir}/email/mime/*.py[co]
867 %dir %{py_libdir}/ensurepip
868 %{py_libdir}/ensurepip/*.py[co]
869 %{py_libdir}/ensurepip/_bundled
871 %dir %{py_libdir}/idlelib
873 %dir %{py_libdir}/importlib
874 %{py_libdir}/importlib/*.py[co]
876 %dir %{py_libdir}/json
877 %{py_libdir}/json/*.py[co]
879 %dir %{py_libdir}/logging
880 %{py_libdir}/logging/*.py[co]
882 %dir %{py_libdir}/multiprocessing
883 %dir %{py_libdir}/multiprocessing/dummy
884 %{py_libdir}/multiprocessing/*.py[co]
885 %{py_libdir}/multiprocessing/dummy/*.py[co]
887 %dir %{py_libdir}/unittest
888 %{py_libdir}/unittest/*.py[co]
889 %dir %{py_libdir}/unittest/test
890 %{py_libdir}/unittest/test/*.py[co]
892 %dir %{py_libdir}/wsgiref
893 %{py_libdir}/wsgiref/*.py[co]
894 %{py_libdir}/wsgiref.egg-info
896 %dir %{py_libdir}/xml
897 %dir %{py_libdir}/xml/dom
898 %dir %{py_libdir}/xml/etree
899 %dir %{py_libdir}/xml/parsers
900 %dir %{py_libdir}/xml/sax
901 %{py_libdir}/xml/*.py[co]
902 %{py_libdir}/xml/dom/*.py[co]
903 %{py_libdir}/xml/etree/*.py[co]
904 %{py_libdir}/xml/parsers/*.py[co]
905 %{py_libdir}/xml/sax/*.py[co]
907 %files modules-sqlite
908 %defattr(644,root,root,755)
909 %attr(755,root,root) %{py_dyndir}/_sqlite3.so
910 %dir %{py_libdir}/sqlite3
911 %{py_libdir}/sqlite3/*.py[co]
914 %defattr(644,root,root,755)
915 %attr(755,root,root) %{_libdir}/libpython%{py_ver}.so.*
919 %dir %{_datadir}/python%{py_ver}
920 %dir %{py_sitescriptdir}
923 # for locally installed packages
924 %dir %{_prefix}/local/%{_lib}/python%{py_ver}/site-packages
926 # shared modules required by python library
927 %attr(755,root,root) %{py_dyndir}/_struct.so
929 # modules required by python library
930 %{py_libdir}/_abcoll.py[co]
931 %{py_libdir}/abc.py[co]
932 %{py_libdir}/UserDict.py[co]
933 %{py_libdir}/codecs.py[co]
934 %{py_libdir}/copy_reg.py[co]
935 %{py_libdir}/genericpath.py[co]
936 %{py_libdir}/linecache.py[co]
937 %{py_libdir}/locale.py[co]
938 %{py_libdir}/posixpath.py[co]
939 %{py_libdir}/re.py[co]
940 %{py_libdir}/site.py[co]
941 %{py_libdir}/sre_*.py[co]
942 %{py_libdir}/stat.py[co]
943 %{py_libdir}/sysconfig.py[co]
944 %{py_libdir}/os.py[co]
945 %{py_libdir}/_weakrefset.py[co]
946 # needed by the dynamic sys.lib patch
947 %{py_libdir}/types.py[co]
948 %{py_libdir}/warnings.py[co]
950 # encodings required by python library
951 %dir %{py_libdir}/encodings
952 %{py_libdir}/encodings/*.py[co]
954 # required by sysconfig.py
955 %dir %{py_libdir}/config
956 %{py_libdir}/config/Makefile
957 %{py_libdir}/config/pyconfig.h
959 %{py_incdir}/pyconfig.h
962 %defattr(644,root,root,755)
963 %attr(755,root,root) %{_bindir}/pydoc
964 %{py_libdir}/pydoc.py[co]
965 %dir %{py_libdir}/pydoc_data
966 %{py_libdir}/pydoc_data/*.py[co]
969 %defattr(644,root,root,755)
970 %attr(755,root,root) %{_bindir}/idle
971 %dir %{py_libdir}/idlelib/Icons
972 %{py_libdir}/idlelib/*.py[co]
973 %{py_libdir}/idlelib/Icons/*
974 %{py_libdir}/idlelib/*.def
977 %defattr(644,root,root,755)
978 %doc Misc/{ACKS,NEWS,README,README.valgrind,valgrind-python.supp}
979 %attr(755,root,root) %{_bindir}/python-config
980 %attr(755,root,root) %{_bindir}/python2-config
981 %attr(755,root,root) %{_bindir}/python%{py_ver}-config
982 %attr(755,root,root) %{_libdir}/libpython%{py_ver}.so
983 %attr(755,root,root) %{_libdir}/libpython.so
985 %exclude %{py_incdir}/pyconfig.h
986 %{_pkgconfigdir}/python.pc
987 %{_pkgconfigdir}/python2.pc
988 %{_pkgconfigdir}/python-%{py_ver}.pc
990 %attr(755,root,root) %{py_libdir}/config/makesetup
991 %attr(755,root,root) %{py_libdir}/config/install-sh
992 %{py_libdir}/config/Makefile.pre.in
993 %{py_libdir}/config/Setup
994 %{py_libdir}/config/Setup.config
995 %{py_libdir}/config/Setup.local
996 %{py_libdir}/config/config.c
997 %{py_libdir}/config/config.c.in
998 %{py_libdir}/config/python.o
1001 %defattr(644,root,root,755)
1002 %attr(-,root,root) %{py_libdir}/*.py
1003 %{py_libdir}/plat-*/*.py
1004 %{py_libdir}/bsddb/*.py
1005 %{py_libdir}/ctypes/*.py
1006 %{py_libdir}/ctypes/macholib/*.py
1007 %{py_libdir}/compiler/*.py
1008 %{py_libdir}/curses/*.py
1009 %{py_libdir}/distutils/*.py
1010 %{py_libdir}/distutils/command/*.py
1011 %{py_libdir}/email/*.py
1012 %{py_libdir}/email/mime/*.py
1013 %{py_libdir}/encodings/*.py
1014 %{py_libdir}/hotshot/*.py
1015 %{py_libdir}/ensurepip/*.py
1016 %{py_libdir}/idlelib/*.py
1017 %{py_libdir}/importlib/*.py
1018 %{py_libdir}/json/*.py
1019 %{py_libdir}/lib2to3/*.py
1020 %{py_libdir}/lib2to3/fixes/*.py
1021 %{py_libdir}/lib2to3/pgen2/*.py
1022 %{py_libdir}/logging/*.py
1023 %{py_libdir}/multiprocessing/*.py
1024 %{py_libdir}/multiprocessing/dummy/*.py
1025 %{py_libdir}/pydoc_data/*.py
1026 %{py_libdir}/sqlite3/*.py
1027 %{py_libdir}/unittest/*.py
1028 %{py_libdir}/unittest/test/*.py
1029 %{py_libdir}/wsgiref/*.py
1030 %{py_libdir}/xml/*.py
1031 %{py_libdir}/xml/dom/*.py
1032 %{py_libdir}/xml/etree/*.py
1033 %{py_libdir}/xml/parsers/*.py
1034 %{py_libdir}/xml/sax/*.py
1037 %defattr(644,root,root,755)
1038 %config(noreplace) %verify(not md5 mtime size) /etc/shrc.d/python-devel*
1040 %attr(755,root,root) %{py_dyndir}/_hotshot.so
1041 %dir %{py_libdir}/hotshot
1042 %{py_libdir}/hotshot/*.py[co]
1043 %{py_libdir}/profile.py[co]
1044 %{py_libdir}/pstats.py[co]
1045 %{py_libdir}/timeit.py[co]
1048 %defattr(644,root,root,755)
1049 %attr(755,root,root) %{_bindir}/2to3
1050 %dir %{py_libdir}/lib2to3
1051 %dir %{py_libdir}/lib2to3/fixes
1052 %dir %{py_libdir}/lib2to3/pgen2
1053 %{py_libdir}/lib2to3/*.py[co]
1054 %{py_libdir}/lib2to3/*.pickle
1055 %{py_libdir}/lib2to3/fixes/*.py[co]
1056 %{py_libdir}/lib2to3/pgen2/*.py[co]
1059 %defattr(644,root,root,755)
1060 %{_libdir}/libpython%{py_ver}.a
1061 %{_libdir}/libpython.a
1064 %defattr(644,root,root,755)
1065 %{_examplesdir}/%{name}-%{version}
1068 %defattr(644,root,root,755)
1070 %{py_libdir}/bsddb/test
1071 %{py_libdir}/ctypes/test
1072 %{py_libdir}/distutils/tests
1073 %{py_libdir}/email/test
1074 %{py_libdir}/sqlite3/test
1075 %{py_libdir}/json/tests
1076 %{py_libdir}/lib2to3/tests
1079 %defattr(644,root,root,755)
1080 %doc python-%{dver}-docs-html/*
1081 %{_docdir}/python-doc
1085 %defattr(644,root,root,755)
1091 %defattr(644,root,root,755)
1093 %attr(755,root,root) %{py_dyndir}/_tkinter.so