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