File python-caldav.spec of Package python-caldav

#
# spec file for package python-caldav
#
# Copyright (c) 2016 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# 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/
#


Name:           python-caldav
Version:        0.4.0
Release:        0
Url:            https://pypi.python.org/pypi/caldav
Summary:        CalDAV (RFC4791) client library
License:        GPL-3.0+ and Apache-2.0
Group:          Development/Languages/Python
Source:         https://files.pythonhosted.org/packages/source/c/caldav/caldav-%{version}.tar.gz
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildRequires:  python-devel
BuildRequires:  python-setuptools
BuildRequires:  python-lxml
BuildRequires:  python-nose
BuildRequires:  python-requests
BuildRequires:  python-six
BuildRequires:  python-vobject
Requires:       python-lxml
Requires:       python-nose
Requires:       python-requests
Requires:       python-six
Requires:       python-vobject
%if 0%{?suse_version} && 0%{?suse_version} <= 1110
%{!?python_sitelib: %global python_sitelib %(python -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
%else
BuildArch:      noarch
%endif   

%description
This project is a CalDAV (RFC4791) client library for Python.
I started it for my work at the AUF.

A lot of work still needs to be done, but it can read everything,
and write a few things (create calendars, events, modify events
and properties).

%prep
%setup -q -n caldav-%{version}

%build
python setup.py build

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

# Remove test files
rm -rf %{buildroot}%{python_sitelib}/tests/

%check
# Exclude tests that require network connections
nosetests -e TestForServer_baikal_tobixen_no80

%files
%defattr(-,root,root)
%doc COPYING.APACHE COPYING.GPL
%{python_sitelib}/caldav-%{version}-py*.egg-info
%{python_sitelib}/caldav/
openSUSE Build Service is sponsored by