Guido van Rossum | 2ef777f | 2003-02-24 01:09:53 +0000 | [diff] [blame] | 1 | ########################## |
| 2 | # User-modifiable configs |
| 3 | ########################## |
| 4 | |
| 5 | # Is the resulting package and the installed binary named "python" or |
| 6 | # "python2"? |
| 7 | #WARNING: Commenting out doesn't work. Last line is what's used. |
| 8 | %define config_binsuffix none |
Anthony Baxter | b245479 | 2006-08-18 07:30:07 +0000 | [diff] [blame] | 9 | %define config_binsuffix 2.6 |
Guido van Rossum | 2ef777f | 2003-02-24 01:09:53 +0000 | [diff] [blame] | 10 | |
| 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 |
| 16 | |
| 17 | # Use pymalloc? The last line (commented or not) determines wether |
| 18 | # pymalloc is used. |
| 19 | #WARNING: Commenting out doesn't work. Last line is what's used. |
| 20 | %define config_pymalloc no |
| 21 | %define config_pymalloc yes |
| 22 | |
| 23 | # Enable IPV6? |
| 24 | #WARNING: Commenting out doesn't work. Last line is what's used. |
| 25 | %define config_ipv6 yes |
| 26 | %define config_ipv6 no |
| 27 | |
Sean Reifschneider | 054541e | 2004-10-21 23:35:45 +0000 | [diff] [blame] | 28 | # Location of the HTML directory. |
| 29 | %define config_htmldir /var/www/html/python |
| 30 | |
Guido van Rossum | 2ef777f | 2003-02-24 01:09:53 +0000 | [diff] [blame] | 31 | ################################# |
| 32 | # End of user-modifiable configs |
| 33 | ################################# |
| 34 | |
| 35 | %define name python |
Anthony Baxter | b245479 | 2006-08-18 07:30:07 +0000 | [diff] [blame] | 36 | %define version 2.6a1 |
| 37 | %define libvers 2.6 |
Anthony Baxter | ebed3f6 | 2006-04-03 15:03:44 +0000 | [diff] [blame] | 38 | %define release 1pydotorg |
Guido van Rossum | 2ef777f | 2003-02-24 01:09:53 +0000 | [diff] [blame] | 39 | %define __prefix /usr |
| 40 | |
| 41 | # kludge to get around rpm <percent>define weirdness |
| 42 | %define ipv6 %(if [ "%{config_ipv6}" = yes ]; then echo --enable-ipv6; else echo --disable-ipv6; fi) |
| 43 | %define pymalloc %(if [ "%{config_pymalloc}" = yes ]; then echo --with-pymalloc; else echo --without-pymalloc; fi) |
| 44 | %define binsuffix %(if [ "%{config_binsuffix}" = none ]; then echo ; else echo "%{config_binsuffix}"; fi) |
| 45 | %define include_tkinter %(if [ \\( "%{config_tkinter}" = auto -a -f /usr/bin/wish \\) -o "%{config_tkinter}" = yes ]; then echo 1; else echo 0; fi) |
Sean Reifschneider | 054541e | 2004-10-21 23:35:45 +0000 | [diff] [blame] | 46 | %define libdirname %(( uname -m | egrep -q '_64$' && [ -d /usr/lib64 ] && echo lib64 ) || echo lib) |
Guido van Rossum | 2ef777f | 2003-02-24 01:09:53 +0000 | [diff] [blame] | 47 | |
Martin v. Löwis | 52da449 | 2003-10-19 18:34:52 +0000 | [diff] [blame] | 48 | # detect if documentation is available |
| 49 | %define include_docs %(if [ -f "%{_sourcedir}/html-%{version}.tar.bz2" ]; then echo 1; else echo 0; fi) |
| 50 | |
Guido van Rossum | 2ef777f | 2003-02-24 01:09:53 +0000 | [diff] [blame] | 51 | Summary: An interpreted, interactive, object-oriented programming language. |
| 52 | Name: %{name}%{binsuffix} |
| 53 | Version: %{version} |
| 54 | Release: %{release} |
| 55 | Copyright: Modified CNRI Open Source License |
| 56 | Group: Development/Languages |
Sean Reifschneider | 054541e | 2004-10-21 23:35:45 +0000 | [diff] [blame] | 57 | Source: Python-%{version}.tar.bz2 |
Martin v. Löwis | 52da449 | 2003-10-19 18:34:52 +0000 | [diff] [blame] | 58 | %if %{include_docs} |
Guido van Rossum | 2ef777f | 2003-02-24 01:09:53 +0000 | [diff] [blame] | 59 | Source1: html-%{version}.tar.bz2 |
Martin v. Löwis | 52da449 | 2003-10-19 18:34:52 +0000 | [diff] [blame] | 60 | %endif |
| 61 | BuildRoot: %{_tmppath}/%{name}-%{version}-root |
Guido van Rossum | 2ef777f | 2003-02-24 01:09:53 +0000 | [diff] [blame] | 62 | BuildPrereq: expat-devel |
| 63 | BuildPrereq: db4-devel |
| 64 | BuildPrereq: gdbm-devel |
Anthony Baxter | ebed3f6 | 2006-04-03 15:03:44 +0000 | [diff] [blame] | 65 | BuildPrereq: sqlite-devel |
Guido van Rossum | 2ef777f | 2003-02-24 01:09:53 +0000 | [diff] [blame] | 66 | Prefix: %{__prefix} |
| 67 | Packager: Sean Reifschneider <jafo-rpms@tummy.com> |
| 68 | |
| 69 | %description |
| 70 | Python is an interpreted, interactive, object-oriented programming |
| 71 | language. It incorporates modules, exceptions, dynamic typing, very high |
| 72 | level dynamic data types, and classes. Python combines remarkable power |
| 73 | with very clear syntax. It has interfaces to many system calls and |
| 74 | libraries, as well as to various window systems, and is extensible in C or |
| 75 | C++. It is also usable as an extension language for applications that need |
| 76 | a programmable interface. Finally, Python is portable: it runs on many |
| 77 | brands of UNIX, on PCs under Windows, MS-DOS, and OS/2, and on the |
| 78 | Mac. |
| 79 | |
| 80 | %package devel |
| 81 | Summary: The libraries and header files needed for Python extension development. |
| 82 | Prereq: python%{binsuffix} = %{PACKAGE_VERSION} |
| 83 | Group: Development/Libraries |
| 84 | |
| 85 | %description devel |
| 86 | The Python programming language's interpreter can be extended with |
| 87 | dynamically loaded extensions and can be embedded in other programs. |
| 88 | This package contains the header files and libraries needed to do |
| 89 | these types of tasks. |
| 90 | |
| 91 | Install python-devel if you want to develop Python extensions. The |
| 92 | python package will also need to be installed. You'll probably also |
| 93 | want to install the python-docs package, which contains Python |
| 94 | documentation. |
| 95 | |
| 96 | %if %{include_tkinter} |
| 97 | %package tkinter |
| 98 | Summary: A graphical user interface for the Python scripting language. |
| 99 | Group: Development/Languages |
| 100 | Prereq: python%{binsuffix} = %{PACKAGE_VERSION}-%{release} |
| 101 | |
| 102 | %description tkinter |
| 103 | The Tkinter (Tk interface) program is an graphical user interface for |
| 104 | the Python scripting language. |
| 105 | |
| 106 | You should install the tkinter package if you'd like to use a graphical |
| 107 | user interface for Python programming. |
| 108 | %endif |
| 109 | |
| 110 | %package tools |
| 111 | Summary: A collection of development tools included with Python. |
| 112 | Group: Development/Tools |
| 113 | Prereq: python%{binsuffix} = %{PACKAGE_VERSION}-%{release} |
| 114 | |
| 115 | %description tools |
| 116 | The Python package includes several development tools that are used |
| 117 | to build python programs. This package contains a selection of those |
| 118 | tools, including the IDLE Python IDE. |
| 119 | |
| 120 | Install python-tools if you want to use these tools to develop |
| 121 | Python programs. You will also need to install the python and |
| 122 | tkinter packages. |
| 123 | |
Martin v. Löwis | 52da449 | 2003-10-19 18:34:52 +0000 | [diff] [blame] | 124 | %if %{include_docs} |
Guido van Rossum | 2ef777f | 2003-02-24 01:09:53 +0000 | [diff] [blame] | 125 | %package docs |
| 126 | Summary: Python-related documentation. |
| 127 | Group: Development/Documentation |
| 128 | |
| 129 | %description docs |
| 130 | Documentation relating to the Python programming language in HTML and info |
| 131 | formats. |
Martin v. Löwis | 52da449 | 2003-10-19 18:34:52 +0000 | [diff] [blame] | 132 | %endif |
Guido van Rossum | 2ef777f | 2003-02-24 01:09:53 +0000 | [diff] [blame] | 133 | |
| 134 | %changelog |
Sean Reifschneider | 7caafe7 | 2004-12-21 02:22:29 +0000 | [diff] [blame] | 135 | * Mon Dec 20 2004 Sean Reifschneider <jafo-rpms@tummy.com> [2.4-2pydotorg] |
| 136 | - Changing the idle wrapper so that it passes arguments to idle. |
| 137 | |
Sean Reifschneider | 054541e | 2004-10-21 23:35:45 +0000 | [diff] [blame] | 138 | * Tue Oct 19 2004 Sean Reifschneider <jafo-rpms@tummy.com> [2.4b1-1pydotorg] |
| 139 | - Updating to 2.4. |
| 140 | |
| 141 | * Thu Jul 22 2004 Sean Reifschneider <jafo-rpms@tummy.com> [2.3.4-3pydotorg] |
| 142 | - Paul Tiemann fixes for %{prefix}. |
| 143 | - Adding permission changes for directory as suggested by reimeika.ca |
| 144 | - Adding code to detect when it should be using lib64. |
| 145 | - Adding a define for the location of /var/www/html for docs. |
| 146 | |
Martin v. Löwis | 173ecb6 | 2004-05-31 19:40:57 +0000 | [diff] [blame] | 147 | * Thu May 27 2004 Sean Reifschneider <jafo-rpms@tummy.com> [2.3.4-2pydotorg] |
| 148 | - Including changes from Ian Holsman to build under Red Hat 7.3. |
| 149 | - Fixing some problems with the /usr/local path change. |
| 150 | |
Skip Montanaro | beddfcb | 2004-05-17 13:17:38 +0000 | [diff] [blame] | 151 | * Sat Mar 27 2004 Sean Reifschneider <jafo-rpms@tummy.com> [2.3.2-3pydotorg] |
Martin v. Löwis | fb66cd2 | 2004-03-31 18:59:04 +0000 | [diff] [blame] | 152 | - Being more agressive about finding the paths to fix for |
| 153 | #!/usr/local/bin/python. |
| 154 | |
Martin v. Löwis | d3c810e | 2004-02-15 21:27:03 +0000 | [diff] [blame] | 155 | * Sat Feb 07 2004 Sean Reifschneider <jafo-rpms@tummy.com> [2.3.3-2pydotorg] |
| 156 | - Adding code to remove "#!/usr/local/bin/python" from particular files and |
| 157 | causing the RPM build to terminate if there are any unexpected files |
| 158 | which have that line in them. |
| 159 | |
Martin v. Löwis | 52da449 | 2003-10-19 18:34:52 +0000 | [diff] [blame] | 160 | * Mon Oct 13 2003 Sean Reifschneider <jafo-rpms@tummy.com> [2.3.2-1pydotorg] |
| 161 | - Adding code to detect wether documentation is available to build. |
| 162 | |
| 163 | * Fri Sep 19 2003 Sean Reifschneider <jafo-rpms@tummy.com> [2.3.1-1pydotorg] |
| 164 | - Updating to the 2.3.1 release. |
| 165 | |
Guido van Rossum | 0f69833 | 2003-02-24 17:55:37 +0000 | [diff] [blame] | 166 | * Mon Feb 24 2003 Sean Reifschneider <jafo-rpms@tummy.com> [2.3b1-1pydotorg] |
| 167 | - Updating to 2.3b1 release. |
| 168 | |
Guido van Rossum | 2ef777f | 2003-02-24 01:09:53 +0000 | [diff] [blame] | 169 | * Mon Feb 17 2003 Sean Reifschneider <jafo-rpms@tummy.com> [2.3a1-1] |
| 170 | - Updating to 2.3 release. |
| 171 | |
| 172 | * Sun Dec 23 2001 Sean Reifschneider <jafo-rpms@tummy.com> |
| 173 | [Release 2.2-2] |
| 174 | - Added -docs package. |
| 175 | - Added "auto" config_tkinter setting which only enables tk if |
| 176 | /usr/bin/wish exists. |
| 177 | |
| 178 | * Sat Dec 22 2001 Sean Reifschneider <jafo-rpms@tummy.com> |
| 179 | [Release 2.2-1] |
| 180 | - Updated to 2.2. |
| 181 | - Changed the extension to "2" from "2.2". |
| 182 | |
| 183 | * Tue Nov 18 2001 Sean Reifschneider <jafo-rpms@tummy.com> |
| 184 | [Release 2.2c1-1] |
| 185 | - Updated to 2.2c1. |
| 186 | |
| 187 | * Thu Nov 1 2001 Sean Reifschneider <jafo-rpms@tummy.com> |
| 188 | [Release 2.2b1-3] |
| 189 | - Changed the way the sed for fixing the #! in pydoc works. |
| 190 | |
| 191 | * Wed Oct 24 2001 Sean Reifschneider <jafo-rpms@tummy.com> |
| 192 | [Release 2.2b1-2] |
| 193 | - Fixed missing "email" package, thanks to anonymous report on sourceforge. |
| 194 | - Fixed missing "compiler" package. |
| 195 | |
| 196 | * Mon Oct 22 2001 Sean Reifschneider <jafo-rpms@tummy.com> |
| 197 | [Release 2.2b1-1] |
| 198 | - Updated to 2.2b1. |
| 199 | |
| 200 | * Mon Oct 9 2001 Sean Reifschneider <jafo-rpms@tummy.com> |
| 201 | [Release 2.2a4-4] |
| 202 | - otto@balinor.mat.unimi.it mentioned that the license file is missing. |
| 203 | |
| 204 | * Sun Sep 30 2001 Sean Reifschneider <jafo-rpms@tummy.com> |
| 205 | [Release 2.2a4-3] |
| 206 | - Ignacio Vazquez-Abrams pointed out that I had a spruious double-quote in |
| 207 | the spec files. Thanks. |
| 208 | |
| 209 | * Wed Jul 25 2001 Sean Reifschneider <jafo-rpms@tummy.com> |
| 210 | [Release 2.2a1-1] |
| 211 | - Updated to 2.2a1 release. |
| 212 | - Changed idle and pydoc to use binsuffix macro |
| 213 | |
| 214 | ####### |
| 215 | # PREP |
| 216 | ####### |
| 217 | %prep |
| 218 | %setup -n Python-%{version} |
Guido van Rossum | 2ef777f | 2003-02-24 01:09:53 +0000 | [diff] [blame] | 219 | |
| 220 | ######## |
| 221 | # BUILD |
| 222 | ######## |
| 223 | %build |
Martin v. Löwis | 52da449 | 2003-10-19 18:34:52 +0000 | [diff] [blame] | 224 | ./configure --enable-unicode=ucs4 %{ipv6} %{pymalloc} --prefix=%{__prefix} |
Guido van Rossum | 2ef777f | 2003-02-24 01:09:53 +0000 | [diff] [blame] | 225 | make |
| 226 | |
| 227 | ########## |
| 228 | # INSTALL |
| 229 | ########## |
| 230 | %install |
| 231 | # set the install path |
| 232 | echo '[install_scripts]' >setup.cfg |
Sean Reifschneider | 054541e | 2004-10-21 23:35:45 +0000 | [diff] [blame] | 233 | echo 'install_dir='"${RPM_BUILD_ROOT}%{__prefix}/bin" >>setup.cfg |
Guido van Rossum | 2ef777f | 2003-02-24 01:09:53 +0000 | [diff] [blame] | 234 | |
| 235 | [ -d "$RPM_BUILD_ROOT" -a "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT |
Sean Reifschneider | 054541e | 2004-10-21 23:35:45 +0000 | [diff] [blame] | 236 | mkdir -p $RPM_BUILD_ROOT%{__prefix}/%{libdirname}/python%{libvers}/lib-dynload |
Guido van Rossum | 2ef777f | 2003-02-24 01:09:53 +0000 | [diff] [blame] | 237 | make prefix=$RPM_BUILD_ROOT%{__prefix} install |
| 238 | |
| 239 | # REPLACE PATH IN PYDOC |
| 240 | if [ ! -z "%{binsuffix}" ] |
| 241 | then |
| 242 | ( |
| 243 | cd $RPM_BUILD_ROOT%{__prefix}/bin |
| 244 | mv pydoc pydoc.old |
Sean Reifschneider | 054541e | 2004-10-21 23:35:45 +0000 | [diff] [blame] | 245 | sed 's|#!.*|#!%{__prefix}/bin/env python'%{binsuffix}'|' \ |
Guido van Rossum | 2ef777f | 2003-02-24 01:09:53 +0000 | [diff] [blame] | 246 | pydoc.old >pydoc |
| 247 | chmod 755 pydoc |
| 248 | rm -f pydoc.old |
| 249 | ) |
| 250 | fi |
| 251 | |
| 252 | # add the binsuffix |
| 253 | if [ ! -z "%{binsuffix}" ] |
| 254 | then |
| 255 | ( cd $RPM_BUILD_ROOT%{__prefix}/bin; rm -f python[0-9a-zA-Z]*; |
| 256 | mv -f python python"%{binsuffix}" ) |
| 257 | ( cd $RPM_BUILD_ROOT%{__prefix}/man/man1; mv python.1 python%{binsuffix}.1 ) |
| 258 | ( cd $RPM_BUILD_ROOT%{__prefix}/bin; mv -f pydoc pydoc"%{binsuffix}" ) |
| 259 | ( cd $RPM_BUILD_ROOT%{__prefix}/bin; mv -f idle idle"%{binsuffix}" ) |
| 260 | fi |
| 261 | |
| 262 | ######## |
| 263 | # Tools |
Sean Reifschneider | 7caafe7 | 2004-12-21 02:22:29 +0000 | [diff] [blame] | 264 | echo '#!%{__prefix}/bin/env python%{binsuffix}' >${RPM_BUILD_ROOT}%{__prefix}/bin/idle%{binsuffix} |
| 265 | echo 'import os, sys' >>${RPM_BUILD_ROOT}%{__prefix}/bin/idle%{binsuffix} |
| 266 | echo 'os.execvp("%{__prefix}/bin/python%{binsuffix}", ["%{__prefix}/bin/python%{binsuffix}", "%{__prefix}/lib/python%{libvers}/idlelib/idle.py"] + sys.argv[1:])' >>${RPM_BUILD_ROOT}%{__prefix}/bin/idle%{binsuffix} |
| 267 | echo 'print "Failed to exec Idle"' >>${RPM_BUILD_ROOT}%{__prefix}/bin/idle%{binsuffix} |
| 268 | echo 'sys.exit(1)' >>${RPM_BUILD_ROOT}%{__prefix}/bin/idle%{binsuffix} |
Sean Reifschneider | 054541e | 2004-10-21 23:35:45 +0000 | [diff] [blame] | 269 | chmod 755 $RPM_BUILD_ROOT%{__prefix}/bin/idle%{binsuffix} |
| 270 | cp -a Tools $RPM_BUILD_ROOT%{__prefix}/%{libdirname}/python%{libvers} |
Guido van Rossum | 2ef777f | 2003-02-24 01:09:53 +0000 | [diff] [blame] | 271 | |
| 272 | # MAKE FILE LISTS |
| 273 | rm -f mainpkg.files |
Sean Reifschneider | 054541e | 2004-10-21 23:35:45 +0000 | [diff] [blame] | 274 | find "$RPM_BUILD_ROOT""%{__prefix}"/%{libdirname}/python%{libvers}/lib-dynload -type f | |
Guido van Rossum | 2ef777f | 2003-02-24 01:09:53 +0000 | [diff] [blame] | 275 | sed "s|^${RPM_BUILD_ROOT}|/|" | |
| 276 | grep -v -e '_tkinter.so$' >mainpkg.files |
| 277 | find "$RPM_BUILD_ROOT""%{__prefix}"/bin -type f | |
| 278 | sed "s|^${RPM_BUILD_ROOT}|/|" | |
| 279 | grep -v -e '/bin/idle%{binsuffix}$' >>mainpkg.files |
| 280 | |
| 281 | rm -f tools.files |
Sean Reifschneider | 054541e | 2004-10-21 23:35:45 +0000 | [diff] [blame] | 282 | find "$RPM_BUILD_ROOT""%{__prefix}"/%{libdirname}/python%{libvers}/idlelib \ |
| 283 | "$RPM_BUILD_ROOT""%{__prefix}"/%{libdirname}/python%{libvers}/Tools -type f | |
Martin v. Löwis | 52da449 | 2003-10-19 18:34:52 +0000 | [diff] [blame] | 284 | sed "s|^${RPM_BUILD_ROOT}|/|" >tools.files |
Guido van Rossum | 2ef777f | 2003-02-24 01:09:53 +0000 | [diff] [blame] | 285 | echo "%{__prefix}"/bin/idle%{binsuffix} >>tools.files |
| 286 | |
| 287 | ###### |
| 288 | # Docs |
Martin v. Löwis | 52da449 | 2003-10-19 18:34:52 +0000 | [diff] [blame] | 289 | %if %{include_docs} |
Sean Reifschneider | 054541e | 2004-10-21 23:35:45 +0000 | [diff] [blame] | 290 | mkdir -p "$RPM_BUILD_ROOT"%{config_htmldir} |
Guido van Rossum | 2ef777f | 2003-02-24 01:09:53 +0000 | [diff] [blame] | 291 | ( |
Sean Reifschneider | 054541e | 2004-10-21 23:35:45 +0000 | [diff] [blame] | 292 | cd "$RPM_BUILD_ROOT"%{config_htmldir} |
Guido van Rossum | 2ef777f | 2003-02-24 01:09:53 +0000 | [diff] [blame] | 293 | bunzip2 < %{SOURCE1} | tar x |
| 294 | ) |
Martin v. Löwis | 52da449 | 2003-10-19 18:34:52 +0000 | [diff] [blame] | 295 | %endif |
Guido van Rossum | 2ef777f | 2003-02-24 01:09:53 +0000 | [diff] [blame] | 296 | |
Martin v. Löwis | d3c810e | 2004-02-15 21:27:03 +0000 | [diff] [blame] | 297 | # fix the #! line in installed files |
Martin v. Löwis | 173ecb6 | 2004-05-31 19:40:57 +0000 | [diff] [blame] | 298 | find "$RPM_BUILD_ROOT" -type f -print0 | |
| 299 | xargs -0 grep -l /usr/local/bin/python | while read file |
Martin v. Löwis | d3c810e | 2004-02-15 21:27:03 +0000 | [diff] [blame] | 300 | do |
Martin v. Löwis | 173ecb6 | 2004-05-31 19:40:57 +0000 | [diff] [blame] | 301 | FIXFILE="$file" |
Sean Reifschneider | 054541e | 2004-10-21 23:35:45 +0000 | [diff] [blame] | 302 | sed 's|^#!.*python|#!%{__prefix}/bin/env python'"%{binsuffix}"'|' \ |
Martin v. Löwis | 173ecb6 | 2004-05-31 19:40:57 +0000 | [diff] [blame] | 303 | "$FIXFILE" >/tmp/fix-python-path.$$ |
| 304 | cat /tmp/fix-python-path.$$ >"$FIXFILE" |
Martin v. Löwis | d3c810e | 2004-02-15 21:27:03 +0000 | [diff] [blame] | 305 | rm -f /tmp/fix-python-path.$$ |
| 306 | done |
| 307 | |
| 308 | # check to see if there are any straggling #! lines |
| 309 | find "$RPM_BUILD_ROOT" -type f | xargs egrep -n '^#! */usr/local/bin/python' \ |
| 310 | | grep ':1:#!' >/tmp/python-rpm-files.$$ || true |
| 311 | if [ -s /tmp/python-rpm-files.$$ ] |
| 312 | then |
| 313 | echo '*****************************************************' |
| 314 | cat /tmp/python-rpm-files.$$ |
| 315 | cat <<@EOF |
| 316 | ***************************************************** |
| 317 | There are still files referencing /usr/local/bin/python in the |
| 318 | install directory. They are listed above. Please fix the .spec |
| 319 | file and try again. If you are an end-user, you probably want |
| 320 | to report this to jafo-rpms@tummy.com as well. |
| 321 | ***************************************************** |
| 322 | @EOF |
| 323 | rm -f /tmp/python-rpm-files.$$ |
| 324 | exit 1 |
| 325 | fi |
| 326 | rm -f /tmp/python-rpm-files.$$ |
| 327 | |
Guido van Rossum | 2ef777f | 2003-02-24 01:09:53 +0000 | [diff] [blame] | 328 | ######## |
| 329 | # CLEAN |
| 330 | ######## |
| 331 | %clean |
Martin v. Löwis | 52da449 | 2003-10-19 18:34:52 +0000 | [diff] [blame] | 332 | [ -n "$RPM_BUILD_ROOT" -a "$RPM_BUILD_ROOT" != / ] && rm -rf $RPM_BUILD_ROOT |
Guido van Rossum | 2ef777f | 2003-02-24 01:09:53 +0000 | [diff] [blame] | 333 | rm -f mainpkg.files tools.files |
| 334 | |
| 335 | ######## |
| 336 | # FILES |
| 337 | ######## |
| 338 | %files -f mainpkg.files |
| 339 | %defattr(-,root,root) |
| 340 | %doc Misc/README Misc/cheatsheet Misc/Porting |
| 341 | %doc LICENSE Misc/ACKS Misc/HISTORY Misc/NEWS |
Martin v. Löwis | 173ecb6 | 2004-05-31 19:40:57 +0000 | [diff] [blame] | 342 | %{__prefix}/man/man1/python%{binsuffix}.1* |
Guido van Rossum | 2ef777f | 2003-02-24 01:09:53 +0000 | [diff] [blame] | 343 | |
Sean Reifschneider | 054541e | 2004-10-21 23:35:45 +0000 | [diff] [blame] | 344 | %attr(755,root,root) %dir %{__prefix}/include/python%{libvers} |
| 345 | %attr(755,root,root) %dir %{__prefix}/%{libdirname}/python%{libvers}/ |
| 346 | %{__prefix}/%{libdirname}/python%{libvers}/*.txt |
| 347 | %{__prefix}/%{libdirname}/python%{libvers}/*.py* |
| 348 | %{__prefix}/%{libdirname}/python%{libvers}/pdb.doc |
| 349 | %{__prefix}/%{libdirname}/python%{libvers}/profile.doc |
| 350 | %{__prefix}/%{libdirname}/python%{libvers}/curses |
| 351 | %{__prefix}/%{libdirname}/python%{libvers}/distutils |
| 352 | %{__prefix}/%{libdirname}/python%{libvers}/encodings |
| 353 | %{__prefix}/%{libdirname}/python%{libvers}/plat-linux2 |
| 354 | %{__prefix}/%{libdirname}/python%{libvers}/site-packages |
| 355 | %{__prefix}/%{libdirname}/python%{libvers}/test |
| 356 | %{__prefix}/%{libdirname}/python%{libvers}/xml |
| 357 | %{__prefix}/%{libdirname}/python%{libvers}/email |
Anthony Baxter | ebed3f6 | 2006-04-03 15:03:44 +0000 | [diff] [blame] | 358 | %{__prefix}/%{libdirname}/python%{libvers}/email/mime |
| 359 | %{__prefix}/%{libdirname}/python%{libvers}/sqlite3 |
Sean Reifschneider | 054541e | 2004-10-21 23:35:45 +0000 | [diff] [blame] | 360 | %{__prefix}/%{libdirname}/python%{libvers}/compiler |
| 361 | %{__prefix}/%{libdirname}/python%{libvers}/bsddb |
| 362 | %{__prefix}/%{libdirname}/python%{libvers}/hotshot |
| 363 | %{__prefix}/%{libdirname}/python%{libvers}/logging |
| 364 | %{__prefix}/%{libdirname}/python%{libvers}/lib-old |
Guido van Rossum | 2ef777f | 2003-02-24 01:09:53 +0000 | [diff] [blame] | 365 | |
| 366 | %files devel |
| 367 | %defattr(-,root,root) |
| 368 | %{__prefix}/include/python%{libvers}/*.h |
Sean Reifschneider | 054541e | 2004-10-21 23:35:45 +0000 | [diff] [blame] | 369 | %{__prefix}/%{libdirname}/python%{libvers}/config |
Guido van Rossum | 2ef777f | 2003-02-24 01:09:53 +0000 | [diff] [blame] | 370 | |
| 371 | %files -f tools.files tools |
| 372 | %defattr(-,root,root) |
| 373 | |
| 374 | %if %{include_tkinter} |
| 375 | %files tkinter |
| 376 | %defattr(-,root,root) |
Sean Reifschneider | 054541e | 2004-10-21 23:35:45 +0000 | [diff] [blame] | 377 | %{__prefix}/%{libdirname}/python%{libvers}/lib-tk |
| 378 | %{__prefix}/%{libdirname}/python%{libvers}/lib-dynload/_tkinter.so* |
Guido van Rossum | 2ef777f | 2003-02-24 01:09:53 +0000 | [diff] [blame] | 379 | %endif |
| 380 | |
Martin v. Löwis | 52da449 | 2003-10-19 18:34:52 +0000 | [diff] [blame] | 381 | %if %{include_docs} |
Guido van Rossum | 2ef777f | 2003-02-24 01:09:53 +0000 | [diff] [blame] | 382 | %files docs |
| 383 | %defattr(-,root,root) |
Sean Reifschneider | 054541e | 2004-10-21 23:35:45 +0000 | [diff] [blame] | 384 | %{config_htmldir}/* |
Martin v. Löwis | 52da449 | 2003-10-19 18:34:52 +0000 | [diff] [blame] | 385 | %endif |