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