]> git.pld-linux.org Git - packages/python.git/blob - python.spec
- use standard names for macros
[packages/python.git] / python.spec
1
2 %define py_ver         2.1
3 %define py_prefix      %{_prefix}
4 %define py_libdir      %{py_prefix}/lib/python%{py_ver}
5 %define py_sitedir     %{py_libdir}/site-packages
6 %define py_dyndir      %{py_libdir}/lib-dynload
7 %define py_comp        ./python -c "import compileall; import sys; compileall.compile_dir(sys.argv[1], ddir=sys.argv[1][len('$RPM_BUILD_ROOT'):])"
8 %define py_ocomp       ./python -O -c "import compileall; import sys; compileall.compile_dir(sys.argv[1], ddir=sys.argv[1][len('$RPM_BUILD_ROOT'):])"
9  
10 Summary:        Very high level scripting language with X interface
11 Summary(de):    Very High-Level-Script-Sprache mit X-Oberfläche
12 Summary(fr):    Langage de script de tés haut niveau avec interface X
13 Summary(pl):    Python - jêzyk obiektowy wysokiego poziomu
14 Summary(tr):    X arayüzlü, yüksek düzeyli, kabuk yorumlayýcý dili
15 Name:           python
16 Version:        %{py_ver}.1
17 Release:        4
18 License:        PSF
19 Group:          Development/Languages/Python
20 Group(de):      Entwicklung/Sprachen/Python
21 Group(pl):      Programowanie/Jêzyki/Python
22 URL:            http://www.python.org/
23 Source0:        http://prdownloads.sourceforge.net/python/Python-%{version}.tgz
24 Source1:        http://www.python.org/ftp/python/doc/%{version}/html-%{version}.tar.bz2
25 Source2:        %{name}-setup.dist
26 Patch0:         %{name}-shared-lib.patch
27 Patch1:         %{name}-dl_global.patch
28 Patch2:         %{name}-setup-install.patch
29 Patch3:         %{name}-readline.patch
30 Patch4:         %{name}-pythonpath.patch
31 Patch5:         %{name}-notermcap.patch
32 Patch6:         %{name}-ac25x.patch
33 Patch7:         %{name}-default_encoding.patch
34 BuildRequires:  XFree86-devel
35 BuildRequires:  expat-devel
36 BuildRequires:  gdbm-devel >= 1.0.8-7
37 BuildRequires:  ncurses-devel >= 5.2
38 BuildRequires:  openssl-devel >= 0.9.6b
39 BuildRequires:  readline-devel >= 4.2
40 BuildRequires:  tix-devel
41 BuildRequires:  tk-devel >= 8.3.2
42 BuildRequires:  tcl-devel >= 8.3.2
43 BuildRequires:  zlib-devel
44 BuildRequires:  gmp-devel >= 3.1.1
45 BuildRequires:  db3-devel
46 BuildRequires:  autoconf
47 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
48 Obsoletes:      python-xml
49 Obsoletes:      python-intl
50 Obsoletes:      python-curses
51 Obsoletes:      python-gdbm
52 Obsoletes:      python-zlib
53 Obsoletes:      python2
54 Obsoletes:      python2-devel
55
56 %description
57 Python is an interpreted, interactive, object-oriented programming
58 language. It incorporates modules, exceptions, dynamic typing, very
59 high level dynamic data types, and classes. Python combines remarkable
60 power with very clear syntax. It has interfaces to many system calls
61 and libraries, as well as to various window systems, and is extensible
62 in C or C++. It is also usable as an extension language for
63 applications that need a programmable interface. Finally, Python is
64 portable: it runs on many brands of UNIX, on the Mac, and on PCs under
65 MS-DOS, Windows, Windows NT, and OS/2.
66
67 %description -l de
68 Python ist eine interpretierte, interaktive, objektorientierte
69 Programmiersprache, vergleichbar zu Tcl, Perl, Scheme oder Java.
70 Python enthält Module, Klassen, Exceptions, High-Level dynamische
71 Datentypen und dynamisches Typisieren. Python unterstützt Interfaces
72 zu vielen Systemaufrufen und Libraries, sowie verschiedene
73 Fenstersysteme (X11, Motif, Tk, Mac und MFC)
74
75 Programmierer können neue built-in-Module für Python in C oder C++
76 schreiben. Python kann auch als Erweiterungssprache für Applikationen
77 benutzt werden, die ein programmierbares Interface brauchen. Dieses
78 Paket enthält die meisten Standard-Python-Module, und Module zum
79 Ansprechen von Tix (Tk-widget set) und RPM.
80
81 Dokumentationen zu Python sind in python-doc enthalten.
82
83 %description -l fr
84 Python est un langage de script interprété et orienté objet. Il gère
85 le chargement dynamique des objets, les classes, les modules et les
86 exceptions. L'ajout d'interfaces aux nouvelles bibliothèques systèmes
87 avec du code C est simple, ce qui rend Python facile à utiliser dans
88 des configs personnalisées.
89
90 Ce paquetage Python contient la plupart des modules Python standards,
91 ainsi que ceux permettant l'interfaçage avec les widgets Tix pour Tk
92 et RPM.
93
94 %description -l pl
95 Python jest interpretowanym, interaktywnym i zorientowanym obiektowo
96 jêzykiem programowania. Jest modularny, obs³uguje wyj±tki, dynamiczne
97 typy, zaawansowane dynamiczne struktury danych i klasy. Python ³±czy w
98 sobie du¿e mo¿liwo¶ci i przejrzyst± sk³adniê. Posiada interfejsy do
99 wielu wywo³añ systemowych i bibliotek, w tym równie¿ do ró¿nych
100 bibliotek okienkowych. Mo¿liwo¶ci jego mo¿na jeszcze rozszerzaæ
101 poprzez odpowiednie modu³y pisane w C lub C++. Python mo¿e byæ równie¿
102 u¿yty jako element aplikacji, którym potrzebny jest interpreter do
103 skryptów. I wreszcie, Python jest wieloplatformowy, dzia³a na wielu
104 odmianach UNIX-a, Macu oraz PC pod DOS-em, Windows, WindowsNT oraz
105 OS/2.
106
107 %description -l tr
108 Python, nesneye yönelik bir kabuk yorumlayýcýdýr. Nesnelerin,
109 sýnýflarýn, modüllerin ve aykýrý durumlarýn dinamik yüklenmelerine
110 destek verir. C koduyla birlikte kullanýmý son derece kolaydýr. Bu
111 paket, standart Python birimlerinin çoðunun yanýsýra Tk ve RPM için
112 arayüz birimlerini de içerir.
113
114 %package devel
115 Summary:        Libraries and header files for building python code
116 Summary(de):    Libraries und Header-Dateien zum Erstellen von Python-Code
117 Summary(fr):    Bibliothèques et en-têtes pour construire du code python
118 Summary(pl):    Pliki nag³ówkowe i biblioteki Pythona
119 Summary(tr):    Python ile geliþtirme yapmak için gerekli dosyalar
120 Group:          Development/Languages/Python
121 Group(de):      Entwicklung/Sprachen/Python
122 Group(pl):      Programowanie/Jêzyki/Python
123 Requires:       %{name} = %{version}
124
125 %description devel
126 The Python interpreter is relatively easy to extend with dynamically
127 loaded extensions and to embed in other programs. This packages
128 contains the header files and libraries which are needed to do both of
129 these tasks.
130
131 %description -l de devel
132 Der Python-Interpretierer ist relativ einfach anhand von dynamisch
133 ladbaren Erweiterungen auszubauen und läßt sich in andere Programme
134 integrieren. Dieses Paket enthält die Header-Dateien und Libraries,
135 die für beide Aufgaben erforderlich sind.
136
137 %description -l fr devel
138 L'interpréteur Python est relativement facile à étendre avec des
139 extensions chargées dynamiquement et à insérer dans d'autres
140 programmes. Ce paquetage contient les en-têtes et les bibliothèques
141 nécessaires à ces deux tâches.
142
143 %description -l pl devel
144 Wszystko co potrzebne, aby napisaæ w C/C++ modu³ rozszerzaj±cy
145 mo¿liwo¶ci Pythona. S± tu równie¿ wersje ¼ród³owe modu³ów ze
146 standardowej biblioteki.
147
148 %description -l tr devel
149 Bu paket, Python ile geliþtirme yapýlabilmesi için gerekli baþlýk
150 dosyalarýný ve kitaplýklarý içerir.
151
152 %package static
153 Summary:        Static python library
154 Summary(pl):    Statyczna biblioteka Pythona
155 Group:          Development/Languages/Python
156 Group(de):      Entwicklung/Sprachen/Python
157 Group(pl):      Programowanie/Jêzyki/Python
158 Requires:       %{name}-devel = %{version}
159
160 %description static
161 Static python library.
162
163 %description static -l pl
164 Statyczna biblioteka Pythona.
165
166 %package doc
167 Summary:        Documentation on Python
168 Summary(de):    Dokumentation zu Python 
169 Summary(fr):    Documentation sur Python
170 Summary(pl):    Dokumentacja do Pythona 
171 Summary(tr):    Python belgeleri
172 Group:          Development/Languages
173 Group(de):      Entwicklung/Sprachen
174 Group(pl):      Programowanie/Jêzyki
175 Requires:       %{name} = %{version}
176 Obsoletes:      python-docs
177
178 %description doc
179 This package contains documentation on the Python language and
180 interpretor as a mix of plain ASCII files and LaTeX sources.
181
182 %description -l de doc
183 Dieses Paket enthält Dokumentationen zu Python (Sprache und
184 Interpreter) in Form von einfachen ASCII-Dateien und LaTeX-Quellen.
185
186 %description -l fr doc
187 Ce paquetage contient la documentation sur le langage python et sur
188 son interpréteur sous forme de fichiers ASCII et LaTeX.
189
190 %description -l pl doc
191 Oficjalna dokumentacja do Pythona. Zawiera przyk³adowe programy,
192 narzêdzia i dokumentacjê. Strony podrêcznika man znajduj± siê w
193 g³ównym pakiecie. Ten pakiet nie zawiera ¼róde³ dokumentacji
194 napisanych w LaTeX'u, tylko gotowe do wykorzystania pliki
195 postscript'owe i HTML.
196
197 %description -l tr doc
198 Bu paket, Python dili ile ilgili belgeleri ve düz ASCII dosyalarý ve
199 LaTeX kaynaklarýnýn bir karýþýmý olan yorumlayýcýyý içerir.
200
201 #%package without-thread
202 #Summary:       Python without threads
203 #Summary(pl):   Pyton bez w±tków
204 #Group:          Development/Languages
205 #Group(de):      Entwicklung/Sprachen
206 #Group(pl):      Programowanie/Jêzyki
207 #Requires:       %{name} = %{version}
208 #Obsoletes:      python-without-thread
209
210 #%description without-thread
211 #This package is rather needed for apache-mod_python module.
212 #Other ways of use are unknown.
213
214 #%description -l pl without-thread
215 #Pyton bez w±tków jest w³a¶ciwie potrzebny
216 #tylko modu³owi apache-mod_python, bo apache nie
217 #ich na razie nie wspiera.
218
219 %package -n tkinter
220 Summary:        Lowlevel Python -> Tk Interface
221 Summary(de):    Grafischer Oberfläche für Python
222 Summary(fr):    Interface graphique pour python.
223 Summary(pl):    Modu³y niskiego poziomu dla pakietu Python-tkinter
224 Summary(tr):    Python için grafik kullanýcý arayüzü
225 Group:          Development/Languages/Python
226 Group(de):      Entwicklung/Sprachen/Python
227 Group(pl):      Programowanie/Jêzyki/Python
228 Requires:       %{name} = %{version}
229 Requires:       tcl >= 8.0.3 
230 Requires:       tk  >= 8.0.3
231 Requires:       tix >= 4.1.0.6
232
233 %description -n tkinter
234 This is the lowlevel C module that interfaces Tk and which is the
235 basis for the Tkinter, Python's OO interface to Tk, which is included
236 in the package python-tkinter.
237
238 The only reason this file is removed from python-tkinter, is to make
239 it more easy to replay _tkinter with a PIL (Python Imaging Libary)
240 aware version of it. Look at my PIL distribution.
241
242 %description -l de -n tkinter
243 Eine grafische Schnittstelle für Python, basierend auf Tcl/Tk, und von
244 vielen Konfigurations-Tools genutzt.
245
246 %description -l fr -n tkinter
247 Interface graphique pour Python, basée sur Tcl/Tk et utilisée par
248 beaucoup des outils de configuration.
249
250 %description -l pl -n tkinter 
251 Ten pakiet zawiera modu³y w C, które po¶rednicz± w wywo³aniach
252 pomiêdzy samym Tk a modu³em Tkinter bêd±cym g³ównym interfejsem Tk dla
253 Pythona.
254
255 Jedynym powodem wydzielenia tego pakietu jest u³atwienie wymiany go na
256 PIL (Python Imaging Library).
257
258 %description -l tr -n tkinter
259 Python için Tcl/Tk'ye dayalý ve pek çok ayarlama aracý tarafýndan
260 kullanýlan grafik bir arayüzdür.
261
262 %package old
263 Summary:        Depreciated Python modules
264 Summary(pl):    Nieaktualne modu³y jêzyka Python
265 Group:          Development/Languages/Python
266 Group(de):      Entwicklung/Sprachen/Python
267 Group(pl):      Programowanie/Jêzyki/Python
268 Requires:       python = %{version}
269
270 %description old
271 Install this package when one of your program written in Python is old
272 as Miss Universum of 1918, who only you want to see... ooops, which
273 only you want to run.
274
275 %description -l pl old
276 Zainstaluj ten pakiet, wtedy kiedy jeden z Twoich programów napisanych
277 w jêzyku Python jest tak stary jak Miss Universum z roku 1918, któr±
278 tylko ty chcesz zobaczyæ... przepraszam, który tylko ty chcesz
279 uruchomiæ.
280
281 %prep
282 %setup -q -n Python-%{version}
283 %patch0 -p1
284 %patch1 -p1
285 %patch2 -p1
286 %patch3 -p1
287 %patch4 -p1
288 %patch5 -p1
289 %patch6 -p1
290 %patch7 -p1
291
292 install -d html-doc
293 tar -xf %{SOURCE1} --use=bzip2 -C html-doc
294
295 install %{SOURCE2} Modules/Setup
296
297 %build
298 export POSIXLY_CORRECT=TRUE
299
300 echo ': ${LDSHARED='gcc -shared'}' > config.cache
301 echo ': ${LINKFORSHARED='-rdynamic'}' >> config.cache
302 echo ': ${CCSHARED='-fPIC'}' >> config.cache
303
304 autoconf
305
306 CPPFLAGS="-I%{_includedir}/ncurses -I%{_includedir}/db3"; export CPPFLAGS
307 %configure \
308         --with-threads 
309
310 %{__make} OPT="%{rpmcflags} -D_REENTRANT"
311
312 %install
313 rm -rf $RPM_BUILD_ROOT
314 install -d $RPM_BUILD_ROOT{%{_bindir},%{_libdir},%{_mandir}}
315
316 export LD_LIBRARY_PATH=$(pwd)
317 %{__make} install \
318         BINDIR=$RPM_BUILD_ROOT%{_bindir} \
319         SCRIPTDIR=$RPM_BUILD_ROOT%{_libdir} \
320         LIBDIR=$RPM_BUILD_ROOT%{_libdir} \
321         MANDIR=$RPM_BUILD_ROOT%{_mandir} \
322         INCLUDEDIR=$RPM_BUILD_ROOT%{_includedir} \
323         CONFINCLUDEDIR=$RPM_BUILD_ROOT%{_includedir}
324
325 install libpython%{py_ver}.a $RPM_BUILD_ROOT%{_libdir}
326
327 %py_comp $RPM_BUILD_ROOT%{py_libdir}
328 %py_ocomp $RPM_BUILD_ROOT%{py_libdir}
329
330 rm -f $RPM_BUILD_ROOT%{_bindir}/python%{py_ver}
331 ln -sf libpython%{py_ver}.a $RPM_BUILD_ROOT%{_libdir}/libpython.a
332
333 gzip -9nf Misc/{ACKS,BLURB,BLURB.LUTZ,NEWS,HYPE,README,unicode.txt}
334
335 %clean
336 rm -rf $RPM_BUILD_ROOT
337
338 %post   -p /sbin/ldconfig
339 %postun -p /sbin/ldconfig
340
341 %files 
342 %defattr(644,root,root,755)
343 %attr(755,root,root) %{_bindir}/*
344 %attr(755,root,root) %{_libdir}/libpython*so.*
345 %{_mandir}/man1/*
346
347 %dir %{py_sitedir}
348 %dir %{py_libdir}
349 %{py_libdir}/*.py?
350  
351 %dir %{py_dyndir}
352 %attr(755,root,root) %{py_dyndir}/[a-z]*.so
353 %attr(755,root,root) %{py_dyndir}/_te*.so
354 %attr(755,root,root) %{py_dyndir}/_[a-su-z]*.so
355
356 %dir %{py_libdir}/plat-*
357 %attr(755,root,root) %{py_libdir}/plat-*/regen
358 %{py_libdir}/plat-*/*.py?
359
360 %dir %{py_libdir}/curses
361 %{py_libdir}/curses/*.py?
362
363 %dir %{py_libdir}/distutils
364 %{py_libdir}/distutils/*.py?
365
366 %dir %{py_libdir}/distutils/command
367 %{py_libdir}/distutils/command/*.py?
368
369 %dir %{py_libdir}/encodings
370 %{py_libdir}/encodings/*.py?
371
372 %dir %{py_libdir}/xml
373 %{py_libdir}/xml/*.py?
374
375 %dir %{py_libdir}/xml/parsers
376 %{py_libdir}/xml/parsers/*.py?
377
378 %dir %{py_libdir}/xml/sax
379 %{py_libdir}/xml/sax/*.py?
380
381 %dir %{py_libdir}/xml/dom
382 %{py_libdir}/xml/dom/*.py?
383
384 %files devel
385 %defattr(644,root,root,755)
386 %doc Misc/*.gz
387 %attr(755,root,root) %{_libdir}/lib*.so
388 %dir %{_includedir}/python%{py_ver}
389 %{_includedir}/python%{py_ver}/*.h
390 %attr(-,root,root) %{py_libdir}/*.py
391 %{py_libdir}/plat-*/*.py
392 %{py_libdir}/curses/*.py
393 %{py_libdir}/distutils/*.py
394 %{py_libdir}/distutils/command/*.py
395 %{py_libdir}/xml/*.py
396 %{py_libdir}/xml/parsers/*.py
397 %{py_libdir}/xml/sax/*.py
398 %{py_libdir}/xml/dom/*.py
399 %{py_libdir}/encodings/*.py
400
401 %dir %{py_libdir}/config
402 %attr(755,root,root) %{py_libdir}/config/makesetup
403 %attr(755,root,root) %{py_libdir}/config/install-sh
404 %{py_libdir}/config/Makefile
405 %{py_libdir}/config/Makefile.pre.in
406 %{py_libdir}/config/Setup
407 %{py_libdir}/config/Setup.config
408 %{py_libdir}/config/Setup.local
409 %{py_libdir}/config/config.c
410 %{py_libdir}/config/config.c.in
411 %{py_libdir}/config/python.o
412
413 %files static
414 %defattr(644,root,root,755)
415 %{_libdir}/lib*.a
416
417 %files doc
418 %defattr(644,root,root,755)
419 %doc html-doc/*
420 %dir %{py_libdir}/test
421 %attr(-,root,root) %{py_libdir}/test/*
422
423 %files -n tkinter
424 %defattr(644,root,root,755)
425
426 %{py_libdir}/lib-tk
427 %attr(755,root,root) %{py_dyndir}/_tkinter.so
428
429 %files old
430 %defattr(644,root,root,755)
431
432 %dir %{py_libdir}/lib-old
433 %{py_libdir}/lib-old/*.py?
This page took 0.062655 seconds and 4 git commands to generate.