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