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