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