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