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