1 ##########################
2 # User-modifiable configs
3 ##########################
5 # Is the resulting package and the installed binary named "python" or
7 #WARNING: Commenting out doesn't work. Last line is what's used.
8 %define config_binsuffix none
9 %define config_binsuffix
2
11 # Build tkinter? "auto" enables it if /usr/bin/wish exists.
12 #WARNING: Commenting out doesn't work. Last line is what's used.
13 %define config_tkinter no
14 %define config_tkinter yes
15 %define config_tkinter auto
17 # Use pymalloc? The last line (commented or not) determines wether
19 #WARNING: Commenting out doesn't work. Last line is what's used.
20 %define config_pymalloc yes
21 %define config_pymalloc no
24 #WARNING: Commenting out doesn't work. Last line is what's used.
25 %define config_ipv6 yes
26 %define config_ipv6 no
28 #################################
29 # End of user-modifiable configs
30 #################################
38 # kludge to get around rpm <percent>define weirdness
39 %define ipv6 %
(if [ "
%{config_ipv6}"
= yes
]; then echo --enable-ipv6
; else echo --disable
-ipv6
; fi)
40 %define pymalloc %
(if [ "
%{config_pymalloc}"
= yes
]; then echo --with
-pymalloc
; else echo --without
-pymalloc
; fi)
41 %define binsuffix %
(if [ "
%{config_binsuffix}" = none ]; then echo ; else echo "%{config_binsuffix}"
; fi)
42 %define include_tkinter %
(if [ \\
( "
%{config_tkinter}" = auto -a -f /usr/bin/wish \\) -o "%{config_tkinter}"
= yes
]; then echo 1; else echo 0; fi)
44 Summary: An interpreted
, interactive
, object
-oriented programming language.
45 Name: %{name}%{binsuffix}
48 Copyright: Modified CNRI Open
Source License
49 Group: Development
/Languages
50 Source: Python
-%{version}.tgz
51 Source1: html
-%{version}.tar.bz2
52 Source2: info
-%{version}.tar.bz2
53 Patch0: Python
-2.1-pythonpath.patch
54 Patch1: Python
-2.1-expat.patch
55 BuildRoot: /var
/tmp
/%{name}-%{version}-root
56 BuildPrereq
: expat
-devel
57 BuildPrereq
: db1
-devel
58 BuildPrereq
: gdbm
-devel
60 Packager: Sean Reifschneider
<jafo
-rpms@tummy.com
>
63 Python is an interpreted
, interactive
, object
-oriented programming
64 language. It incorporates modules
, exceptions
, dynamic typing
, very high
65 level dynamic data types
, and classes. Python combines remarkable power
66 with very clear syntax. It has interfaces to many system calls and
67 libraries
, as well as to various window systems
, and is extensible
in C or
68 C
++. It is also usable as an extension language
for applications that need
69 a programmable interface. Finally
, Python is portable
: it runs on many
70 brands of UNIX
, on PCs under Windows
, MS
-DOS
, and OS
/2, and on the
74 Summary: The libraries and header files needed
for Python extension development.
75 Prereq
: python
%{binsuffix} = %{PACKAGE_VERSION}
76 Group: Development
/Libraries
79 The Python programming language's interpreter can be extended with
80 dynamically loaded extensions and can be embedded
in other programs.
81 This package contains the header files and libraries needed to
do
84 Install python
-devel
if you want to develop Python extensions. The
85 python package will also need to be installed. You'll probably also
86 want to
install the python
-docs package
, which contains Python
89 %if %{include_tkinter}
91 Summary: A graphical user interface
for the Python scripting language.
92 Group: Development
/Languages
93 Prereq
: python
%{binsuffix} = %{PACKAGE_VERSION}-%{release}
96 The Tkinter
(Tk interface
) program is an graphical user interface
for
97 the Python scripting language.
99 You should
install the tkinter package
if you'd like to use a graphical
100 user interface
for Python programming.
104 Summary: A collection of development tools included with Python.
105 Group: Development
/Tools
106 Prereq
: python
%{binsuffix} = %{PACKAGE_VERSION}-%{release}
109 The Python package includes several development tools that are used
110 to build python programs. This package contains a selection of those
111 tools
, including the IDLE Python IDE.
113 Install python
-tools
if you want to use these tools to develop
114 Python programs. You will also need to
install the python and
118 Summary: Python
-related documentation.
119 Group: Development
/Documentation
122 Documentation relating to the Python programming language
in HTML and info
126 * Sun Dec
23 2001 Sean Reifschneider
<jafo
-rpms@tummy.com
>
128 - Added
-docs package.
129 - Added "auto" config_tkinter setting which only enables tk
if
130 /usr
/bin
/wish exists.
132 * Sat Dec
22 2001 Sean Reifschneider
<jafo
-rpms@tummy.com
>
135 - Changed the extension to "
2" from "
2.2".
137 * Tue Nov
18 2001 Sean Reifschneider
<jafo
-rpms@tummy.com
>
141 * Thu Nov
1 2001 Sean Reifschneider
<jafo
-rpms@tummy.com
>
143 - Changed the way the sed
for fixing the
#! in pydoc works.
145 * Wed Oct
24 2001 Sean Reifschneider
<jafo
-rpms@tummy.com
>
147 - Fixed missing "email" package
, thanks to anonymous report on sourceforge.
148 - Fixed missing "compiler" package.
150 * Mon Oct
22 2001 Sean Reifschneider
<jafo
-rpms@tummy.com
>
154 * Mon Oct
9 2001 Sean Reifschneider
<jafo
-rpms@tummy.com
>
156 - otto@balinor.mat.unimi.it mentioned that the license file is missing.
158 * Sun Sep
30 2001 Sean Reifschneider
<jafo
-rpms@tummy.com
>
160 - Ignacio Vazquez
-Abrams pointed out that I had a spruious double
-quote
in
161 the spec files. Thanks.
163 * Wed Jul
25 2001 Sean Reifschneider
<jafo
-rpms@tummy.com
>
165 - Updated to
2.2a1 release.
166 - Changed idle and pydoc to use binsuffix macro
172 %setup -n Python
-%{version}
180 .
/configure
%{ipv6} %{pymalloc} --prefix=%{__prefix}
187 # set the install path
188 echo '
[install_scripts
]'
>setup.cfg
189 echo 'install_dir
='"$
{RPM_BUILD_ROOT
}/usr
/bin"
>>setup.cfg
191 [ -d "$RPM_BUILD_ROOT"
-a "$RPM_BUILD_ROOT"
!= "
/"
] && rm -rf $RPM_BUILD_ROOT
192 mkdir -p $RPM_BUILD_ROOT
%{__prefix}/lib/python%{libvers}/lib
-dynload
193 make prefix
=$RPM_BUILD_ROOT
%{__prefix} install
195 # REPLACE PATH IN PYDOC
196 if [ ! -z "
%{binsuffix}"
]
199 cd $RPM_BUILD_ROOT
%{__prefix}/bin
201 sed 's|
#!.*|#!/usr/bin/env python'%{binsuffix}'|' \
209 if [ ! -z "
%{binsuffix}"
]
211 ( cd $RPM_BUILD_ROOT
%{__prefix}/bin
; rm -f python
[0-9a
-zA
-Z
]*;
212 mv
-f python python"
%{binsuffix}"
)
213 ( cd $RPM_BUILD_ROOT
%{__prefix}/man/man1; mv python.1 python%{binsuffix}.1 )
214 ( cd $RPM_BUILD_ROOT
%{__prefix}/bin; mv -f pydoc pydoc"%{binsuffix}"
)
219 echo '
#!/bin/bash' >${RPM_BUILD_ROOT}%{_bindir}/idle%{binsuffix}
220 echo '
exec %{_prefix}/bin/python%{binsuffix} /usr/lib/python%{libvers}/Tools/idle/idle.py' >>$RPM_BUILD_ROOT%{_bindir}/idle%{binsuffix}
221 chmod
755 $RPM_BUILD_ROOT
%{_bindir}/idle%{binsuffix}
222 cp
-a Tools $RPM_BUILD_ROOT
%{_prefix}/lib/python%{libvers}
226 find "$RPM_BUILD_ROOT""
%{__prefix}"/lib/python%{libvers}/lib
-dynload
-type f |
227 sed "s|^$
{RPM_BUILD_ROOT
}|
/|" |
228 grep
-v
-e '_tkinter.so$'
>mainpkg.files
229 find "$RPM_BUILD_ROOT""
%{__prefix}"
/bin
-type f |
230 sed "s|^$
{RPM_BUILD_ROOT
}|
/|" |
231 grep
-v
-e '
/bin
/idle
%{binsuffix}$'
>>mainpkg.files
234 find "$RPM_BUILD_ROOT""
%{__prefix}"/lib/python%{libvers}/Tools
-type f |
235 sed "s|^$
{RPM_BUILD_ROOT
}|
/|"
>tools.files
236 echo "
%{__prefix}"/bin/idle%{binsuffix} >>tools.files
240 mkdir -p "$RPM_BUILD_ROOT"
/var
/www
/html
/python
242 cd "$RPM_BUILD_ROOT"
/var
/www
/html
/python
243 bunzip2
< %{SOURCE1} | tar x
245 mkdir -p "$RPM_BUILD_ROOT"
/usr
/share
/info
247 cd "$RPM_BUILD_ROOT"
/usr
/share
/info
248 bunzip2
< %{SOURCE2} | tar x
255 rm -fr $RPM_BUILD_ROOT
256 rm -f mainpkg.files tools.files
261 %files -f mainpkg.files
262 %defattr(-,root
,root
)
263 %doc Misc
/README Misc
/HYPE Misc
/cheatsheet Misc
/unicode.txt Misc
/Porting
264 %doc LICENSE Misc
/ACKS Misc
/BLURB.
* Misc
/HISTORY Misc
/NEWS
265 %{__prefix}/man/man1/python%{binsuffix}.1.gz
267 %dir %{__prefix}/include/python%{libvers}
268 %dir %{__prefix}/lib/python%{libvers}/
269 %{__prefix}/lib/python%{libvers}/*.txt
270 %{__prefix}/lib/python%{libvers}/*.py
*
271 %{__prefix}/lib/python%{libvers}/pdb.doc
272 %{__prefix}/lib/python%{libvers}/profile.doc
273 %{__prefix}/lib/python%{libvers}/curses
274 %{__prefix}/lib/python%{libvers}/distutils
275 %{__prefix}/lib/python%{libvers}/encodings
276 %dir %{__prefix}/lib/python%{libvers}/lib
-old
277 %{__prefix}/lib/python%{libvers}/plat
-linux2
278 %{__prefix}/lib/python%{libvers}/site
-packages
279 %{__prefix}/lib/python%{libvers}/test
280 %{__prefix}/lib/python%{libvers}/xml
281 %{__prefix}/lib/python%{libvers}/email
282 %{__prefix}/lib/python%{libvers}/compiler
285 %defattr(-,root
,root
)
286 %{__prefix}/include/python%{libvers}/*.h
287 %{__prefix}/lib/python%{libvers}/config
289 %files -f tools.files tools
290 %defattr(-,root
,root
)
292 %if %{include_tkinter}
294 %defattr(-,root
,root
)
295 %{__prefix}/lib/python%{libvers}/lib
-tk
296 %{__prefix}/lib/python%{libvers}/lib
-dynload
/_tkinter.so
*
300 %defattr(-,root
,root
)