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