Name: python Version: 1.5.2 Release: 8 Copyright: distributable #Summary: python(Summary) #Group: python(Group) Summary: An interpreted, interactive object-oriented programming language. Group: Development/Languages Source0: ftp://ftp.python.org/pub/python/src/py152.tgz Patch0: Python-%{version}-aixsetup.patch #Patch1: Python-%{version}-aixia64.patch BuildRoot: %{_tmppath}/%{name}/python-root Prefix: %{_prefix} #BuildRequires: readline readline-devel zlib zlib-devel gmp gmp-devel gdbm gdbm-devel BuildRequires: readline readline-devel zlib zlib-devel gdbm gdbm-devel Conflicts: tkinter < %{PACKAGE_VERSION} %ifarch ia64 %define DEFCCIA cc %define DEFCC %{DEFCCIA} %else %define DEFCC cc %endif %description Python is an interpreted, interactive, object-oriented programming language often compared to Tcl, Perl, Scheme or Java. Python includes modules, classes, exceptions, very high level dynamic data types and dynamic typing. Python supports interfaces to many system calls and libraries, as well as to various windowing systems (X11, Motif, Tk, Mac and MFC). Programmers can write new built-in modules for Python in C or C++. Python can be used as an extension language for applications that need a programmable interface. This package contains most of the standard Python modules, as well as modules for interfacing to the Tix widget set for Tk and RPM. Note that documentation for Python is provided in the python-docs package. %package devel #Summary: python-devel(Summary) #Group: python-devel(Group) Summary: The libraries and header files needed for Python development. Group: Development/Libraries Requires: python = %{PACKAGE_VERSION} #%description devel #python-devel(Description) %description devel The Python programming language's interpreter can be extended with dynamically loaded extensions and can be embedded in other programs. This package contains the header files and libraries needed to do these types of tasks. Install python-devel if you want to develop Python extensions. The python package will also need to be installed. You'll probably also want to install the python-docs package, which contains Python documentation. %package tools #Summary: python-tools(Summary) #Group: python-tools(Group) Summary: A collection of development tools included with Python. Group: Development/Tools Requires: python = %{PACKAGE_VERSION} #%description tools #python-tools(Description) %description tools The Python package includes several development tools that are used to build python programs. This package contains a selection of those tools, including the IDLE Python IDE. Install python-tools if you want to use these tools to develop Python programs. You will also need to install the python and tkinter packages. %package docs #Summary: python-docs(Summary) #Group: python-docs(Group) Summary: Documentation for the Python programming language. Group: Documentation Conflicts: python < %{PACKAGE_VERSION} #%description docs #python-docs(Description) %description docs The python-docs package contains documentation on the Python programming language and interpreter. The documentation is provided in ASCII text files and in LaTeX source files. Install the python-docs package if you'd like to use the documentation for the Python language. %package -n tkinter #Summary: tkinter(Summary) Summary: A graphical user interface for the Python scripting language. #Group: tkinter(Group) Group: Development/Languages Requires: python = %{PACKAGE_VERSION} #%description -n tkinter #tkinter(Description) %description -n tkinter The Tkinter (Tk interface) program is an graphical user interface for the Python scripting language. You should install the tkinter package if you'd like to use a graphical user interface for Python programming. %prep %setup -q -n Python-1.5.2 %patch0 -p1 -b .aixsetup #%ifarch ia64 #%patch1 -p1 -b .aixia64 #%endif find . -name "*.nosed" -exec rm -f {} \; cp Lib/lib-old/rand.py Lib %build # Use the default compiler for this platform - gcc otherwise if [[ -z "$CC" ]] then if test "X`type %{DEFCC} 2>/dev/null`" != 'X'; then export CC=%{DEFCC} else export CC=gcc fi fi if test "X$CC" != "Xgcc" then export RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS | sed 's:-fsigned-char::'` export CFLAGS="$RPM_OPT_FLAGS" fi %ifarch ppc rs6000 export LDFLAGS="-Wl,-brtl" %endif ./configure --prefix=%{_prefix} --with-threads #LDFLAGS=-s make make %install rm -rf $RPM_BUILD_ROOT mkdir -p $RPM_BUILD_ROOT%{_prefix}/bin mkdir -p $RPM_BUILD_ROOT%{_prefix}/lib make install prefix=$RPM_BUILD_ROOT/%{_prefix} /usr/bin/strip $RPM_BUILD_ROOT/%{_prefix}/bin/* 2>/dev/null || : # tools # idle mkdir -p $RPM_BUILD_ROOT%{_prefix}/lib/python1.5/site-packages mkdir -p $RPM_BUILD_ROOT%{_prefix}/lib/python1.5/site-packages/idle cp Tools/idle/*.py \ $RPM_BUILD_ROOT%{_prefix}/lib/python1.5/site-packages/idle/ #modulator cp -r Tools/modulator \ $RPM_BUILD_ROOT%{_prefix}/lib/python1.5/site-packages/ #pynche cp -r Tools/pynche \ $RPM_BUILD_ROOT%{_prefix}/lib/python1.5/site-packages/ mv Tools/modulator/README Tools/modulator/README.modulator mv Tools/pynche/README Tools/pynche/README.pynche rm -f modules-list.full for n in $RPM_BUILD_ROOT%{_prefix}/lib/python1.5/*; do [ -d $n ] || echo $n done >> modules-list.full for mod in $RPM_BUILD_ROOT%{_prefix}/lib/python1.5/lib-dynload/* ; do [ `basename $mod` = _tkinter.so ] || [ `basename $mod` = '*' ] || echo $mod done >> modules-list.full sed -e "s|$RPM_BUILD_ROOT||g" < modules-list.full > modules-list #get files list for python-tools DIR1=$RPM_BUILD_ROOT%{_prefix}/lib/python1.5/site-packages/pynche DIR2=$RPM_BUILD_ROOT%{_prefix}/lib/python1.5/site-packages/idle DIR3=$RPM_BUILD_ROOT%{_prefix}/lib/python1.5/site-packages/modulator find $DIR1 -type f | sed -e "s#^$RPM_BUILD_ROOT##g" > python-tools.files find $DIR2 -type f | sed -e "s#^$RPM_BUILD_ROOT##g" >> python-tools.files find $DIR3 -type f | sed -e "s#^$RPM_BUILD_ROOT##g" >> python-tools.files (cd $RPM_BUILD_ROOT%{_prefix} for FNAME in lib/python1.5/cgi.py* man/man1/python.1 do sed -e 's#/usr/local/bin/python#/usr/bin/python#g' $FNAME \ > %{_tmppath}/sed_out.$$ && mv %{_tmppath}/sed_out.$$ $FNAME done ) ( cd $RPM_BUILD_ROOT for dir in bin include lib do mkdir -p usr/$dir cd usr/$dir ln -sf ../..%{prefix}/$dir/* . cd - done ) %clean rm -rf $RPM_BUILD_ROOT rm -f modules-list modules-list.full %files -f modules-list %defattr(-,root,root) %{_prefix}/bin/python* %dir %{_prefix}/lib/python1.5 %{_prefix}/lib/python1.5/plat-aix* %{_prefix}/lib/python1.5/lib-stdwin %dir %{_prefix}/lib/python1.5/lib-dynload /usr/bin/python* /usr/lib/python1.5 %files devel %defattr(-,root,root) %{_prefix}/lib/python*/test %{_prefix}/lib/python*/config %{_prefix}/include/python1.5 /usr/include/python1.5 %files -f python-tools.files tools %defattr(-,root,root) %doc Tools/idle/*.txt %doc Tools/modulator/README.modulator %doc Tools/pynche/README.pynche %dir %{_prefix}/lib/python1.5/site-packages/idle %dir %{_prefix}/lib/python1.5/site-packages/modulator %dir %{_prefix}/lib/python1.5/site-packages/modulator/Templates %dir %{_prefix}/lib/python1.5/site-packages/pynche %dir %{_prefix}/lib/python1.5/site-packages/pynche/X %files docs %defattr(-,root,root) %doc Misc/COPYRIGHT Misc/NEWS Misc/HYPE Misc/README Misc/cheatsheet Misc/BLURB* %doc Misc/HISTORY %files -n tkinter %defattr(-,root,root) %{_prefix}/lib/python1.5/lib-tk %changelog * Wed Apr 11 2001 Marc Stephenson - Enable threading * Fri Apr 07 2001 Marc Stephenson - Enable tk * Fri Apr 06 2001 David Clissold - Update Patch0, and add Patch1, to build on AIX/IA64 * Wed Mar 13 2001 Marc Stephenson - Build with run-time enabling * Fri Mar 09 2001 Marc Stephenson - Add logic for default compiler - Rebuild against new shared objects * Fri Oct 27 2000 pkgmgr - Modify for AIX Freeware distribution * Tue Feb 01 2000 Cristian Gafton - add patch tp fix problems talioking to wuftpd from hjl - rebuild to fix dependencies * Mon Jan 31 2000 Nalin Dahyabhai - add buildrequires lines (#8925) * Mon Jan 17 2000 Nalin Dahyabhai - put idle, modulator, and pynche only in python-tools * Thu Dec 02 1999 Michael K. Johnson - fixed whichdb patch to actually do something (#7458) * Mon Nov 22 1999 Michael K. Johnson - link nismodule against -lnss - whichdb patch by Guido (Python.org bug 97) * Fri Sep 17 1999 Tim Powers - added modulator and pynche to the python-tools package - using a files list in the %files section for python-tools * Fri Sep 17 1999 Michael K. Johnson - added conflicts/requires between subpackages so that you cannot have an older tkinter installed with a new python. - added more tools * Wed Sep 15 1999 Michael K. Johnson - changed defattr so that executable scripts in docs stay executable * Tue Aug 24 1999 Bill Nottingham - rebuild to fix broken tkinter. * Mon Aug 9 1999 Matt Wilson - fixed bogus /usr/local/bin/python requirements * Sat Jul 17 1999 Matt Wilson - added patch to import global symbols until we get libtool patched * Sun Jul 11 1999 Matt Wilson - updated to 1.5.2 * Sun Mar 21 1999 Cristian Gafton - auto rebuild in the new build environment (release 10) * Thu Mar 18 1999 Bill Nottingham - fix permissions in python-docs * Thu Feb 11 1999 Michael Johnson - added mpzmodule at user request (uses gmp) - added bsddbmodule at user request (uses db 1.85 interface) * Mon Feb 08 1999 Michael Johnson - add --with-threads at user request - clean up spec file * Fri Jan 08 1999 Michael K. Johnson - New libc changes ndbm.h to db1/ndbm.h and -ldb to -ldb1 * Thu Sep 3 1998 Jeff Johnson - recompile for RH 5.2. * Wed May 06 1998 Cristian Gafton - python-docs used to require /usr/bin/sed. Changed to /bin/sed instead * Wed Apr 29 1998 Cristian Gafton - fixed the spec file for version 1.5.1 - buildroot (!) * Mon Apr 20 1998 Michael K. Johnson - updated to python 1.5.1 - created our own Python-Doc tar file from 1.5 to substitute for the not-yet-released Doc package. - build _tkinter properly - use readline again - build crypt module again - install rand replacement module - added a few modules * Thu Apr 09 1998 Erik Troan - updated to python 1.5 - made /usr/lib/python1.5 file list automatically generated * Tue Nov 04 1997 Michael K. Johnson - Fixed dependencies for python and tkinter * Mon Nov 03 1997 Michael K. Johnson - pulled out tk-related stuff into tkinter package * Fri Oct 10 1997 Erik Troan - bunches of scripts used /usr/local/bin/python instead of /usr/bin/python * Tue Sep 30 1997 Erik Troan - updated for tcl/tk 8.0 * Thu Jul 10 1997 Erik Troan - built against glibc