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