]> git.pld-linux.org Git - packages/python3.git/blame - python3.spec
- more lib64 fixes
[packages/python3.git] / python3.spec
CommitLineData
19221b23
AG
1#
2# TODO:
3# - fix tests
4# - check unpackaged files
9416f74d
AM
5
6# Conditional build:
7%bcond_with info # info pages (requires emacs)
8%bcond_without tkinter # disables tkinter module building
9%bcond_without tests # disables Python testing
10%bcond_with verbose_tests # runs tests in verbose mode
9416f74d
AM
11#
12# tests which will not work on 64-bit platforms
13%define no64bit_tests test_audioop test_rgbimg test_imageop
14# tests which may fail because of builder environment limitations (no /proc or /dev/pts)
15%define nobuilder_tests test_resource test_openpty test_socket test_nis test_posix test_locale test_pty
16# tests which fail because of some unknown/unresolved reason (this list should be empty)
be43ead0 17%define broken_tests test_httpservers test_distutils test_cmd_line test_pydoc test_telnetlib test_zlib
9416f74d 18
a0694bb8 19%define py_ver 3.2
c7fdbe10 20%define py_abi %{py_ver}mu
9416f74d
AM
21%define py_prefix %{_prefix}
22%define py_libdir %{py_prefix}/%{_lib}/python%{py_ver}
c7fdbe10 23%define py_incdir %{_includedir}/python%{py_abi}
9416f74d
AM
24%define py_sitedir %{py_libdir}/site-packages
25%define py_dyndir %{py_libdir}/lib-dynload
26
27Summary: Very high level scripting language with X interface
28Summary(es.UTF-8): Lenguaje script de alto nivel con interfaz X
29Summary(fr.UTF-8): Langage de script de très haut niveau avec interface X
30Summary(pl.UTF-8): Python - język obiektowy wysokiego poziomu
31Summary(pt_BR.UTF-8): Linguagem de programação interpretada de alto nível
32Summary(ru.UTF-8): Язык программирования очень высокого уровня с X-интерфейсом
33Summary(tr.UTF-8): X arayüzlü, yüksek düzeyli, kabuk yorumlayıcı dili
34Summary(uk.UTF-8): Мова програмування дуже високого рівня з X-інтерфейсом
2072c60e 35Name: python3
a0694bb8 36Version: %{py_ver}
75257062 37Release: 0.2
9416f74d
AM
38Epoch: 1
39License: PSF
40Group: Applications
0cf503a8 41Source0: http://www.python.org/ftp/python/%{version}/Python-%{version}.tar.xz
efe92a87 42# Source0-md5: 563c0b4b8c8596e332cc076c4f013971
a20e3138
AG
43Patch0: %{name}-pythonpath.patch
44Patch1: %{name}-ac_fixes.patch
45Patch2: %{name}-lib64.patch
46Patch3: %{name}-noarch_to_datadir.patch
9416f74d
AM
47URL: http://www.python.org/
48BuildRequires: autoconf
49BuildRequires: bluez-libs-devel
50BuildRequires: bzip2-devel
51BuildRequires: db-devel >= 4
52%{?with_info:BuildRequires: emacs >= 21}
53BuildRequires: expat-devel >= 1:1.95.7
54BuildRequires: file
55BuildRequires: gdbm-devel >= 1.8.3
56BuildRequires: gmp-devel >= 4.0
3ba70ac2 57BuildRequires: libffi-devel
9416f74d
AM
58BuildRequires: libstdc++-devel
59BuildRequires: ncurses-ext-devel >= 5.2
9416f74d 60BuildRequires: openssl-devel >= 0.9.8
9416f74d
AM
61BuildRequires: readline-devel >= 5.0
62BuildRequires: rpm-pythonprov
63BuildRequires: sed >= 4.0
64BuildRequires: sqlite3-devel >= 3.3.5
65%{?with_info:BuildRequires: tetex-makeindex}
66%{?with_tkinter:BuildRequires: tix-devel >= 1:8.1.4-4}
67%{?with_tkinter:BuildRequires: tk-devel >= 8.4.3}
68BuildRequires: zlib-devel
69Requires: %{name}-libs = %{epoch}:%{version}-%{release}
9416f74d 70BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
34dfde61 71
8d0b0882 72%define specflags_ppc -D__ppc__=1
34dfde61 73%define specflags_ppc64 -D__ppc64__=1
9416f74d
AM
74
75%if %{with verbose_tests}
76%define test_flags -v -l -x
77%else
f488a705 78%define test_flags -w -l -x
9416f74d
AM
79%endif
80
81%ifarch alpha ia64 ppc64 sparc64 ppc64 %{x8664}
82%define test_list %{nobuilder_tests} %{broken_tests} %{no64bit_tests}
83%else
84%define test_list %{nobuilder_tests} %{broken_tests}
85%endif
86
87%ifarch sparc
88%define test_list %{nobuilder_tests} %{broken_tests} test_fcntl test_ioctl
89%endif
90
91%description
92Python is an interpreted, interactive, object-oriented programming
93language. It incorporates modules, exceptions, dynamic typing, very
94high level dynamic data types, and classes. Python combines remarkable
95power with very clear syntax. It has interfaces to many system calls
96and libraries, as well as to various window systems, and is extensible
97in C or C++. It is also usable as an extension language for
98applications that need a programmable interface. Finally, Python is
99portable: it runs on many brands of UNIX, on the Mac, and on PCs under
100MS-DOS, Windows, Windows NT, and OS/2.
101
102This package contains the Python binary.
103
104%description -l de.UTF-8
105Python ist eine interpretierte, interaktive, objektorientierte
106Programmiersprache, vergleichbar zu Tcl, Perl, Scheme oder Java.
107Python enthält Module, Klassen, Exceptions, High-Level dynamische
108Datentypen und dynamisches Typisieren. Python unterstützt Interfaces
109zu vielen Systemaufrufen und Libraries, sowie verschiedene
110Fenstersysteme (X11, Motif, Tk, Mac und MFC)
111
112Programmierer können neue built-in-Module für Python in C oder C++
113schreiben. Python kann auch als Erweiterungssprache für Applikationen
114benutzt werden, die ein programmierbares Interface brauchen. Dieses
115Paket enthält die meisten Standard-Python-Module, und Module zum
116Ansprechen von Tix (Tk-widget set) und RPM.
117
118%description -l es.UTF-8
119Python es un lenguaje de scripts interpretado orientado a objetos.
120Contiene soporte para carga dinámica de objetos, clases, módulos y
121excepciones.
122
123Es sencillo adicionar interfaces para nuevos sistemas de biblioteca a
124través de código C, tornando Python fácil de usar en ambientes
125particulares/personalizados. Este paquete Python incluye la mayoría de
126los módulos padrón Python, junto con módulos para crear interfaces
127para el conjunto de componentes Tix para Tk y RPM.
128
129%description -l fr.UTF-8
130Python est un langage de script interprété et orienté objet. Il gère
131le chargement dynamique des objets, les classes, les modules et les
132exceptions. L'ajout d'interfaces aux nouvelles bibliothèques systèmes
133avec du code C est simple, ce qui rend Python facile à utiliser dans
134des configs personnalisées.
135
136Ce paquetage Python contient la plupart des modules Python standards,
137ainsi que ceux permettant l'interfaçage avec les widgets Tix pour Tk
138et RPM.
139
140%description -l pl.UTF-8
141Python jest interpretowanym, interaktywnym i zorientowanym obiektowo
142językiem programowania. Jest modularny, obsługuje wyjątki, dynamiczne
143typy, zaawansowane dynamiczne struktury danych i klasy. Python łączy w
144sobie duże możliwości i przejrzystą składnię. Posiada interfejsy do
145wielu wywołań systemowych i bibliotek, w tym również do różnych
146bibliotek okienkowych. Możliwości jego można jeszcze rozszerzać
147poprzez odpowiednie moduły pisane w C lub C++. Python może być również
148użyty jako element aplikacji, którym potrzebny jest interpreter do
149skryptów. I wreszcie, Python jest wieloplatformowy, działa na wielu
150odmianach UNIX-a, Macu oraz PC pod DOS-em, Windows, WindowsNT oraz
151OS/2.
152
153Ten pakiet zawiera binarkę Pythona.
154
155%description -l pt_BR.UTF-8
156Python é uma linguagem de scripts interpretada orientada a objetos.
157Contém suporte para carga dinâmica de objetos, classes, módulos e
158exceções. Adicionar interfaces para novos sistemas de biblioteca
159através de código C é simples, tornando Python fácil de usar em
160ambientes particulares/personalizados.
161
162Este pacote Python inclui a maioria do módulos padrão Python, junto
163com módulos para interfaceamento para o conjunto de componentes Tix
164para Tk e RPM.
165
166%description -l ru.UTF-8
167Python - это интерпретируемый, объектно-ориентированный язык
168программирования. Он поддерживает динамическую загрузку объектов,
169классы, модули и обработку исключительных ситуаций (exceptions).
170Простота добавления интерфейсов к новым системным библиотекам через
171код на языке C делает Python хорошим выбором для использования в
172специальных конфигурациях.
173
174%description -l tr.UTF-8
175Python, nesneye yönelik bir kabuk yorumlayıcıdır. Nesnelerin,
176sınıfların, modüllerin ve aykırı durumların dinamik yüklenmelerine
177destek verir. C koduyla birlikte kullanımı son derece kolaydır. Bu
178paket, standart Python birimlerinin çoğunun yanısıra Tk ve RPM için
179arayüz birimlerini de içerir.
180
181%description -l uk.UTF-8
182Python - це інтерпретована, об'єктно-орієнтована мова програмування.
183Він підтримує динамічну загрузку об'єктів, класи, модулі та обробку
184виключних ситуацій (exceptions). Простота додавання інтерфейсів для
185нових системних бібліотек через код на мові C робить Python добрим
186вибором для використання в спеціальних конфігураціях.
187
188%package libs
189Summary: Python library
190Summary(pl.UTF-8): Biblioteka języka Python
191Group: Libraries/Python
192# broken detection in rpm/pythondeps.sh
193Provides: python(abi) = %{py_ver}
194# for compatibility with existing Ac packages
195Provides: python(bytecode) = %{py_ver}
2072c60e 196%{!?with_info:Obsoletes: python3-doc-info}
9416f74d
AM
197
198%description libs
199Python shared library and very essental modules for Python binary.
200
201%description libs -l pl.UTF-8
202Biblioteka współdzielona języka Python oraz bardzo podstawowe moduły
203dla Pythona.
204
205%package modules
206Summary: Python modules
207Summary(pl.UTF-8): Moduły języka Python
208Group: Libraries/Python
209Requires: %{name}-libs = %{epoch}:%{version}-%{release}
fef40d51 210Obsoletes: python3-modules-sqlite
9416f74d
AM
211
212%description modules
213Python officially distributed modules.
214
215%description modules -l pl.UTF-8
216Oficjalnie rozprowadzane moduły języka Python.
217
2072c60e 218%package -n pydoc3
9416f74d
AM
219Summary: Python interactive module documentation access support
220Summary(pl.UTF-8): Interaktywne korzystanie z dokumentacji modułów języka Python
221Group: Applications
222Requires: %{name}-modules = %{epoch}:%{version}-%{release}
223
2072c60e 224%description -n pydoc3
9416f74d
AM
225Python interactive module documentation access support.
226
2072c60e 227%description -n pydoc3 -l pl.UTF-8
9416f74d
AM
228Interaktywne korzystanie z dokumentacji modułów języka Python.
229
2072c60e 230%package -n idle3
9416f74d
AM
231Summary: IDE for Python language
232Summary(pl.UTF-8): IDE dla języka Python
233Group: Applications
234Requires: %{name}-tkinter = %{epoch}:%{version}-%{release}
235
2072c60e 236%description -n idle3
9416f74d
AM
237IDE for Python language.
238
2072c60e 239%description -n idle3 -l pl.UTF-8
9416f74d
AM
240IDE dla języka Python.
241
242%package devel
243Summary: Libraries and header files for building python code
244Summary(de.UTF-8): Libraries und Header-Dateien zum Erstellen von Python-Code
245Summary(es.UTF-8): Bibliotecas y archivos de inclusión para construir programas en python
246Summary(fr.UTF-8): Bibliothèques et en-têtes pour construire du code python
247Summary(pl.UTF-8): Pliki nagłówkowe i biblioteki Pythona
248Summary(pt_BR.UTF-8): Bibliotecas e arquivos de inclusão para o Python
249Summary(ru.UTF-8): Библиотеки и хедеры для построения кода на языке Python
250Summary(tr.UTF-8): Python ile geliştirme yapmak için gerekli dosyalar
251Summary(uk.UTF-8): Бібліотеки та хедери для програмування на мові Python
252Group: Development/Languages/Python
253Requires: %{name}-libs = %{epoch}:%{version}-%{release}
254
255%description devel
256The Python interpreter is relatively easy to extend with dynamically
257loaded extensions and to embed in other programs. This package
258contains the header files and libraries which are needed to do both of
259these tasks.
260
261%description devel -l de.UTF-8
262Der Python-Interpretierer ist relativ einfach anhand von dynamisch
263ladbaren Erweiterungen auszubauen und läßt sich in andere Programme
264integrieren. Dieses Paket enthält die Header-Dateien und Libraries,
265die für beide Aufgaben erforderlich sind.
266
267%description devel -l es.UTF-8
268El interpretador Python permite incluir con facilidad extensiones
269cargadas dinámicamente. Python es también fácil de ser empotrado en
270otros programas. Este paquete contiene los archivos de inclusión y
271bibliotecas necesarios para estas dos tareas.
272
273%description devel -l fr.UTF-8
274L'interpréteur Python est relativement facile à étendre avec des
275extensions chargées dynamiquement et à insérer dans d'autres
276programmes. Ce paquetage contient les en-têtes et les bibliothèques
277nécessaires à ces deux tâches.
278
279%description devel -l pl.UTF-8
280Interpreter Pythona jest w miarę łatwy do rozszerzania przy pomocy
281dynamicznie ładowanych rozszerzeń napisanych w C lub C++ oraz
282osadzania w innych programach. Ten pakiet zawiera pliki nagłówkowe i
283wszystko inne co potrzebne do tych celów.
284
285%description devel -l pt_BR.UTF-8
286O interpretador Python permite incluir com facilidade extensões
287carregadas dinamicamente. Python é também fácil de ser embutido em
288outros programas. Este pacote contém os arquivos de inclusão e
289bibliotecas necessários para estas duas tarefas.
290
291%description devel -l ru.UTF-8
292Интерпретатор Python относительно легко расширяется при помощи
293динамически загружаемых расширений и встраивается в другие программы.
294Этот пакет содержит хедеры и библиотеки, необходимые для обеих этих
295задач.
296
297%description devel -l tr.UTF-8
298Bu paket, Python ile geliştirme yapılabilmesi için gerekli başlık
299dosyalarını ve kitaplıkları içerir.
300
301%description devel -l uk.UTF-8
302Інтерпретатор Python відносно легко розширюється за допомогою
303розширень з динамічною загрузкою та вбудовується в інші програми. Цей
304пакет містить хедери та бібліотеки, необхідні для обох цих задач.
305
306%package devel-src
307Summary: Python module sources
308Summary(pl.UTF-8): Pliki źródłowe modułów Pythona
309Group: Development/Languages/Python
310Requires: %{name}-modules = %{epoch}:%{version}-%{release}
311
312%description devel-src
313Python module sources.
314
315%description devel-src -l pl.UTF-8
316Pliki źródłowe modułów Pythona.
317
318%package devel-tools
319Summary: Python development tools
320Summary(pl.UTF-8): Narzędzia programistyczne języka Python
321Group: Development/Languages/Python
322Requires: %{name}-modules = %{epoch}:%{version}-%{release}
323
324%description devel-tools
325Python development tools such as profilers and debugger.
326
327%description devel-tools -l pl.UTF-8
328Narzędzia programistyczne języka Python takie jak profiler oraz
329debugger.
330
30b0ff7b
AF
331%package 2to3
332Summary: Automated Python 2 to 3 code translation
0cf503a8 333Summary(pl.UTF-8): Automatyczne tłumaczenie kodu Pythona 2 do 3
30b0ff7b
AF
334Group: Development/Languages/Pythona
335
336%description 2to3
0cf503a8
JB
3372to3 is a Python program that reads Python 2.x source code and applies
338a series of fixers to transform it into valid Python 3.x code. The
339standard library contains a rich set of fixers that will handle almost
340all code. 2to3 supporting library lib2to3 is, however, a flexible and
341generic library, so it is possible to write your own fixers for 2to3.
342lib2to3 could also be adapted to custom applications in which Python
343code needs to be edited automatically.
344
345%description 2to3 -l pl.UTF-8
3462to3 to program w Pythonie czytający od źródłowy w Pythonie 2.x i
347aplikujący serię poprawek przekształcających go w poprawny kod w
348Pythonie 3.x. Biblioteka standardowa zawiera duży zbiór poprawek
349obsługujących większość kodu. Biblioteka wspierająca 2to3 (lib2to3)
350jest jednak elastyczną i ogólną biblioteką, więc można pisać własne
351poprawki dla 2to3. lib2to3 można także zaadaptować na potrzeby
352własnych zastosowań, w których kod w Pythonie musi być modyfikowany
353automatycznie.
30b0ff7b 354
9416f74d
AM
355%package static
356Summary: Static python library
357Summary(pl.UTF-8): Statyczna biblioteka Pythona
358Group: Development/Languages/Python
359Requires: %{name}-devel = %{epoch}:%{version}-%{release}
360
361%description static
362Static python library.
363
364%description static -l pl.UTF-8
365Statyczna biblioteka Pythona.
366
9416f74d
AM
367%package doc-info
368Summary: Documentation on Python in texinfo format
369Summary(pl.UTF-8): Dokumentacja do Pythona w formacie texinfo
370Group: Documentation
371
372%description doc-info
373Documentation on Python in texinfo format.
374
375%description doc-info -l pl.UTF-8
376Dokumentacja do Pythona w formacie texinfo.
377
378%package tkinter
379Summary: Standard Python interface to the Tk GUI toolkit
380Summary(de.UTF-8): Grafische Tk-Schnittstelle für Python
381Summary(es.UTF-8): Interfaz de GUI Tk para Python
382Summary(fr.UTF-8): Interface graphique Tk pour Python
383Summary(pl.UTF-8): Standardowy interfejs Pythona do biblioteki Tk
384Summary(pt_BR.UTF-8): Interface GUI Tk para Phyton
385Summary(tr.UTF-8): Python için grafik kullanıcı arayüzü
386Group: Libraries/Python
387Requires: %{name}-modules = %{epoch}:%{version}-%{release}
388Requires: tcl >= 8.4.3
389Requires: tix >= 1:8.1.4-4
390Requires: tk >= 8.4.3
391
392%description tkinter
393Standard Python interface to the Tk GUI toolkit.
394
395%description tkinter -l de.UTF-8
396Eine grafische Schnittstelle für Python, basierend auf Tcl/Tk, und von
397vielen Konfigurations-Tools genutzt.
398
399%description tkinter -l es.UTF-8
400Una interfaz gráfica para Python, basada en Tcl/Tk, y usada por muchas
401herramientas de configuración.
402
403%description tkinter -l fr.UTF-8
404Interface graphique pour Python, basée sur Tcl/Tk et utilisée par
405beaucoup des outils de configuration.
406
407%description tkinter -l pl.UTF-8
408Standardowy interfejs Pythona do biblioteki Tk.
409
410%description tkinter -l pt_BR.UTF-8
411Uma interface gráfica para Python, baseada em Tcl/Tk, e usada por
412muitas ferramentas de configuração.
413
414%description tkinter -l ru.UTF-8
415Графический интерфейс (GUI) для Python, построенный на Tcl/Tk.
416
417%description tkinter -l tr.UTF-8
418Python için Tcl/Tk'ye dayalı ve pek çok ayarlama aracı tarafından
419kullanılan grafik bir arayüzdür.
420
421%description tkinter -l uk.UTF-8
422Графічний інтерфейс (GUI) для Python, побудований на Tcl/Tk.
423
424%package examples
425Summary: Example programs in Python
426Summary(pl.UTF-8): Przykładowe programy w Pythonie
427Group: Development/Languages/Python
428
429%description examples
430Example programs in Python.
431
432These are for Python 2.3.4, not %{version}.
433
434%description examples -l pl.UTF-8
435Przykładowe programy w Pythonie.
436
437Przykłady te są dla Pythona 2.3.4, nie %{version}.
438
439%prep
0cf503a8 440%setup -q -n Python-%{version}
a20e3138 441%patch0 -p1
30b0ff7b 442%patch1 -p1
e3852288
JB
443%patch2 -p1
444%patch3 -p1
9416f74d
AM
445
446%build
9416f74d 447%{__autoconf}
31552fa6 448CPPFLAGS="-I/usr/include/ncursesw %{rpmcppflags}"; export CPPFLAGS
9416f74d 449%configure \
3ba70ac2 450 --with-cxx-main="%{__cxx}" \
9416f74d
AM
451 --enable-shared \
452 --enable-ipv6 \
19221b23 453 --with-dbmliborder=gdbm:bdb \
3ba70ac2 454 --with-wide-unicode \
9416f74d
AM
455 --with-signal-module \
456 --with-tsc \
457 --with-threads \
458 --with-doc-strings \
9416f74d 459 --with-fpectl \
3ba70ac2 460 --with-system-ffi \
23f5417d 461 --with-computed-gotos \
9416f74d
AM
462 LINKCC='$(PURIFY) $(CXX)' \
463 LDSHARED='$(CC) $(CFLAGS) -shared' \
464 BLDSHARED='$(CC) $(CFLAGS) -shared' \
465 LDFLAGS="%{rpmcflags} %{rpmldflags}"
466
467%{__make} \
23f5417d 468 OPT="%{rpmcflags} -fno-caller-saves" 2>&1 | awk '
9416f74d
AM
469BEGIN { fail = 0; logmsg = ""; }
470{
471 if ($0 ~ /\*\*\* WARNING:/) {
472 fail = 1;
473 logmsg = logmsg $0;
474 }
475 print $0;
476}
477END { if (fail) { print "\nPROBLEMS FOUND:"; print logmsg; exit(1); } }'
478
479LC_ALL=C
480export LC_ALL
481%if %{with tests}
482binlibdir=`echo build/lib.*`
483%{__make} test \
484 TESTOPTS="%{test_flags} %{test_list}" \
3ba70ac2 485 TESTPYTHON="LD_LIBRARY_PATH=`pwd` PYTHONHOME=`pwd` PYTHONPATH=`pwd`/Lib:$binlibdir ./python -tt"
9416f74d
AM
486%endif
487
488%install
489rm -rf $RPM_BUILD_ROOT
490install -d $RPM_BUILD_ROOT{%{_bindir},%{_libdir}} \
491 $RPM_BUILD_ROOT{%{py_sitedir},%{_mandir}/man1} \
492 $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version} \
493 $RPM_BUILD_ROOT%{_infodir} \
494 $RPM_BUILD_ROOT/etc/shrc.d
495
496%{__make} install \
497 DESTDIR=$RPM_BUILD_ROOT
498
499%if %{with info}
500%{__make} -C Doc/info
501install Doc/info/python*info* $RPM_BUILD_ROOT%{_infodir}
502%endif
503
9416f74d 504install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
4449431f 505cp -a Tools $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
9416f74d
AM
506
507#
508# create several useful aliases, such as timeit.py, profile.py, pdb.py, smtpd.py
509#
510
511# for python devel tools
512for script in timeit profile pdb pstats; do
24586eb0
AM
513 echo alias ${script}%{py_ver}.py=\"python%{py_ver} -m ${script}\"
514done > $RPM_BUILD_ROOT/etc/shrc.d/python%{py_ver}-devel.sh
9416f74d 515
24586eb0
AM
516echo alias pygettext%{py_ver}.py='"pygettext%{py_ver}"' \
517 >> $RPM_BUILD_ROOT/etc/shrc.d/python%{py_ver}-devel.sh
9416f74d
AM
518
519sed 's/=/ /' \
24586eb0
AM
520 < $RPM_BUILD_ROOT/etc/shrc.d/python%{py_ver}-devel.sh \
521 > $RPM_BUILD_ROOT/etc/shrc.d/python%{py_ver}-devel.csh
9416f74d
AM
522
523# for python modules
524for script in smtpd webbrowser; do
24586eb0
AM
525 echo alias ${script}%{py_ver}.py=\"python%{py_ver} -m ${script}\"
526done > $RPM_BUILD_ROOT/etc/shrc.d/python%{py_ver}-modules.sh
9416f74d
AM
527
528sed 's/=/ /' \
24586eb0
AM
529 < $RPM_BUILD_ROOT/etc/shrc.d/python%{py_ver}-modules.sh \
530 > $RPM_BUILD_ROOT/etc/shrc.d/python%{py_ver}-modules.csh
9416f74d
AM
531
532# xgettext specific for Python code
533#
534# we will have two commands: pygettext.py (an alias) and pygettext;
535# this way there are no import (which is impossible now) conflicts and
536# pygettext.py is provided for compatibility
24586eb0
AM
537install Tools/i18n/pygettext.py $RPM_BUILD_ROOT%{_bindir}/pygettext%{py_ver}
538
9416f74d
AM
539# just to cut the noise, as they are not packaged (now)
540# first tests
e3852288
JB
541%{__rm} -r $RPM_BUILD_ROOT%{py_scriptdir}/test
542%{__rm} -r $RPM_BUILD_ROOT%{py_scriptdir}/ctypes/test
543%{__rm} -r $RPM_BUILD_ROOT%{py_scriptdir}/distutils/tests
544%{__rm} -r $RPM_BUILD_ROOT%{py_scriptdir}/email/test
545%{__rm} -r $RPM_BUILD_ROOT%{py_scriptdir}/importlib/test
546%{__rm} -r $RPM_BUILD_ROOT%{py_scriptdir}/lib2to3/tests
547%{__rm} -r $RPM_BUILD_ROOT%{py_scriptdir}/sqlite3/test
548%{__rm} -r $RPM_BUILD_ROOT%{py_scriptdir}/tkinter/test
dceb7408 549%{__rm} -r $RPM_BUILD_ROOT%{py_scriptdir}/unittest/test
9416f74d
AM
550
551# other files
e3852288
JB
552%{__rm} $RPM_BUILD_ROOT%{py_scriptdir}/plat-*/regen
553%{__rm} $RPM_BUILD_ROOT%{py_scriptdir}/ctypes/macholib/fetch_macholib*
554%{__rm} $RPM_BUILD_ROOT%{py_scriptdir}/site-packages/README
555%{__rm} $RPM_BUILD_ROOT%{py_scriptdir}/distutils/command/wininst*.exe
556%{__rm} $RPM_BUILD_ROOT%{py_scriptdir}/idlelib/*.bat
557%{__rm} $RPM_BUILD_ROOT%{py_scriptdir}/idlelib/*.pyw
acd14a9e 558# already in %%doc
e3852288 559%{__rm} $RPM_BUILD_ROOT%{py_scriptdir}/LICENSE.txt
9416f74d
AM
560
561%clean
562rm -rf $RPM_BUILD_ROOT
563
564%post libs -p /sbin/ldconfig
565%postun libs -p /sbin/ldconfig
566
e3852288 567%post doc-info -p /sbin/postshell
a20bb9dc 568-/usr/sbin/fix-info-dir -c %{_infodir}
9416f74d 569
e3852288 570%postun doc-info -p /sbin/postshell
a20bb9dc 571-/usr/sbin/fix-info-dir -c %{_infodir}
9416f74d
AM
572
573%files
574%defattr(644,root,root,755)
24586eb0 575%attr(755,root,root) %{_bindir}/python%{py_ver}
c7fdbe10 576%attr(755,root,root) %{_bindir}/python%{py_abi}
306c0f2d 577%attr(755,root,root) %{_bindir}/python3
c7fdbe10
JB
578%{_mandir}/man1/python%{py_ver}.1*
579
580%files libs
581%defattr(644,root,root,755)
582%doc LICENSE
583%attr(755,root,root) %{_libdir}/libpython%{py_abi}.so.*.*
584
585%dir %{py_libdir}
586%dir %{py_dyndir}
587%dir %{py_sitedir}
588%dir %{py_scriptdir}
589%dir %{py_sitescriptdir}
dceb7408 590%{py_scriptdir}/__pycache__
c7fdbe10
JB
591
592# shared modules required by python library
593%attr(755,root,root) %{py_dyndir}/_struct.cpython-*.so
594
595# modules required by python library
dceb7408 596%{py_scriptdir}/_abcoll.py
597%{py_scriptdir}/_weakrefset.py
598%{py_scriptdir}/abc.py
599%{py_scriptdir}/codecs.py
600%{py_scriptdir}/copyreg.py
601%{py_scriptdir}/genericpath.py
602%{py_scriptdir}/locale.py
603%{py_scriptdir}/io.py
604%{py_scriptdir}/posixpath.py
605%{py_scriptdir}/site.py
606%{py_scriptdir}/stat.py
607%{py_scriptdir}/os.py
c7fdbe10 608# needed by the dynamic sys.lib patch
dceb7408 609%{py_scriptdir}/types.py
c7fdbe10
JB
610
611# encodings required by python library
612%dir %{py_scriptdir}/encodings
dceb7408 613%{py_scriptdir}/encodings/__pycache__
614%{py_scriptdir}/encodings/*.py
9416f74d
AM
615
616%files modules
617%defattr(644,root,root,755)
24586eb0 618/etc/shrc.d/python*-modules*
dceb7408 619%exclude %{py_scriptdir}/_abcoll.py
620%exclude %{py_scriptdir}/_weakrefset.py
621%exclude %{py_scriptdir}/abc.py
622%exclude %{py_scriptdir}/codecs.py
623%exclude %{py_scriptdir}/copyreg.py
624%exclude %{py_scriptdir}/genericpath.py
625%exclude %{py_scriptdir}/io.py
626%exclude %{py_scriptdir}/locale.py
627%exclude %{py_scriptdir}/posixpath.py
628%exclude %{py_scriptdir}/pdb.py
629%exclude %{py_scriptdir}/profile.py
630%exclude %{py_scriptdir}/pstats.py
631%exclude %{py_scriptdir}/pydoc.py
632%exclude %{py_scriptdir}/site.py
633%exclude %{py_scriptdir}/stat.py
634%exclude %{py_scriptdir}/timeit.py
635%exclude %{py_scriptdir}/os.py
636%exclude %{py_scriptdir}/encodings/*.py
637%exclude %{py_scriptdir}/types.py
638
639%{py_scriptdir}/*.py
9416f74d 640
c7fdbe10 641%{py_dyndir}/Python-%{py_ver}-py*.egg-info
9416f74d
AM
642
643#
644# list .so modules to be sure that all of them are built
645#
646
929a5a93 647# modules below do not work on 64-bit architectures
9416f74d
AM
648# see Python README file for explanation
649%ifnarch alpha ia64 ppc64 sparc64 %{x8664}
c7fdbe10 650%attr(755,root,root) %{py_dyndir}/audioop.cpython-*.so
9416f74d
AM
651%endif
652
c7fdbe10
JB
653%attr(755,root,root) %{py_dyndir}/_bisect.cpython-*.so
654%attr(755,root,root) %{py_dyndir}/_codecs_cn.cpython-*.so
655%attr(755,root,root) %{py_dyndir}/_codecs_hk.cpython-*.so
656%attr(755,root,root) %{py_dyndir}/_codecs_iso2022.cpython-*.so
657%attr(755,root,root) %{py_dyndir}/_codecs_jp.cpython-*.so
658%attr(755,root,root) %{py_dyndir}/_codecs_kr.cpython-*.so
659%attr(755,root,root) %{py_dyndir}/_codecs_tw.cpython-*.so
660%attr(755,root,root) %{py_dyndir}/_csv.cpython-*.so
661%attr(755,root,root) %{py_dyndir}/_ctypes*.cpython-*.so
662%attr(755,root,root) %{py_dyndir}/_curses_panel.cpython-*.so
663%attr(755,root,root) %{py_dyndir}/_curses.cpython-*.so
664%attr(755,root,root) %{py_dyndir}/_datetime.cpython-*.so
9416f74d 665%ifnarch sparc64
c7fdbe10 666%attr(755,root,root) %{py_dyndir}/_dbm.cpython-*.so
9416f74d 667%endif
c7fdbe10
JB
668%attr(755,root,root) %{py_dyndir}/_elementtree.cpython-*.so
669%attr(755,root,root) %{py_dyndir}/_gdbm.cpython-*.so
670%attr(755,root,root) %{py_dyndir}/_hashlib.cpython-*.so
671%attr(755,root,root) %{py_dyndir}/_heapq.cpython-*.so
672%attr(755,root,root) %{py_dyndir}/_json.cpython-*.so
673%attr(755,root,root) %{py_dyndir}/_lsprof.cpython-*.so
674%attr(755,root,root) %{py_dyndir}/_multibytecodec.cpython-*.so
675%attr(755,root,root) %{py_dyndir}/_multiprocessing.cpython-*.so
676%attr(755,root,root) %{py_dyndir}/_pickle.cpython-*.so
dceb7408 677%attr(755,root,root) %{py_dyndir}/_posixsubprocess.cpython-*.so
c7fdbe10
JB
678%attr(755,root,root) %{py_dyndir}/_random.cpython-*.so
679%attr(755,root,root) %{py_dyndir}/_socket.cpython-*.so
680%attr(755,root,root) %{py_dyndir}/_ssl.cpython-*.so
681%attr(755,root,root) %{py_dyndir}/_testcapi.cpython-*.so
682%attr(755,root,root) %{py_dyndir}/array.cpython-*.so
683%attr(755,root,root) %{py_dyndir}/atexit.cpython-*.so
dceb7408 684%attr(755,root,root) %{py_dyndir}/audioop.cpython-*.so
c7fdbe10
JB
685%attr(755,root,root) %{py_dyndir}/binascii.cpython-*.so
686%attr(755,root,root) %{py_dyndir}/bz2.cpython-*.so
687%attr(755,root,root) %{py_dyndir}/cmath.cpython-*.so
688%attr(755,root,root) %{py_dyndir}/crypt.cpython-*.so
689%attr(755,root,root) %{py_dyndir}/fcntl.cpython-*.so
690%attr(755,root,root) %{py_dyndir}/grp.cpython-*.so
691%attr(755,root,root) %{py_dyndir}/math.cpython-*.so
692%attr(755,root,root) %{py_dyndir}/mmap.cpython-*.so
693%attr(755,root,root) %{py_dyndir}/nis.cpython-*.so
694%attr(755,root,root) %{py_dyndir}/ossaudiodev.cpython-*.so
695%attr(755,root,root) %{py_dyndir}/parser.cpython-*.so
696%attr(755,root,root) %{py_dyndir}/pyexpat.cpython-*.so
697%attr(755,root,root) %{py_dyndir}/readline.cpython-*.so
698%attr(755,root,root) %{py_dyndir}/resource.cpython-*.so
699%attr(755,root,root) %{py_dyndir}/select.cpython-*.so
700%attr(755,root,root) %{py_dyndir}/syslog.cpython-*.so
701%attr(755,root,root) %{py_dyndir}/termios.cpython-*.so
702%attr(755,root,root) %{py_dyndir}/time.cpython-*.so
703%attr(755,root,root) %{py_dyndir}/spwd.cpython-*.so
704%attr(755,root,root) %{py_dyndir}/unicodedata.cpython-*.so
705%attr(755,root,root) %{py_dyndir}/zlib.cpython-*.so
9416f74d
AM
706
707%dir %{py_scriptdir}/plat-*
dceb7408 708%{py_scriptdir}/plat-*/__pycache__
709%{py_scriptdir}/plat-*/*.py
710
711%{py_scriptdir}/concurrent
9416f74d 712
9416f74d
AM
713%dir %{py_scriptdir}/ctypes
714%dir %{py_scriptdir}/ctypes/macholib
dceb7408 715%{py_scriptdir}/ctypes/__pycache__
716%{py_scriptdir}/ctypes/macholib/__pycache__
35ff21ac 717
dceb7408 718%{py_scriptdir}/ctypes/*.py
719%{py_scriptdir}/ctypes/macholib/*.py
acd14a9e 720%doc %{py_scriptdir}/ctypes/macholib/README.ctypes
9416f74d
AM
721
722%dir %{py_scriptdir}/curses
dceb7408 723%{py_scriptdir}/curses/__pycache__
724%{py_scriptdir}/curses/*.py
9416f74d 725
acd14a9e 726%dir %{py_scriptdir}/dbm
dceb7408 727%{py_scriptdir}/dbm/__pycache__
728%{py_scriptdir}/dbm/*.py
acd14a9e 729
9416f74d
AM
730%dir %{py_scriptdir}/distutils
731%dir %{py_scriptdir}/distutils/command
acd14a9e 732%doc %{py_scriptdir}/distutils/README
dceb7408 733%{py_scriptdir}/distutils/__pycache__
734%{py_scriptdir}/distutils/command/__pycache__
735%{py_scriptdir}/distutils/*.py
736%{py_scriptdir}/distutils/command/*.py
acd14a9e 737%{py_scriptdir}/distutils/command/command_template
9416f74d
AM
738
739%dir %{py_scriptdir}/email
740%dir %{py_scriptdir}/email/mime
dceb7408 741%{py_scriptdir}/email/__pycache__
742%{py_scriptdir}/email/mime/__pycache__
743%{py_scriptdir}/email/*.py
744%{py_scriptdir}/email/mime/*.py
9416f74d 745
acd14a9e 746%dir %{py_scriptdir}/html
dceb7408 747%{py_scriptdir}/html/*.py
748%{py_scriptdir}/html/__pycache__
acd14a9e
AF
749
750%dir %{py_scriptdir}/http
dceb7408 751%{py_scriptdir}/http/__pycache__
752%{py_scriptdir}/http/*.py
acd14a9e 753
fef40d51 754%dir %{py_scriptdir}/importlib
dceb7408 755%{py_scriptdir}/importlib/__pycache__
756%{py_scriptdir}/importlib/*.py
fef40d51 757
acd14a9e 758%dir %{py_scriptdir}/json
dceb7408 759%{py_scriptdir}/json/__pycache__
760%{py_scriptdir}/json/*.py
acd14a9e 761
9416f74d 762%dir %{py_scriptdir}/logging
dceb7408 763%{py_scriptdir}/logging/__pycache__
764%{py_scriptdir}/logging/*.py
9416f74d 765
acd14a9e 766%dir %{py_scriptdir}/multiprocessing
dceb7408 767%{py_scriptdir}/multiprocessing/__pycache__
768%{py_scriptdir}/multiprocessing/*.py
acd14a9e 769%dir %{py_scriptdir}/multiprocessing/dummy
dceb7408 770%{py_scriptdir}/multiprocessing/dummy/__pycache__
771%{py_scriptdir}/multiprocessing/dummy/*.py
772
773%{py_scriptdir}/turtledemo
774%{py_scriptdir}/unittest
acd14a9e
AF
775
776%dir %{py_scriptdir}/urllib
dceb7408 777%{py_scriptdir}/urllib/__pycache__
778%{py_scriptdir}/urllib/*.py
acd14a9e 779
9416f74d 780%dir %{py_scriptdir}/wsgiref
dceb7408 781%{py_scriptdir}/wsgiref/__pycache__
782%{py_scriptdir}/wsgiref/*.py
acd14a9e 783%{py_scriptdir}/wsgiref.egg-info
9416f74d
AM
784
785%dir %{py_scriptdir}/xml
786%dir %{py_scriptdir}/xml/dom
787%dir %{py_scriptdir}/xml/etree
788%dir %{py_scriptdir}/xml/parsers
789%dir %{py_scriptdir}/xml/sax
dceb7408 790%{py_scriptdir}/xml/__pycache__
791%{py_scriptdir}/xml/dom/__pycache__
792%{py_scriptdir}/xml/etree/__pycache__
793%{py_scriptdir}/xml/parsers/__pycache__
794%{py_scriptdir}/xml/sax/__pycache__
795%{py_scriptdir}/xml/*.py
796%{py_scriptdir}/xml/dom/*.py
797%{py_scriptdir}/xml/etree/*.py
798%{py_scriptdir}/xml/parsers/*.py
799%{py_scriptdir}/xml/sax/*.py
9416f74d 800
acd14a9e 801%dir %{py_scriptdir}/xmlrpc
dceb7408 802%{py_scriptdir}/xmlrpc/__pycache__
803%{py_scriptdir}/xmlrpc/*.py
acd14a9e 804
c7fdbe10 805%attr(755,root,root) %{py_dyndir}/_sqlite3.cpython-*.so
9416f74d 806%dir %{py_scriptdir}/sqlite3
dceb7408 807%{py_scriptdir}/sqlite3/__pycache__
808%{py_scriptdir}/sqlite3/*.py
9416f74d 809
2072c60e 810%files -n pydoc3
9416f74d 811%defattr(644,root,root,755)
19221b23 812%attr(755,root,root) %{_bindir}/pydoc3
dceb7408 813%attr(755,root,root) %{_bindir}/pydoc3.2
814%{py_scriptdir}/pydoc.py
fef40d51 815%dir %{py_scriptdir}/pydoc_data
dceb7408 816%{py_scriptdir}/pydoc_data/__pycache__
817%{py_scriptdir}/pydoc_data/*.py
818%{py_scriptdir}/pydoc_data/*.css
9416f74d 819
2072c60e 820%files -n idle3
9416f74d 821%defattr(644,root,root,755)
19221b23 822%attr(755,root,root) %{_bindir}/idle3
dceb7408 823%attr(755,root,root) %{_bindir}/idle3.2
9416f74d
AM
824%dir %{py_scriptdir}/idlelib
825%dir %{py_scriptdir}/idlelib/Icons
dceb7408 826%{py_scriptdir}/idlelib/__pycache__
827%{py_scriptdir}/idlelib/*.py
acd14a9e
AF
828%doc %{py_scriptdir}/idlelib/*.txt
829%doc %{py_scriptdir}/idlelib/ChangeLog
9416f74d
AM
830%{py_scriptdir}/idlelib/Icons/*
831%{py_scriptdir}/idlelib/*.def
832
833%files devel
834%defattr(644,root,root,755)
835%doc Misc/{ACKS,NEWS,README,README.valgrind,valgrind-python.supp}
c7fdbe10
JB
836%attr(755,root,root) %{_bindir}/python%{py_ver}-config
837%attr(755,root,root) %{_bindir}/python%{py_abi}-config
838%attr(755,root,root) %{_bindir}/python3-config
839%attr(755,root,root) %{_libdir}/libpython%{py_abi}.so
840%attr(755,root,root) %{_libdir}/libpython3.so
9416f74d
AM
841%dir %{py_incdir}
842%{py_incdir}/*.h
c7fdbe10 843%{_pkgconfigdir}/python-%{py_ver}.pc
c7fdbe10
JB
844
845%dir %{py_libdir}/config-%{py_abi}
846%attr(755,root,root) %{py_libdir}/config-%{py_abi}/makesetup
847%attr(755,root,root) %{py_libdir}/config-%{py_abi}/install-sh
848%{py_libdir}/config-%{py_abi}/Makefile
849%{py_libdir}/config-%{py_abi}/Setup
850%{py_libdir}/config-%{py_abi}/Setup.config
851%{py_libdir}/config-%{py_abi}/Setup.local
852%{py_libdir}/config-%{py_abi}/config.c
853%{py_libdir}/config-%{py_abi}/config.c.in
854%{py_libdir}/config-%{py_abi}/python.o
9416f74d 855
9416f74d
AM
856%files devel-tools
857%defattr(644,root,root,755)
24586eb0 858/etc/shrc.d/python*-devel*
9416f74d 859
24586eb0 860%attr(755,root,root) %{_bindir}/pygettext%{py_ver}
9416f74d 861
dceb7408 862%{py_scriptdir}/pdb.py
863%{py_scriptdir}/profile.py
864%{py_scriptdir}/pstats.py
865%{py_scriptdir}/timeit.py
9416f74d 866
30b0ff7b 867%files 2to3
eb7b678c 868%attr(755,root,root) %{_bindir}/2to3-%{py_ver}
30b0ff7b 869%dir %{py_scriptdir}/lib2to3
dceb7408 870%{py_scriptdir}/lib2to3/__pycache__
30b0ff7b
AF
871%{py_scriptdir}/lib2to3/*.txt
872%{py_scriptdir}/lib2to3/*.pickle
dceb7408 873%{py_scriptdir}/lib2to3/*.py
30b0ff7b 874%dir %{py_scriptdir}/lib2to3/fixes
dceb7408 875%{py_scriptdir}/lib2to3/fixes/__pycache__
be43ead0 876%{py_scriptdir}/lib2to3/fixes/*.py
30b0ff7b 877%dir %{py_scriptdir}/lib2to3/pgen2
dceb7408 878%{py_scriptdir}/lib2to3/pgen2/__pycache__
879%{py_scriptdir}/lib2to3/pgen2/*.py
30b0ff7b 880
9416f74d
AM
881%files static
882%defattr(644,root,root,755)
6eede82b 883%{_libdir}/libpython%{py_abi}.a
9416f74d
AM
884
885%files examples
886%defattr(644,root,root,755)
887%{_examplesdir}/%{name}-%{version}
888
9416f74d
AM
889%if %{with info}
890%files doc-info
891%defattr(644,root,root,755)
892%{_infodir}/*.info*
893%endif
894
895%if %{with tkinter}
896%files tkinter
897%defattr(644,root,root,755)
acd14a9e 898%dir %{py_scriptdir}/tkinter
dceb7408 899%{py_scriptdir}/tkinter/__pycache__
900%{py_scriptdir}/tkinter/*.py
c7fdbe10 901%attr(755,root,root) %{py_dyndir}/_tkinter.cpython-*.so
9416f74d 902%endif
This page took 0.209676 seconds and 4 git commands to generate.