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