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