%{?!pybasever:%{expand:%%define pyver %(python -c 'import sys ; print sys.version[:3]')}} %{?!pynext:%{expand:%%define pynext %(python -c 'print %{pyver} + 0.1')}} %{!?python_sitelib: %define python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")} %define srcname iCalendar Name: python-%{srcname} Version: 0.11 Release: 1%{?dist} Summary: Python module for iCalendar manipulation Group: Development/Languages License: Python URL: http://codespeak.net/icalendar/ Source: http://codespeak.net/icalendar/%{srcname}-%{version}.tgz Patch: iCalendar.popitem.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: python-devel Requires: python >= %{pyver}, python < %{pynext} BuildArch: noarch %description The iCalendar package is a parser/generator of iCalendar files for use with Python. It follows the RFC 2445 (iCalendar) specification %prep %setup -q -n %{srcname} %patch -p0 %build env CFLAGS="$RPM_OPT_FLAGS" python setup.py build %install rm -rf $RPM_BUILD_ROOT python setup.py install --root=$RPM_BUILD_ROOT --record=INSTALLED_FILES %clean rm -rf $RPM_BUILD_ROOT %files -f INSTALLED_FILES %defattr(-,root,root) %doc CHANGES.txt LICENSE.txt README.txt %{python_sitelib}/icalendar %changelog * Fri Oct 27 2006 Thomas Vander Stichele - 0.11-1 - initial package