2017-07-04 05:24:49 +00:00
|
|
|
#
|
|
|
|
# spec file for package python-vdirsyncer
|
|
|
|
#
|
2021-02-28 23:11:59 +00:00
|
|
|
# Copyright (c) 2021 SUSE LLC
|
2017-07-04 05:24:49 +00:00
|
|
|
#
|
|
|
|
# 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.
|
|
|
|
|
2019-06-05 07:16:21 +00:00
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
2017-07-04 05:24:49 +00:00
|
|
|
#
|
|
|
|
|
|
|
|
|
2018-07-04 07:18:06 +00:00
|
|
|
%define skip_python2 1
|
2017-07-04 05:24:49 +00:00
|
|
|
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
|
|
|
Name: python-vdirsyncer
|
2020-07-23 10:06:34 +00:00
|
|
|
Version: 0.16.8
|
2017-07-04 05:24:49 +00:00
|
|
|
Release: 0
|
2019-04-08 08:33:42 +00:00
|
|
|
Summary: CalDAV and CardDAV synchronization module
|
2017-07-04 12:41:09 +00:00
|
|
|
License: BSD-3-Clause
|
2017-07-04 05:24:49 +00:00
|
|
|
Group: Productivity/Networking/News/Utilities
|
2019-06-05 07:16:21 +00:00
|
|
|
URL: https://github.com/pimutils/vdirsyncer
|
2018-07-04 07:18:06 +00:00
|
|
|
Source0: https://files.pythonhosted.org/packages/source/v/vdirsyncer/vdirsyncer-%{version}.tar.gz
|
|
|
|
Source1: vdirsyncer.service
|
|
|
|
Source2: vdirsyncer.timer
|
2019-05-07 10:11:51 +00:00
|
|
|
# default deadline (200ms) is too short for obs
|
|
|
|
Patch1: python-vdirsyncer-shift-deadline.patch
|
2020-09-01 20:17:04 +00:00
|
|
|
# Compatibility with latest click - taken directly from upstream git
|
|
|
|
Patch2: 3eb9ce5ae4320d52e6c876874511ff96a8a45f51.patch
|
2021-05-31 16:10:00 +00:00
|
|
|
# PATCH-FIX-UPSTREAM deprecated_getiterator.patch bugno mcepl@suse.com
|
|
|
|
# .getiterator() in etree.Element is obsolete, use just plain iter()
|
|
|
|
Patch0: deprecated_getiterator.patch
|
2020-06-07 21:35:32 +00:00
|
|
|
BuildRequires: %{python_module atomicwrites}
|
2017-07-04 05:24:49 +00:00
|
|
|
BuildRequires: %{python_module setuptools_scm}
|
|
|
|
BuildRequires: fdupes
|
2020-05-18 13:00:57 +00:00
|
|
|
BuildRequires: pkgconfig
|
2017-07-04 05:24:49 +00:00
|
|
|
BuildRequires: python-rpm-macros
|
2018-07-04 07:18:06 +00:00
|
|
|
BuildRequires: systemd-rpm-macros
|
2020-02-03 18:21:20 +00:00
|
|
|
BuildRequires: pkgconfig(systemd)
|
2017-07-04 05:24:49 +00:00
|
|
|
Requires: python-atomicwrites >= 0.1.7
|
|
|
|
Requires: python-click >= 5.0
|
2018-07-04 07:18:06 +00:00
|
|
|
Requires: python-click-log >= 0.3
|
2017-07-04 05:24:49 +00:00
|
|
|
Requires: python-click-threading >= 0.2
|
2020-07-23 10:06:34 +00:00
|
|
|
Requires: python-requests >= 2.20.0
|
2017-07-04 05:24:49 +00:00
|
|
|
Requires: python-requests-toolbelt >= 0.4.0
|
2020-05-18 13:00:57 +00:00
|
|
|
Requires(post): update-alternatives
|
2021-03-12 19:57:16 +00:00
|
|
|
Requires(postun):update-alternatives
|
2017-07-04 05:24:49 +00:00
|
|
|
Recommends: python-requests-oauthlib
|
2018-07-18 08:06:03 +00:00
|
|
|
BuildArch: noarch
|
2019-06-05 07:16:21 +00:00
|
|
|
# SECTION test requirements
|
|
|
|
BuildRequires: %{python_module click-log >= 0.3}
|
|
|
|
BuildRequires: %{python_module click-threading >= 0.2}
|
2020-07-23 10:06:34 +00:00
|
|
|
BuildRequires: %{python_module hypothesis >= 5.0.0}
|
2019-06-05 07:16:21 +00:00
|
|
|
BuildRequires: %{python_module pytest-localserver}
|
|
|
|
BuildRequires: %{python_module pytest-subtesthack}
|
|
|
|
BuildRequires: %{python_module pytest}
|
2020-07-23 10:06:34 +00:00
|
|
|
BuildRequires: %{python_module requests >= 2.20.0}
|
2019-06-05 07:16:21 +00:00
|
|
|
BuildRequires: %{python_module requests-toolbelt >= 0.4.40}
|
|
|
|
BuildRequires: %{python_module urllib3}
|
|
|
|
# /SECTION
|
2018-07-18 08:06:03 +00:00
|
|
|
Provides: vdirsyncer = %{version}
|
2017-07-04 12:41:09 +00:00
|
|
|
Obsoletes: vdirsyncer < %{version}
|
2017-07-04 05:24:49 +00:00
|
|
|
%python_subpackages
|
|
|
|
|
|
|
|
%description
|
2019-04-08 08:33:42 +00:00
|
|
|
Vdirsyncer synchronizes calendars and addressbooks between two
|
|
|
|
storages. The supported storages are CalDAV, CardDAV, arbitrary HTTP
|
|
|
|
resources, vdir and some more. It aims to be for CalDAV and CardDAV
|
|
|
|
what OfflineIMAP is for IMAP.
|
2017-07-04 05:24:49 +00:00
|
|
|
|
|
|
|
%prep
|
2021-05-31 16:10:00 +00:00
|
|
|
%autosetup -p1 -n vdirsyncer-%{version}
|
|
|
|
|
2017-07-04 05:24:49 +00:00
|
|
|
rm -rf vdirsyncer.egg-info
|
|
|
|
|
|
|
|
%build
|
|
|
|
%python_build
|
|
|
|
|
|
|
|
%install
|
|
|
|
%python_install
|
2020-05-18 13:00:57 +00:00
|
|
|
%python_clone -a %{buildroot}%{_bindir}/vdirsyncer
|
2017-07-04 05:24:49 +00:00
|
|
|
|
2018-07-04 07:18:06 +00:00
|
|
|
mkdir -p %{buildroot}%{_userunitdir}
|
2021-03-12 19:57:16 +00:00
|
|
|
%{python_expand \
|
|
|
|
install -Dpm 0644 %{SOURCE1} %{buildroot}%{_userunitdir}/vdirsyncer-%{$python_bin_suffix}.service
|
|
|
|
install -Dpm 0644 %{SOURCE2} %{buildroot}%{_userunitdir}/vdirsyncer-%{$python_bin_suffix}.timer
|
|
|
|
%fdupes %{buildroot}/%{$python_sitelib}
|
|
|
|
}
|
|
|
|
%prepare_alternative -t %{_userunitdir}/vdirsyncer.service vdirsyncer.service
|
|
|
|
%prepare_alternative -t %{_userunitdir}/vdirsyncer.timer vdirsyncer.timer
|
2018-07-04 07:18:06 +00:00
|
|
|
|
2019-04-03 11:17:48 +00:00
|
|
|
%check
|
2019-05-07 10:11:51 +00:00
|
|
|
export DETERMINISTIC_TESTS=true
|
2020-04-29 12:52:09 +00:00
|
|
|
# test_verbosity - click changed syntax and returns different quotes
|
|
|
|
%pytest -k 'not test_legacy_status and not test_open_graphical_browser and not test_verbosity'
|
2019-04-03 11:17:48 +00:00
|
|
|
|
2020-05-18 13:00:57 +00:00
|
|
|
%post
|
2021-03-12 19:57:16 +00:00
|
|
|
update-alternatives --install %{_bindir}/vdirsyncer vdirsyncer %{_bindir}/vdirsyncer-%{python_bin_suffix} %{python_version_nodots} \
|
|
|
|
--slave %{_userunitdir}/vdirsyncer.service vdirsyncer.service %{_userunitdir}/vdirsyncer-%{python_bin_suffix}.service \
|
|
|
|
--slave %{_userunitdir}/vdirsyncer.timer vdirsyncer.timer %{_userunitdir}/vdirsyncer-%{python_bin_suffix}.timer
|
|
|
|
update-alternatives --auto vdirsyncer
|
2020-05-18 13:00:57 +00:00
|
|
|
|
|
|
|
%postun
|
|
|
|
%python_uninstall_alternative vdirsyncer
|
|
|
|
|
2017-07-04 05:24:49 +00:00
|
|
|
%files %{python_files}
|
2018-07-04 07:18:06 +00:00
|
|
|
%doc README.rst
|
|
|
|
%license LICENSE
|
2020-05-18 13:00:57 +00:00
|
|
|
%python_alternative %{_bindir}/vdirsyncer
|
2021-03-12 19:57:16 +00:00
|
|
|
%{python_sitelib}/vdirsyncer*
|
|
|
|
%{_userunitdir}/vdirsyncer-%{python_bin_suffix}.service
|
|
|
|
%{_userunitdir}/vdirsyncer-%{python_bin_suffix}.timer
|
2018-07-04 07:18:06 +00:00
|
|
|
%{_userunitdir}/vdirsyncer.service
|
|
|
|
%{_userunitdir}/vdirsyncer.timer
|
2021-03-12 19:57:16 +00:00
|
|
|
%ghost %{_sysconfdir}/alternatives/vdirsyncer*
|
2017-07-04 05:24:49 +00:00
|
|
|
|
|
|
|
%changelog
|