File python-icalendar.spec of Package python-icalendar

#
# spec file for package python-icalendar
#
# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany.
# Copyright (c) 7/2011 - now  open-slx GmbH <Sascha.Manns@open-slx.de>
# Copyright (c) 2009 - 7/2011 Sascha Manns <saigkill@opensuse.org> 
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via http://bugs.opensuse.org/
#


%define	modname icalendar
Name:           python-%{modname}
Version:        3.9.1
Release:        0
Summary:        Python parser/generator of iCalendar files package
License:        BSD-2-Clause
Group:          Development/Languages/Python
# please see https://github.com/collective/icalendar/issues/2 for re-licensing discussion
Url:            http://icalendar.readthedocs.org
Source0:        https://pypi.python.org/packages/source/i/icalendar/%{modname}-%{version}.tar.gz
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildRequires:  fdupes
BuildRequires:  python-dateutil
BuildRequires:  python-devel
BuildRequires:  python-pytest
BuildRequires:  python-pytz
BuildRequires:  python-setuptools
Requires:       python-dateutil
Requires:       python-pytz
%{py_requires}
%if 0%{?suse_version} <= 1110
BuildRequires:  python-ordereddict
Requires:       python-ordereddict
BuildRequires:  python-unittest2
%{!?python_sitelib: %global python_sitelib %(python -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")}
%else
BuildArch:      noarch
%endif
Provides:       %{name}-doc = %{version}
Obsoletes:      %{name}-doc < %{version}

%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 %{modname}-%{version}

%build
python setup.py build

%install
python setup.py install --prefix=%{_prefix} --root=%{buildroot}
%fdupes -s %{buildroot}

%check
py.test src

%files
%defattr(-,root,root)
%doc README.rst LICENSE.rst CHANGES.rst
%{python_sitelib}/%{modname}/
%{python_sitelib}/%{modname}-%{version}-py%{py_ver}.egg-info/

%changelog
openSUSE Build Service is sponsored by