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