%define binsuffix 2.2 %define libvers 2.2 Summary: An interpreted, interactive object-oriented programming language. Name: python %define version 2.2.2 Version: %{version} Release: 1 Copyright: PSF Group: Development/Languages Source: Python-%{version}.tgz Patch0: Python-2.2-aix.patch Buildroot: /var/tmp/python-root %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: The libraries and header files needed for Python extension development. Requires: python = %{version} Group: Development/Libraries %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: A collection of development tools included with Python. Group: Development/Tools Prereq: python = %{version}-%{release} %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. %prep #%setup -T -D -n Python-%{version} #exit %setup -q -n Python-%{version} %patch0 ed configure <<'EOF' /ld_so_aix/ /LDSHARED/ s,BINLIBDEST,LIBPL,g s,/config,,g w q EOF %build #exit CFLAGS="-O2" LDFLAGS= CXXFLAGS="-mthreads -O2" LANG=C export CFLAGS LDFLAGS CXXFLAGS LANG ./configure --prefix=%{_prefix} --mandir=%{_mandir} \ --with-gcc="gcc -mthreads -pipe" --with-threads --with-cycle-gc \ --with-readline make OPT="-O2" %install #exit # set the install path echo '[install_scripts]' >setup.cfg echo 'install_dir='"${RPM_BUILD_ROOT}%{_bindir}" >>setup.cfg [ -d "$RPM_BUILD_ROOT" -a "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT mkdir -p $RPM_BUILD_ROOT%{__prefix}/lib/python%{libvers}/lib-dynload make prefix=$RPM_BUILD_ROOT%{_prefix} MANDIR=$RPM_BUILD_ROOT%{_mandir} \ DDIR=%{_prefix}/lib/python2.2 install # shared libraries are not put in lib-dynload in RPM_BUILD_ROOT by # main install target. So we have to do it again make prefix=%{_prefix} MANDIR=%{_mandir} DEST=$RPM_BUILD_ROOT sharedinstall ######## # Tools echo '#!/bin/sh' >${RPM_BUILD_ROOT}%{_bindir}/idle%{binsuffix} echo 'exec %{_prefix}/bin/python%{binsuffix} /usr/lib/python%{libvers}/Tools/idle/idle.py' >>$RPM_BUILD_ROOT%{_bindir}/idle%{binsuffix} chmod 755 $RPM_BUILD_ROOT%{_bindir}/idle%{binsuffix} cp -pr Tools $RPM_BUILD_ROOT%{_prefix}/lib/python%{libvers} echo "%{_prefix}"/bin/idle%{binsuffix} >>tools.files %files %defattr(-,bin,bin) %doc README Misc/cheatsheet Misc/Porting Misc/indent.pro Misc/vgrindefs %doc LICENSE Misc/ACKS Misc/HISTORY Misc/NEWS Misc/AIX-NOTES %{_mandir}/man1/* %{_prefix}/bin/* %dir %{_prefix}/lib/python2.2/ %{_prefix}/lib/python2.2/*.py* %{_prefix}/lib/python2.2/*.txt %{_prefix}/lib/python2.2/pdb.doc %{_prefix}/lib/python2.2/profile.doc %{_prefix}/lib/python2.2/curses %{_prefix}/lib/python2.2/distutils %{_prefix}/lib/python2.2/encodings %{_prefix}/lib/python2.2/lib-dynload %dir %{_prefix}/lib/python2.2/lib-old %{_prefix}/lib/python2.2/plat-aix4 %{_prefix}/lib/python2.2/site-packages %{_prefix}/lib/python2.2/xml %{_prefix}/lib/python2.2/email %{_prefix}/lib/python2.2/compiler %files devel %defattr(-,bin,bin) %{_prefix}/include/python2.2 %{_prefix}/lib/python2.2/config %files tools %defattr(-,bin,bin) %{_prefix}/lib/python2.2/Tools %{_prefix}/bin/idle* %changelog * Wed Oct 09 2002 Stuart Gathman - slightly better wgetnstr work around, fix LDSHARED in config/Makefile * Mon Oct 07 2002 Stuart Gathman - Python 2.2 * Mon Jun 18 2001 Stuart Gathman - fix ownership and link main executable * Thu May 31 2001 Stuart Gathman - initial release