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