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