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