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