# sitelib for noarch packages, sitearch for others (remove the unneeded one) %{!?python_sitelib: %define python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")} Name: python-enum Version: 0.4.3 Release: 3%{?dist} Summary: Robust enumerated type support in Python Group: Development/Languages License: GPLv2+ or Python URL: http://cheeseshop.python.org/pypi/enum/ Source0: http://pypi.python.org/packages/source/e/enum/enum-%{version}.tar.gz Source1: python-enum-README.txt BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildArch: noarch BuildRequires: python-devel %if 0%{?fedora} >= 8 BuildRequires: python-setuptools-devel %else BuildRequires: python-setuptools %endif %description This package provides a module for robust enumerations in Python. %prep %setup -q -n enum-%{version} cp -p %{SOURCE1} README %build # Remove CFLAGS=... for noarch packages (unneeded) %{__python} setup.py build %install rm -rf $RPM_BUILD_ROOT %{__python} setup.py install -O1 --skip-build --root $RPM_BUILD_ROOT %clean rm -rf $RPM_BUILD_ROOT %files %defattr(-,root,root,-) %doc LICENSE.GPL LICENSE.PSF PKG-INFO README %{python_sitelib}/* %changelog * Thu Nov 22 2007 Matej Cepl 0.4.3-3 - fix %%changelog * Thu Nov 22 2007 Matej Cepl 0.4.3-2 - reduce %%description and put the stuff into README file. * Thu Nov 22 2007 Matej Cepl 0.4.3-1.fc9 - The initial attempt to package.