%if 0%{?fedora} < 13 && 0%{?rhel} < 6 %{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")} %endif Name: python-icalendar Version: 2.1 Release: 3%{?dist} Summary: Parser/generator of iCalendar files following the RFC 2445 Group: Development/Libraries # test.py is GPLv2 # parser is GPL # doctest.py is Public Domain # rest is LGPLv2 License: LGPLv2 and GPLv2 and GPLv2+ and Public Domain URL: http://codespeak.net/icalendar/ # source releases are done on pypi (homepage states 1.2 as latest version) Source0: http://pypi.python.org/packages/source/i/icalendar/icalendar-%{version}.tar.gz Patch0: %{name}-2.7-test.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildArch: noarch BuildRequires: python2-devel,python-setuptools %description iCalendar specification (RFC 2445) defines calendaring format used by many applications (Zimbra, Thunderbird and others). This module is a parser/generator of iCalendar files for use with Python. It follows the RFC 2445 (iCalendar) specification. The aim is to make a package that is fully compliant with RFC 2445, well designed, simple to use and well documented. %prep %setup -q -n icalendar-%{version} %patch0 cp -R doc/ examples/ %build %{__python} setup.py build %install rm -rf $RPM_BUILD_ROOT %{__python} setup.py install --skip-build --root $RPM_BUILD_ROOT %check %{__python} test.py %clean rm -rf $RPM_BUILD_ROOT %files %defattr(-,root,root,-) %doc LICENSE.txt README.txt CREDITS.txt CHANGES.txt HISTORY.txt TODO.txt INSTALL.txt %doc examples %{python_sitelib}/icalendar %{python_sitelib}/*.egg-info %changelog * Thu Aug 5 2010 Stanislav Ochotnicky - 2.1-3 - Install examples - Fix tests for Python 2.7 and run them - Add GPLv2 for parser.py to licenses * Wed Aug 4 2010 Stanislav Ochotnicky - 2.1-2 - State correct licenses * Tue Aug 3 2010 Stanislav Ochotnicky - 2.1-1 - Initial package version