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