2003-02-23 21:09:53 -04:00
|
|
|
##########################
|
|
|
|
# User-modifiable configs
|
|
|
|
##########################
|
|
|
|
|
|
|
|
# Is the resulting package and the installed binary named "python" or
|
|
|
|
# "python2"?
|
|
|
|
#WARNING: Commenting out doesn't work. Last line is what's used.
|
|
|
|
%define config_binsuffix none
|
2006-08-18 04:30:07 -03:00
|
|
|
%define config_binsuffix 2.6
|
2003-02-23 21:09:53 -04:00
|
|
|
|
|
|
|
# Build tkinter? "auto" enables it if /usr/bin/wish exists.
|
|
|
|
#WARNING: Commenting out doesn't work. Last line is what's used.
|
|
|
|
%define config_tkinter no
|
|
|
|
%define config_tkinter yes
|
|
|
|
%define config_tkinter auto
|
|
|
|
|
|
|
|
# Use pymalloc? The last line (commented or not) determines wether
|
|
|
|
# pymalloc is used.
|
|
|
|
#WARNING: Commenting out doesn't work. Last line is what's used.
|
|
|
|
%define config_pymalloc no
|
|
|
|
%define config_pymalloc yes
|
|
|
|
|
|
|
|
# Enable IPV6?
|
|
|
|
#WARNING: Commenting out doesn't work. Last line is what's used.
|
|
|
|
%define config_ipv6 yes
|
|
|
|
%define config_ipv6 no
|
|
|
|
|
2010-01-16 00:27:58 -04:00
|
|
|
# Build shared libraries or .a library?
|
|
|
|
#WARNING: Commenting out doesn't work. Last line is what's used.
|
|
|
|
%define config_sharedlib no
|
|
|
|
%define config_sharedlib yes
|
|
|
|
|
2004-10-21 20:35:45 -03:00
|
|
|
# Location of the HTML directory.
|
|
|
|
%define config_htmldir /var/www/html/python
|
|
|
|
|
2003-02-23 21:09:53 -04:00
|
|
|
#################################
|
|
|
|
# End of user-modifiable configs
|
|
|
|
#################################
|
|
|
|
|
|
|
|
%define name python
|
2008-04-03 01:10:02 -03:00
|
|
|
#--start constants--
|
2010-11-13 13:33:04 -04:00
|
|
|
%define version 2.7.1rc1
|
2010-08-01 15:43:29 -03:00
|
|
|
%define libvers 2.7
|
2008-04-03 01:10:02 -03:00
|
|
|
#--end constants--
|
2006-04-03 12:03:44 -03:00
|
|
|
%define release 1pydotorg
|
2003-02-23 21:09:53 -04:00
|
|
|
%define __prefix /usr
|
|
|
|
|
|
|
|
# kludge to get around rpm <percent>define weirdness
|
|
|
|
%define ipv6 %(if [ "%{config_ipv6}" = yes ]; then echo --enable-ipv6; else echo --disable-ipv6; fi)
|
|
|
|
%define pymalloc %(if [ "%{config_pymalloc}" = yes ]; then echo --with-pymalloc; else echo --without-pymalloc; fi)
|
|
|
|
%define binsuffix %(if [ "%{config_binsuffix}" = none ]; then echo ; else echo "%{config_binsuffix}"; fi)
|
|
|
|
%define include_tkinter %(if [ \\( "%{config_tkinter}" = auto -a -f /usr/bin/wish \\) -o "%{config_tkinter}" = yes ]; then echo 1; else echo 0; fi)
|
2004-10-21 20:35:45 -03:00
|
|
|
%define libdirname %(( uname -m | egrep -q '_64$' && [ -d /usr/lib64 ] && echo lib64 ) || echo lib)
|
2010-01-16 00:27:58 -04:00
|
|
|
%define sharedlib %(if [ "%{config_sharedlib}" = yes ]; then echo --enable-shared; else echo ; fi)
|
|
|
|
%define include_sharedlib %(if [ "%{config_sharedlib}" = yes ]; then echo 1; else echo 0; fi)
|
2003-02-23 21:09:53 -04:00
|
|
|
|
2003-10-19 15:34:52 -03:00
|
|
|
# detect if documentation is available
|
|
|
|
%define include_docs %(if [ -f "%{_sourcedir}/html-%{version}.tar.bz2" ]; then echo 1; else echo 0; fi)
|
|
|
|
|
2003-02-23 21:09:53 -04:00
|
|
|
Summary: An interpreted, interactive, object-oriented programming language.
|
|
|
|
Name: %{name}%{binsuffix}
|
|
|
|
Version: %{version}
|
|
|
|
Release: %{release}
|
2010-08-01 15:43:29 -03:00
|
|
|
License: PSF
|
2003-02-23 21:09:53 -04:00
|
|
|
Group: Development/Languages
|
2004-10-21 20:35:45 -03:00
|
|
|
Source: Python-%{version}.tar.bz2
|
2003-10-19 15:34:52 -03:00
|
|
|
%if %{include_docs}
|
2003-02-23 21:09:53 -04:00
|
|
|
Source1: html-%{version}.tar.bz2
|
2003-10-19 15:34:52 -03:00
|
|
|
%endif
|
|
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-root
|
2003-02-23 21:09:53 -04:00
|
|
|
BuildPrereq: expat-devel
|
|
|
|
BuildPrereq: db4-devel
|
|
|
|
BuildPrereq: gdbm-devel
|
2006-04-03 12:03:44 -03:00
|
|
|
BuildPrereq: sqlite-devel
|
2003-02-23 21:09:53 -04:00
|
|
|
Prefix: %{__prefix}
|
|
|
|
Packager: Sean Reifschneider <jafo-rpms@tummy.com>
|
|
|
|
|
|
|
|
%description
|
|
|
|
Python is an interpreted, interactive, object-oriented programming
|
|
|
|
language. It incorporates modules, exceptions, dynamic typing, very high
|
|
|
|
level dynamic data types, and classes. Python combines remarkable power
|
|
|
|
with very clear syntax. It has interfaces to many system calls and
|
|
|
|
libraries, as well as to various window systems, and is extensible in C or
|
|
|
|
C++. It is also usable as an extension language for applications that need
|
|
|
|
a programmable interface. Finally, Python is portable: it runs on many
|
|
|
|
brands of UNIX, on PCs under Windows, MS-DOS, and OS/2, and on the
|
|
|
|
Mac.
|
|
|
|
|
|
|
|
%package devel
|
|
|
|
Summary: The libraries and header files needed for Python extension development.
|
|
|
|
Prereq: python%{binsuffix} = %{PACKAGE_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.
|
|
|
|
|
|
|
|
%if %{include_tkinter}
|
|
|
|
%package tkinter
|
|
|
|
Summary: A graphical user interface for the Python scripting language.
|
|
|
|
Group: Development/Languages
|
|
|
|
Prereq: python%{binsuffix} = %{PACKAGE_VERSION}-%{release}
|
|
|
|
|
|
|
|
%description 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.
|
|
|
|
%endif
|
|
|
|
|
|
|
|
%package tools
|
|
|
|
Summary: A collection of development tools included with Python.
|
|
|
|
Group: Development/Tools
|
|
|
|
Prereq: python%{binsuffix} = %{PACKAGE_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.
|
|
|
|
|
2003-10-19 15:34:52 -03:00
|
|
|
%if %{include_docs}
|
2003-02-23 21:09:53 -04:00
|
|
|
%package docs
|
|
|
|
Summary: Python-related documentation.
|
|
|
|
Group: Development/Documentation
|
|
|
|
|
|
|
|
%description docs
|
|
|
|
Documentation relating to the Python programming language in HTML and info
|
|
|
|
formats.
|
2003-10-19 15:34:52 -03:00
|
|
|
%endif
|
2003-02-23 21:09:53 -04:00
|
|
|
|
|
|
|
%changelog
|
2004-12-20 22:22:29 -04:00
|
|
|
* Mon Dec 20 2004 Sean Reifschneider <jafo-rpms@tummy.com> [2.4-2pydotorg]
|
|
|
|
- Changing the idle wrapper so that it passes arguments to idle.
|
|
|
|
|
2004-10-21 20:35:45 -03:00
|
|
|
* Tue Oct 19 2004 Sean Reifschneider <jafo-rpms@tummy.com> [2.4b1-1pydotorg]
|
|
|
|
- Updating to 2.4.
|
|
|
|
|
|
|
|
* Thu Jul 22 2004 Sean Reifschneider <jafo-rpms@tummy.com> [2.3.4-3pydotorg]
|
|
|
|
- Paul Tiemann fixes for %{prefix}.
|
|
|
|
- Adding permission changes for directory as suggested by reimeika.ca
|
|
|
|
- Adding code to detect when it should be using lib64.
|
|
|
|
- Adding a define for the location of /var/www/html for docs.
|
|
|
|
|
2004-05-31 16:40:57 -03:00
|
|
|
* Thu May 27 2004 Sean Reifschneider <jafo-rpms@tummy.com> [2.3.4-2pydotorg]
|
|
|
|
- Including changes from Ian Holsman to build under Red Hat 7.3.
|
|
|
|
- Fixing some problems with the /usr/local path change.
|
|
|
|
|
2004-05-17 10:17:38 -03:00
|
|
|
* Sat Mar 27 2004 Sean Reifschneider <jafo-rpms@tummy.com> [2.3.2-3pydotorg]
|
2004-03-31 14:59:04 -04:00
|
|
|
- Being more agressive about finding the paths to fix for
|
|
|
|
#!/usr/local/bin/python.
|
|
|
|
|
2004-02-15 17:27:03 -04:00
|
|
|
* Sat Feb 07 2004 Sean Reifschneider <jafo-rpms@tummy.com> [2.3.3-2pydotorg]
|
|
|
|
- Adding code to remove "#!/usr/local/bin/python" from particular files and
|
|
|
|
causing the RPM build to terminate if there are any unexpected files
|
|
|
|
which have that line in them.
|
|
|
|
|
2003-10-19 15:34:52 -03:00
|
|
|
* Mon Oct 13 2003 Sean Reifschneider <jafo-rpms@tummy.com> [2.3.2-1pydotorg]
|
|
|
|
- Adding code to detect wether documentation is available to build.
|
|
|
|
|
|
|
|
* Fri Sep 19 2003 Sean Reifschneider <jafo-rpms@tummy.com> [2.3.1-1pydotorg]
|
|
|
|
- Updating to the 2.3.1 release.
|
|
|
|
|
2003-02-24 13:55:37 -04:00
|
|
|
* Mon Feb 24 2003 Sean Reifschneider <jafo-rpms@tummy.com> [2.3b1-1pydotorg]
|
|
|
|
- Updating to 2.3b1 release.
|
|
|
|
|
2003-02-23 21:09:53 -04:00
|
|
|
* Mon Feb 17 2003 Sean Reifschneider <jafo-rpms@tummy.com> [2.3a1-1]
|
|
|
|
- Updating to 2.3 release.
|
|
|
|
|
|
|
|
* Sun Dec 23 2001 Sean Reifschneider <jafo-rpms@tummy.com>
|
|
|
|
[Release 2.2-2]
|
|
|
|
- Added -docs package.
|
|
|
|
- Added "auto" config_tkinter setting which only enables tk if
|
|
|
|
/usr/bin/wish exists.
|
|
|
|
|
|
|
|
* Sat Dec 22 2001 Sean Reifschneider <jafo-rpms@tummy.com>
|
|
|
|
[Release 2.2-1]
|
|
|
|
- Updated to 2.2.
|
|
|
|
- Changed the extension to "2" from "2.2".
|
|
|
|
|
|
|
|
* Tue Nov 18 2001 Sean Reifschneider <jafo-rpms@tummy.com>
|
|
|
|
[Release 2.2c1-1]
|
|
|
|
- Updated to 2.2c1.
|
|
|
|
|
|
|
|
* Thu Nov 1 2001 Sean Reifschneider <jafo-rpms@tummy.com>
|
|
|
|
[Release 2.2b1-3]
|
|
|
|
- Changed the way the sed for fixing the #! in pydoc works.
|
|
|
|
|
|
|
|
* Wed Oct 24 2001 Sean Reifschneider <jafo-rpms@tummy.com>
|
|
|
|
[Release 2.2b1-2]
|
|
|
|
- Fixed missing "email" package, thanks to anonymous report on sourceforge.
|
|
|
|
- Fixed missing "compiler" package.
|
|
|
|
|
|
|
|
* Mon Oct 22 2001 Sean Reifschneider <jafo-rpms@tummy.com>
|
|
|
|
[Release 2.2b1-1]
|
|
|
|
- Updated to 2.2b1.
|
|
|
|
|
|
|
|
* Mon Oct 9 2001 Sean Reifschneider <jafo-rpms@tummy.com>
|
|
|
|
[Release 2.2a4-4]
|
|
|
|
- otto@balinor.mat.unimi.it mentioned that the license file is missing.
|
|
|
|
|
|
|
|
* Sun Sep 30 2001 Sean Reifschneider <jafo-rpms@tummy.com>
|
|
|
|
[Release 2.2a4-3]
|
|
|
|
- Ignacio Vazquez-Abrams pointed out that I had a spruious double-quote in
|
|
|
|
the spec files. Thanks.
|
|
|
|
|
|
|
|
* Wed Jul 25 2001 Sean Reifschneider <jafo-rpms@tummy.com>
|
|
|
|
[Release 2.2a1-1]
|
|
|
|
- Updated to 2.2a1 release.
|
|
|
|
- Changed idle and pydoc to use binsuffix macro
|
|
|
|
|
|
|
|
#######
|
|
|
|
# PREP
|
|
|
|
#######
|
|
|
|
%prep
|
|
|
|
%setup -n Python-%{version}
|
|
|
|
|
|
|
|
########
|
|
|
|
# BUILD
|
|
|
|
########
|
|
|
|
%build
|
2010-01-16 00:27:58 -04:00
|
|
|
echo "Setting for ipv6: %{ipv6}"
|
|
|
|
echo "Setting for pymalloc: %{pymalloc}"
|
|
|
|
echo "Setting for binsuffix: %{binsuffix}"
|
|
|
|
echo "Setting for include_tkinter: %{include_tkinter}"
|
|
|
|
echo "Setting for libdirname: %{libdirname}"
|
|
|
|
echo "Setting for sharedlib: %{sharedlib}"
|
|
|
|
echo "Setting for include_sharedlib: %{include_sharedlib}"
|
|
|
|
./configure --enable-unicode=ucs4 %{sharedlib} %{ipv6} %{pymalloc} --prefix=%{__prefix}
|
2003-02-23 21:09:53 -04:00
|
|
|
make
|
|
|
|
|
|
|
|
##########
|
|
|
|
# INSTALL
|
|
|
|
##########
|
|
|
|
%install
|
|
|
|
# set the install path
|
|
|
|
echo '[install_scripts]' >setup.cfg
|
2004-10-21 20:35:45 -03:00
|
|
|
echo 'install_dir='"${RPM_BUILD_ROOT}%{__prefix}/bin" >>setup.cfg
|
2003-02-23 21:09:53 -04:00
|
|
|
|
|
|
|
[ -d "$RPM_BUILD_ROOT" -a "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT
|
2004-10-21 20:35:45 -03:00
|
|
|
mkdir -p $RPM_BUILD_ROOT%{__prefix}/%{libdirname}/python%{libvers}/lib-dynload
|
2003-02-23 21:09:53 -04:00
|
|
|
make prefix=$RPM_BUILD_ROOT%{__prefix} install
|
|
|
|
|
|
|
|
# REPLACE PATH IN PYDOC
|
|
|
|
if [ ! -z "%{binsuffix}" ]
|
|
|
|
then
|
|
|
|
(
|
|
|
|
cd $RPM_BUILD_ROOT%{__prefix}/bin
|
|
|
|
mv pydoc pydoc.old
|
2004-10-21 20:35:45 -03:00
|
|
|
sed 's|#!.*|#!%{__prefix}/bin/env python'%{binsuffix}'|' \
|
2003-02-23 21:09:53 -04:00
|
|
|
pydoc.old >pydoc
|
|
|
|
chmod 755 pydoc
|
|
|
|
rm -f pydoc.old
|
|
|
|
)
|
|
|
|
fi
|
|
|
|
|
|
|
|
# add the binsuffix
|
|
|
|
if [ ! -z "%{binsuffix}" ]
|
|
|
|
then
|
2010-01-16 00:27:58 -04:00
|
|
|
rm -f $RPM_BUILD_ROOT%{__prefix}/bin/python[0-9a-zA-Z]*
|
|
|
|
( cd $RPM_BUILD_ROOT%{__prefix}/bin;
|
|
|
|
for file in *; do mv "$file" "$file"%{binsuffix}; done )
|
|
|
|
( cd $RPM_BUILD_ROOT%{_mandir}/man1; mv python.1 python%{binsuffix}.1 )
|
2003-02-23 21:09:53 -04:00
|
|
|
fi
|
|
|
|
|
|
|
|
########
|
|
|
|
# Tools
|
2004-12-20 22:22:29 -04:00
|
|
|
echo '#!%{__prefix}/bin/env python%{binsuffix}' >${RPM_BUILD_ROOT}%{__prefix}/bin/idle%{binsuffix}
|
|
|
|
echo 'import os, sys' >>${RPM_BUILD_ROOT}%{__prefix}/bin/idle%{binsuffix}
|
|
|
|
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}
|
|
|
|
echo 'print "Failed to exec Idle"' >>${RPM_BUILD_ROOT}%{__prefix}/bin/idle%{binsuffix}
|
|
|
|
echo 'sys.exit(1)' >>${RPM_BUILD_ROOT}%{__prefix}/bin/idle%{binsuffix}
|
2004-10-21 20:35:45 -03:00
|
|
|
chmod 755 $RPM_BUILD_ROOT%{__prefix}/bin/idle%{binsuffix}
|
|
|
|
cp -a Tools $RPM_BUILD_ROOT%{__prefix}/%{libdirname}/python%{libvers}
|
2003-02-23 21:09:53 -04:00
|
|
|
|
|
|
|
# MAKE FILE LISTS
|
|
|
|
rm -f mainpkg.files
|
2010-01-16 00:27:58 -04:00
|
|
|
find "$RPM_BUILD_ROOT""%{__prefix}"/%{libdirname}/python%{libvers} -type f |
|
2003-02-23 21:09:53 -04:00
|
|
|
sed "s|^${RPM_BUILD_ROOT}|/|" |
|
2010-01-16 00:27:58 -04:00
|
|
|
grep -v -e '/python%{libvers}/config$' -e '_tkinter.so$' >mainpkg.files
|
|
|
|
find "$RPM_BUILD_ROOT""%{__prefix}"/bin -type f -o -type l |
|
2003-02-23 21:09:53 -04:00
|
|
|
sed "s|^${RPM_BUILD_ROOT}|/|" |
|
2010-01-16 00:27:58 -04:00
|
|
|
grep -v -e '/bin/2to3%{binsuffix}$' |
|
|
|
|
grep -v -e '/bin/pydoc%{binsuffix}$' |
|
|
|
|
grep -v -e '/bin/smtpd.py%{binsuffix}$' |
|
2003-02-23 21:09:53 -04:00
|
|
|
grep -v -e '/bin/idle%{binsuffix}$' >>mainpkg.files
|
|
|
|
|
|
|
|
rm -f tools.files
|
2004-10-21 20:35:45 -03:00
|
|
|
find "$RPM_BUILD_ROOT""%{__prefix}"/%{libdirname}/python%{libvers}/idlelib \
|
|
|
|
"$RPM_BUILD_ROOT""%{__prefix}"/%{libdirname}/python%{libvers}/Tools -type f |
|
2003-10-19 15:34:52 -03:00
|
|
|
sed "s|^${RPM_BUILD_ROOT}|/|" >tools.files
|
2010-01-16 00:27:58 -04:00
|
|
|
echo "%{__prefix}"/bin/2to3%{binsuffix} >>tools.files
|
|
|
|
echo "%{__prefix}"/bin/pydoc%{binsuffix} >>tools.files
|
|
|
|
echo "%{__prefix}"/bin/smtpd.py%{binsuffix} >>tools.files
|
2003-02-23 21:09:53 -04:00
|
|
|
echo "%{__prefix}"/bin/idle%{binsuffix} >>tools.files
|
|
|
|
|
|
|
|
######
|
|
|
|
# Docs
|
2003-10-19 15:34:52 -03:00
|
|
|
%if %{include_docs}
|
2004-10-21 20:35:45 -03:00
|
|
|
mkdir -p "$RPM_BUILD_ROOT"%{config_htmldir}
|
2003-02-23 21:09:53 -04:00
|
|
|
(
|
2004-10-21 20:35:45 -03:00
|
|
|
cd "$RPM_BUILD_ROOT"%{config_htmldir}
|
2003-02-23 21:09:53 -04:00
|
|
|
bunzip2 < %{SOURCE1} | tar x
|
|
|
|
)
|
2003-10-19 15:34:52 -03:00
|
|
|
%endif
|
2003-02-23 21:09:53 -04:00
|
|
|
|
2004-02-15 17:27:03 -04:00
|
|
|
# fix the #! line in installed files
|
2004-05-31 16:40:57 -03:00
|
|
|
find "$RPM_BUILD_ROOT" -type f -print0 |
|
|
|
|
xargs -0 grep -l /usr/local/bin/python | while read file
|
2004-02-15 17:27:03 -04:00
|
|
|
do
|
2004-05-31 16:40:57 -03:00
|
|
|
FIXFILE="$file"
|
2004-10-21 20:35:45 -03:00
|
|
|
sed 's|^#!.*python|#!%{__prefix}/bin/env python'"%{binsuffix}"'|' \
|
2004-05-31 16:40:57 -03:00
|
|
|
"$FIXFILE" >/tmp/fix-python-path.$$
|
|
|
|
cat /tmp/fix-python-path.$$ >"$FIXFILE"
|
2004-02-15 17:27:03 -04:00
|
|
|
rm -f /tmp/fix-python-path.$$
|
|
|
|
done
|
|
|
|
|
|
|
|
# check to see if there are any straggling #! lines
|
|
|
|
find "$RPM_BUILD_ROOT" -type f | xargs egrep -n '^#! */usr/local/bin/python' \
|
|
|
|
| grep ':1:#!' >/tmp/python-rpm-files.$$ || true
|
|
|
|
if [ -s /tmp/python-rpm-files.$$ ]
|
|
|
|
then
|
|
|
|
echo '*****************************************************'
|
|
|
|
cat /tmp/python-rpm-files.$$
|
|
|
|
cat <<@EOF
|
|
|
|
*****************************************************
|
|
|
|
There are still files referencing /usr/local/bin/python in the
|
|
|
|
install directory. They are listed above. Please fix the .spec
|
|
|
|
file and try again. If you are an end-user, you probably want
|
|
|
|
to report this to jafo-rpms@tummy.com as well.
|
|
|
|
*****************************************************
|
|
|
|
@EOF
|
|
|
|
rm -f /tmp/python-rpm-files.$$
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
rm -f /tmp/python-rpm-files.$$
|
|
|
|
|
2003-02-23 21:09:53 -04:00
|
|
|
########
|
|
|
|
# CLEAN
|
|
|
|
########
|
|
|
|
%clean
|
2003-10-19 15:34:52 -03:00
|
|
|
[ -n "$RPM_BUILD_ROOT" -a "$RPM_BUILD_ROOT" != / ] && rm -rf $RPM_BUILD_ROOT
|
2003-02-23 21:09:53 -04:00
|
|
|
rm -f mainpkg.files tools.files
|
|
|
|
|
|
|
|
########
|
|
|
|
# FILES
|
|
|
|
########
|
|
|
|
%files -f mainpkg.files
|
|
|
|
%defattr(-,root,root)
|
|
|
|
%doc Misc/README Misc/cheatsheet Misc/Porting
|
|
|
|
%doc LICENSE Misc/ACKS Misc/HISTORY Misc/NEWS
|
2010-01-16 00:27:58 -04:00
|
|
|
%{_mandir}/man1/python%{binsuffix}.1*
|
2003-02-23 21:09:53 -04:00
|
|
|
|
2004-10-21 20:35:45 -03:00
|
|
|
%attr(755,root,root) %dir %{__prefix}/include/python%{libvers}
|
|
|
|
%attr(755,root,root) %dir %{__prefix}/%{libdirname}/python%{libvers}/
|
2010-01-16 00:27:58 -04:00
|
|
|
%if %{include_sharedlib}
|
|
|
|
%{__prefix}/%{libdirname}/libpython*
|
|
|
|
%endif
|
2003-02-23 21:09:53 -04:00
|
|
|
|
|
|
|
%files devel
|
|
|
|
%defattr(-,root,root)
|
|
|
|
%{__prefix}/include/python%{libvers}/*.h
|
2004-10-21 20:35:45 -03:00
|
|
|
%{__prefix}/%{libdirname}/python%{libvers}/config
|
2003-02-23 21:09:53 -04:00
|
|
|
|
|
|
|
%files -f tools.files tools
|
|
|
|
%defattr(-,root,root)
|
|
|
|
|
|
|
|
%if %{include_tkinter}
|
|
|
|
%files tkinter
|
|
|
|
%defattr(-,root,root)
|
2004-10-21 20:35:45 -03:00
|
|
|
%{__prefix}/%{libdirname}/python%{libvers}/lib-tk
|
|
|
|
%{__prefix}/%{libdirname}/python%{libvers}/lib-dynload/_tkinter.so*
|
2003-02-23 21:09:53 -04:00
|
|
|
%endif
|
|
|
|
|
2003-10-19 15:34:52 -03:00
|
|
|
%if %{include_docs}
|
2003-02-23 21:09:53 -04:00
|
|
|
%files docs
|
|
|
|
%defattr(-,root,root)
|
2004-10-21 20:35:45 -03:00
|
|
|
%{config_htmldir}/*
|
2003-10-19 15:34:52 -03:00
|
|
|
%endif
|