]> git.pld-linux.org Git - packages/python.git/blob - python.spec
- system ffi
[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:  libffi-devel
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         --with-system-ffi \
552         --enable-ipv6 \
553         --enable-unicode=ucs4 \
554         --enable-shared \
555         LINKCC='$(PURIFY) $(CXX)' \
556         LDSHARED='$(CC) $(CFLAGS) -shared' \
557         BLDSHARED='$(CC) $(CFLAGS) -shared' \
558         LDFLAGS="%{rpmcflags} %{rpmldflags}"
559
560 %{__make} \
561         OPT="%{rpmcflags}" 2>&1 | awk '
562 BEGIN { fail = 0; logmsg = ""; }
563 {
564                 if ($0 ~ /\*\*\* WARNING:/) {
565                                 fail = 1;
566                                 logmsg = logmsg $0;
567                 }
568                 print $0;
569 }
570 END { if (fail) { print "\nPROBLEMS FOUND:"; print logmsg; exit(1); } }'
571
572 LC_ALL=C
573 export LC_ALL
574 %if %{with tests}
575 binlibdir="`pwd`/`echo build/lib.*`"
576 %{__make} test \
577         TESTOPTS="%{test_flags} %{test_list}" \
578         TESTPYTHON="LD_LIBRARY_PATH=`pwd` PYTHONHOME=`pwd` PYTHONPATH=`pwd`/Lib:$binlibdir ./python -tt"
579 %endif
580
581 %install
582 rm -rf $RPM_BUILD_ROOT
583 install -d $RPM_BUILD_ROOT{%{_bindir},%{_libdir}} \
584         $RPM_BUILD_ROOT{%{py_sitedir},%{_mandir}/man1} \
585         $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version} \
586         $RPM_BUILD_ROOT%{_infodir} \
587         $RPM_BUILD_ROOT%{_docdir} \
588         $RPM_BUILD_ROOT/etc/shrc.d
589
590 %{__make} install \
591         DESTDIR=$RPM_BUILD_ROOT
592
593 # docs in constant location
594 ln -sf python-doc-%{version} $RPM_BUILD_ROOT%{_docdir}/python-doc
595
596 %if %{with info}
597 %{__make} -C Doc/info
598 install Doc/info/python*info* $RPM_BUILD_ROOT%{_infodir}
599 %endif
600
601 install Makefile.pre.in $RPM_BUILD_ROOT%{py_libdir}/config
602
603 mv $RPM_BUILD_ROOT{%{py_libdir}/config,%{_libdir}}/libpython%{py_ver}.a
604 ln -sf libpython%{py_ver}.a $RPM_BUILD_ROOT%{_libdir}/libpython.a
605 ln -sf libpython%{py_ver}.so.1.0 $RPM_BUILD_ROOT%{_libdir}/libpython.so
606 ln -sf libpython%{py_ver}.so.1.0 $RPM_BUILD_ROOT%{_libdir}/libpython%{py_ver}.so
607
608 install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
609 cp -a Tools Demo $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
610
611 #
612 # create several useful aliases, such as timeit.py, profile.py, pdb.py, smtpd.py
613 #
614
615 # for python devel tools
616 for script in timeit profile pdb pstats; do
617     echo alias $script.py=\"python -m ${script}\"
618 done > $RPM_BUILD_ROOT/etc/shrc.d/python-devel.sh
619
620 sed 's/=/ /' \
621         < $RPM_BUILD_ROOT/etc/shrc.d/python-devel.sh \
622         > $RPM_BUILD_ROOT/etc/shrc.d/python-devel.csh
623
624 # for python modules
625 for script in smtpd webbrowser; do
626     echo alias $script.py=\"python -m ${script}\"
627 done > $RPM_BUILD_ROOT/etc/shrc.d/python-modules.sh
628
629 sed 's/=/ /' \
630         < $RPM_BUILD_ROOT/etc/shrc.d/python-modules.sh \
631         > $RPM_BUILD_ROOT/etc/shrc.d/python-modules.csh
632
633 # just to cut the noise, as they are not packaged (now)
634 # first tests
635 rm -r $RPM_BUILD_ROOT%{py_scriptdir}/test
636 rm -r $RPM_BUILD_ROOT%{py_scriptdir}/bsddb/test
637 rm -r $RPM_BUILD_ROOT%{py_scriptdir}/ctypes/test
638 rm -r $RPM_BUILD_ROOT%{py_scriptdir}/distutils/tests
639 rm -r $RPM_BUILD_ROOT%{py_scriptdir}/email/test
640 rm -r $RPM_BUILD_ROOT%{py_scriptdir}/sqlite3/test
641 rm -r $RPM_BUILD_ROOT%{py_scriptdir}/json/tests
642 rm -r $RPM_BUILD_ROOT%{py_scriptdir}/lib2to3/tests
643
644 # other files
645 rm -r $RPM_BUILD_ROOT%{py_scriptdir}/plat-*/regen
646 find $RPM_BUILD_ROOT%{py_scriptdir} -name \*.egg-info -exec rm {} \;
647 find $RPM_BUILD_ROOT%{py_scriptdir} -name \*.bat -exec rm {} \;
648 find $RPM_BUILD_ROOT%{py_scriptdir} -name \*.txt -exec rm {} \;
649 find $RPM_BUILD_ROOT%{py_scriptdir} -name README\* -exec rm {} \;
650
651 %clean
652 rm -rf $RPM_BUILD_ROOT
653
654 %post   libs -p /sbin/ldconfig
655 %postun libs -p /sbin/ldconfig
656
657 %post   doc-info -p /sbin/postshell
658 -/usr/sbin/fix-info-dir -c %{_infodir}
659
660 %postun doc-info -p /sbin/postshell
661 -/usr/sbin/fix-info-dir -c %{_infodir}
662
663 %files
664 %defattr(644,root,root,755)
665 %attr(755,root,root) %{_bindir}/python
666 %attr(755,root,root) %{_bindir}/python%{py_ver}
667 %{_mandir}/man1/python.1*
668
669 %files modules
670 %defattr(644,root,root,755)
671 /etc/shrc.d/python-modules*
672 %exclude %{py_scriptdir}/UserDict.py[co]
673 %exclude %{py_scriptdir}/codecs.py[co]
674 %exclude %{py_scriptdir}/copy_reg.py[co]
675 %exclude %{py_scriptdir}/locale.py[co]
676 %exclude %{py_scriptdir}/posixpath.py[co]
677 %exclude %{py_scriptdir}/pdb.py[co]
678 %exclude %{py_scriptdir}/profile.py[co]
679 %exclude %{py_scriptdir}/pstats.py[co]
680 %exclude %{py_scriptdir}/pydoc.py[co]
681 %exclude %{py_scriptdir}/site.py[co]
682 %exclude %{py_scriptdir}/stat.py[co]
683 %exclude %{py_scriptdir}/timeit.py[co]
684 %exclude %{py_scriptdir}/os.py[co]
685 %exclude %{py_scriptdir}/encodings/*.py[co]
686 %exclude %{py_scriptdir}/types.py[co]
687
688 %{py_scriptdir}/*.py[co]
689
690 %{py_dyndir}/*.egg-info
691
692 #
693 # list .so modules to be sure that all of them are built
694 #
695
696 # three modules below do not work on 64-bit architectures
697 # see Python README file for explanation
698 %ifnarch alpha ia64 ppc64 sparc64 %{x8664}
699 %attr(755,root,root) %{py_dyndir}/audioop.so
700 %attr(755,root,root) %{py_dyndir}/imageop.so
701 # sizeof(long) != sizeof(int), so dl module will not be built on 64-bit
702 # platforms
703 %attr(755,root,root) %{py_dyndir}/dl.so
704 %endif
705
706 %attr(755,root,root) %{py_dyndir}/array.so
707 %attr(755,root,root) %{py_dyndir}/binascii.so
708 %attr(755,root,root) %{py_dyndir}/_bisect.so
709 %attr(755,root,root) %{py_dyndir}/_bsddb.so
710 %attr(755,root,root) %{py_dyndir}/_bytesio.so
711 %attr(755,root,root) %{py_dyndir}/bz2.so
712 %attr(755,root,root) %{py_dyndir}/cmath.so
713 %attr(755,root,root) %{py_dyndir}/_codecs_cn.so
714 %attr(755,root,root) %{py_dyndir}/_codecs_hk.so
715 %attr(755,root,root) %{py_dyndir}/_codecs_iso2022.so
716 %attr(755,root,root) %{py_dyndir}/_codecs_jp.so
717 %attr(755,root,root) %{py_dyndir}/_codecs_kr.so
718 %attr(755,root,root) %{py_dyndir}/_codecs_tw.so
719 %attr(755,root,root) %{py_dyndir}/_collections.so
720 %attr(755,root,root) %{py_dyndir}/cPickle.so
721 %attr(755,root,root) %{py_dyndir}/crypt.so
722 %attr(755,root,root) %{py_dyndir}/cStringIO.so
723 %attr(755,root,root) %{py_dyndir}/_csv.so
724 %attr(755,root,root) %{py_dyndir}/_ctypes*.so
725 %attr(755,root,root) %{py_dyndir}/_curses_panel.so
726 %attr(755,root,root) %{py_dyndir}/_curses.so
727 %attr(755,root,root) %{py_dyndir}/datetime.so
728 %attr(755,root,root) %{py_dyndir}/_elementtree.so
729 %attr(755,root,root) %{py_dyndir}/_functools.so
730 %attr(755,root,root) %{py_dyndir}/_fileio.so
731 %attr(755,root,root) %{py_dyndir}/_hashlib.so
732 %attr(755,root,root) %{py_dyndir}/_heapq.so
733 %attr(755,root,root) %{py_dyndir}/_json.so
734 %attr(755,root,root) %{py_dyndir}/_locale.so
735 %attr(755,root,root) %{py_dyndir}/_lsprof.so
736 %attr(755,root,root) %{py_dyndir}/_multibytecodec.so
737 %attr(755,root,root) %{py_dyndir}/_multiprocessing.so
738 %attr(755,root,root) %{py_dyndir}/_random.so
739 %{?with_openssl097:%attr(755,root,root) %{py_dyndir}/_sha*.so}
740 %attr(755,root,root) %{py_dyndir}/_socket.so
741 %attr(755,root,root) %{py_dyndir}/_ssl.so
742 %attr(755,root,root) %{py_dyndir}/_testcapi.so
743 %attr(755,root,root) %{py_dyndir}/_weakref.so
744 %ifnarch sparc64
745 %attr(755,root,root) %{py_dyndir}/dbm.so
746 %endif
747 %attr(755,root,root) %{py_dyndir}/fcntl.so
748 %attr(755,root,root) %{py_dyndir}/future_builtins.so
749 %attr(755,root,root) %{py_dyndir}/gdbm.so
750 %attr(755,root,root) %{py_dyndir}/grp.so
751 %attr(755,root,root) %{py_dyndir}/itertools.so
752 %attr(755,root,root) %{py_dyndir}/linuxaudiodev.so
753 %attr(755,root,root) %{py_dyndir}/math.so
754 %attr(755,root,root) %{py_dyndir}/mmap.so
755 %attr(755,root,root) %{py_dyndir}/nis.so
756 %attr(755,root,root) %{py_dyndir}/operator.so
757 %attr(755,root,root) %{py_dyndir}/ossaudiodev.so
758 %attr(755,root,root) %{py_dyndir}/parser.so
759 %attr(755,root,root) %{py_dyndir}/pyexpat.so
760 %attr(755,root,root) %{py_dyndir}/readline.so
761 %attr(755,root,root) %{py_dyndir}/resource.so
762 %attr(755,root,root) %{py_dyndir}/select.so
763 %attr(755,root,root) %{py_dyndir}/strop.so
764 %attr(755,root,root) %{py_dyndir}/syslog.so
765 %attr(755,root,root) %{py_dyndir}/termios.so
766 %attr(755,root,root) %{py_dyndir}/time.so
767 %attr(755,root,root) %{py_dyndir}/spwd.so
768 %attr(755,root,root) %{py_dyndir}/unicodedata.so
769 %attr(755,root,root) %{py_dyndir}/zlib.so
770
771 %dir %{py_scriptdir}/plat-*
772 %{py_scriptdir}/plat-*/*.py[co]
773
774 %dir %{py_scriptdir}/bsddb
775 %{py_scriptdir}/bsddb/*.py[co]
776
777 %dir %{py_scriptdir}/compiler
778 %{py_scriptdir}/compiler/*.py[co]
779
780 %dir %{py_scriptdir}/ctypes
781 %dir %{py_scriptdir}/ctypes/macholib
782 %{py_scriptdir}/ctypes/*.py[co]
783 %{py_scriptdir}/ctypes/macholib/*.py[co]
784
785 %dir %{py_scriptdir}/curses
786 %{py_scriptdir}/curses/*.py[co]
787
788 %dir %{py_scriptdir}/distutils
789 %dir %{py_scriptdir}/distutils/command
790 %{py_scriptdir}/distutils/*.py[co]
791 %{py_scriptdir}/distutils/command/*.py[co]
792
793 %dir %{py_scriptdir}/email
794 %dir %{py_scriptdir}/email/mime
795 %{py_scriptdir}/email/*.py[co]
796 %{py_scriptdir}/email/mime/*.py[co]
797
798 %dir %{py_scriptdir}/json
799 %{py_scriptdir}/json/*.py[co]
800
801 %dir %{py_scriptdir}/logging
802 %{py_scriptdir}/logging/*.py[co]
803
804 %dir %{py_scriptdir}/multiprocessing
805 %dir %{py_scriptdir}/multiprocessing/dummy
806 %{py_scriptdir}/multiprocessing/*.py[co]
807 %{py_scriptdir}/multiprocessing/dummy/*.py[co]
808
809 %dir %{py_scriptdir}/wsgiref
810 %{py_scriptdir}/wsgiref/*.py[co]
811
812 %dir %{py_scriptdir}/xml
813 %dir %{py_scriptdir}/xml/dom
814 %dir %{py_scriptdir}/xml/etree
815 %dir %{py_scriptdir}/xml/parsers
816 %dir %{py_scriptdir}/xml/sax
817 %{py_scriptdir}/xml/*.py[co]
818 %{py_scriptdir}/xml/dom/*.py[co]
819 %{py_scriptdir}/xml/etree/*.py[co]
820 %{py_scriptdir}/xml/parsers/*.py[co]
821 %{py_scriptdir}/xml/sax/*.py[co]
822
823 %files modules-sqlite
824 %defattr(644,root,root,755)
825 %attr(755,root,root) %{py_dyndir}/_sqlite3.so
826 %dir %{py_scriptdir}/sqlite3
827 %{py_scriptdir}/sqlite3/*.py[co]
828
829 %files libs
830 %defattr(644,root,root,755)
831 %attr(755,root,root) %{_libdir}/libpython*.so.*
832
833 %dir %{py_dyndir}
834 %dir %{py_scriptdir}
835 %dir %{py_libdir}
836 %dir %{py_sitescriptdir}
837 %dir %{py_sitedir}
838
839 # shared modules required by python library
840 %attr(755,root,root) %{py_dyndir}/_struct.so
841
842 # modules required by python library
843 %{py_scriptdir}/UserDict.py[co]
844 %{py_scriptdir}/codecs.py[co]
845 %{py_scriptdir}/copy_reg.py[co]
846 %{py_scriptdir}/locale.py[co]
847 %{py_scriptdir}/posixpath.py[co]
848 %{py_scriptdir}/site.py[co]
849 %{py_scriptdir}/stat.py[co]
850 %{py_scriptdir}/os.py[co]
851 # needed by the dynamic sys.lib patch
852 %{py_scriptdir}/types.py[co]
853
854 # encodings required by python library
855 %dir %{py_scriptdir}/encodings
856 %{py_scriptdir}/encodings/*.py[co]
857
858 %files -n pydoc
859 %defattr(644,root,root,755)
860 %attr(755,root,root) %{_bindir}/pydoc
861 %{py_scriptdir}/pydoc.py[co]
862
863 %files -n idle
864 %defattr(644,root,root,755)
865 %attr(755,root,root) %{_bindir}/idle
866 %dir %{py_scriptdir}/idlelib
867 %dir %{py_scriptdir}/idlelib/Icons
868 %{py_scriptdir}/idlelib/*.py[co]
869 %{py_scriptdir}/idlelib/Icons/*
870 %{py_scriptdir}/idlelib/*.def
871
872 %files devel
873 %defattr(644,root,root,755)
874 %doc Misc/{ACKS,NEWS,README,README.valgrind,valgrind-python.supp}
875 %attr(755,root,root) %{_bindir}/python-config
876 %attr(755,root,root) %{_bindir}/python%{py_ver}-config
877 %attr(755,root,root) %{_libdir}/lib*.so
878 %dir %{py_incdir}
879 %{py_incdir}/*.h
880
881 %dir %{py_libdir}/config
882 %attr(755,root,root) %{py_libdir}/config/makesetup
883 %attr(755,root,root) %{py_libdir}/config/install-sh
884 %{py_libdir}/config/Makefile
885 %{py_libdir}/config/Makefile.pre.in
886 %{py_libdir}/config/Setup
887 %{py_libdir}/config/Setup.config
888 %{py_libdir}/config/Setup.local
889 %{py_libdir}/config/config.c
890 %{py_libdir}/config/config.c.in
891 %{py_libdir}/config/python.o
892
893 %files devel-src
894 %defattr(644,root,root,755)
895 %attr(-,root,root) %{py_scriptdir}/*.py
896 %{py_scriptdir}/plat-*/*.py
897 %{py_scriptdir}/bsddb/*.py
898 %{py_scriptdir}/ctypes/*.py
899 %{py_scriptdir}/ctypes/macholib/*.py
900 %{py_scriptdir}/compiler/*.py
901 %{py_scriptdir}/curses/*.py
902 %{py_scriptdir}/distutils/*.py
903 %{py_scriptdir}/distutils/command/*.py
904 %{py_scriptdir}/email/*.py
905 %{py_scriptdir}/email/mime/*.py
906 %{py_scriptdir}/hotshot/*.py
907 %{py_scriptdir}/json/*.py
908 %{py_scriptdir}/lib2to3/*.py
909 %{py_scriptdir}/lib2to3/fixes/*.py
910 %{py_scriptdir}/lib2to3/pgen2/*.py
911 %{py_scriptdir}/logging/*.py
912 %{py_scriptdir}/multiprocessing/*.py
913 %{py_scriptdir}/multiprocessing/dummy/*.py
914 %{py_scriptdir}/sqlite3/*.py
915 %{py_scriptdir}/wsgiref/*.py
916 %{py_scriptdir}/xml/*.py
917 %{py_scriptdir}/xml/dom/*.py
918 %{py_scriptdir}/xml/etree/*.py
919 %{py_scriptdir}/xml/parsers/*.py
920 %{py_scriptdir}/xml/sax/*.py
921 %{py_scriptdir}/encodings/*.py
922 %{py_scriptdir}/idlelib/*.py
923
924 %files devel-tools
925 %defattr(644,root,root,755)
926 %doc Lib/pdb.doc
927 /etc/shrc.d/python-devel*
928
929 %attr(755,root,root) %{py_dyndir}/_hotshot.so
930 %dir %{py_scriptdir}/hotshot
931 %{py_scriptdir}/hotshot/*.py[co]
932 %{py_scriptdir}/pdb.py[co]
933 %{py_scriptdir}/profile.py[co]
934 %{py_scriptdir}/pstats.py[co]
935 %{py_scriptdir}/timeit.py[co]
936
937 %files 2to3
938 %defattr(644,root,root,755)
939 %attr(755,root,root) %{_bindir}/2to3
940 %dir %{py_scriptdir}/lib2to3
941 %dir %{py_scriptdir}/lib2to3/fixes
942 %dir %{py_scriptdir}/lib2to3/pgen2
943 %{py_scriptdir}/lib2to3/*.py[co]
944 %{py_scriptdir}/lib2to3/*.pickle
945 %{py_scriptdir}/lib2to3/fixes/*.py[co]
946 %{py_scriptdir}/lib2to3/pgen2/*.py[co]
947
948 %files static
949 %defattr(644,root,root,755)
950 %{_libdir}/lib*.a
951
952 %files examples
953 %defattr(644,root,root,755)
954 %{_examplesdir}/%{name}-%{version}
955
956
957 %files doc
958 %defattr(644,root,root,755)
959 %doc python-%{dver}-docs-html/*
960 %{_docdir}/python-doc
961
962 %if %{with info}
963 %files doc-info
964 %defattr(644,root,root,755)
965 %{_infodir}/*.info*
966 %endif
967
968 %if %{with tkinter}
969 %files tkinter
970 %defattr(644,root,root,755)
971 %{py_scriptdir}/lib-tk
972 %attr(755,root,root) %{py_dyndir}/_tkinter.so
973 %endif
This page took 0.123441 seconds and 4 git commands to generate.