forked from pool/python-vdirsyncer
		
	Accepting request 884562 from devel:languages:python
- Remove ifpython3 macro guarding the Provides/Obsoletes - Set up update-alternatives for systemd unit files. - Fix source references -fix compatibility with latest click - patch taken directly from upstream git * 3eb9ce5ae4320d52e6c876874511ff96a8a45f51.patch OBS-URL: https://build.opensuse.org/request/show/884562 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-vdirsyncer?expand=0&rev=13
This commit is contained in:
		
							
								
								
									
										39
									
								
								3eb9ce5ae4320d52e6c876874511ff96a8a45f51.patch
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										39
									
								
								3eb9ce5ae4320d52e6c876874511ff96a8a45f51.patch
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,39 @@ | ||||
| From 3eb9ce5ae4320d52e6c876874511ff96a8a45f51 Mon Sep 17 00:00:00 2001 | ||||
| From: Hugo Osvaldo Barrera <hugo@barrera.io> | ||||
| Date: Tue, 9 Jun 2020 14:45:02 +0200 | ||||
| Subject: [PATCH] Add compatibility with latest click | ||||
|  | ||||
| --- | ||||
|  setup.py                      | 2 +- | ||||
|  tests/system/cli/test_sync.py | 5 ++++- | ||||
|  2 files changed, 5 insertions(+), 2 deletions(-) | ||||
|  | ||||
| diff --git a/setup.py b/setup.py | ||||
| index 59549f16..d584b95d 100644 | ||||
| --- a/setup.py | ||||
| +++ b/setup.py | ||||
| @@ -11,7 +11,7 @@ | ||||
|   | ||||
|  requirements = [ | ||||
|      # https://github.com/mitsuhiko/click/issues/200 | ||||
| -    'click>=5.0,<6.0', | ||||
| +    'click>=5.0', | ||||
|      'click-log>=0.3.0, <0.4.0', | ||||
|   | ||||
|      # https://github.com/pimutils/vdirsyncer/issues/478 | ||||
| diff --git a/tests/system/cli/test_sync.py b/tests/system/cli/test_sync.py | ||||
| index f2423764..43d35dd8 100644 | ||||
| --- a/tests/system/cli/test_sync.py | ||||
| +++ b/tests/system/cli/test_sync.py | ||||
| @@ -123,7 +123,10 @@ def test_verbosity(tmpdir, runner): | ||||
|      runner.write_with_general('') | ||||
|      result = runner.invoke(['--verbosity=HAHA', 'sync']) | ||||
|      assert result.exception | ||||
| -    assert 'invalid value for "--verbosity"' in result.output.lower() | ||||
| +    assert ( | ||||
| +        'invalid value for "--verbosity"' in result.output.lower() | ||||
| +        or "invalid value for '--verbosity'" in result.output.lower() | ||||
| +    ) | ||||
|   | ||||
|   | ||||
|  def test_collections_cache_invalidation(tmpdir, runner): | ||||
| @@ -1,3 +1,24 @@ | ||||
| ------------------------------------------------------------------- | ||||
| Tue Apr 12 06:56:05 UTC 2021 - Steve Kowalik <steven.kowalik@suse.com> | ||||
|  | ||||
| - Remove ifpython3 macro guarding the Provides/Obsoletes  | ||||
|  | ||||
| ------------------------------------------------------------------- | ||||
| Fri Mar 12 19:57:06 UTC 2021 - Matej Cepl <mcepl@suse.com> | ||||
|  | ||||
| - Set up update-alternatives for systemd unit files. | ||||
|  | ||||
| ------------------------------------------------------------------- | ||||
| Sun Feb 28 22:24:56 UTC 2021 - Hans-Peter Jansen <hpj@urpla.net> | ||||
|  | ||||
| - Fix source references | ||||
|  | ||||
| ------------------------------------------------------------------- | ||||
| Tue Sep  1 15:11:22 UTC 2020 - Michal Hrusecky <michal.hrusecky@opensuse.org> | ||||
|  | ||||
| -fix compatibility with latest click - patch taken directly from upstream git | ||||
|  * 3eb9ce5ae4320d52e6c876874511ff96a8a45f51.patch  | ||||
|  | ||||
| ------------------------------------------------------------------- | ||||
| Thu Jul 23 09:16:29 UTC 2020 - Marketa Calabkova <mcalabkova@suse.com> | ||||
|  | ||||
|   | ||||
| @@ -1,7 +1,7 @@ | ||||
| # | ||||
| # spec file for package python-vdirsyncer | ||||
| # | ||||
| # Copyright (c) 2020 SUSE LLC | ||||
| # Copyright (c) 2021 SUSE LLC | ||||
| # | ||||
| # All modifications and additions to the file contributed by third parties | ||||
| # remain the property of their copyright owners, unless otherwise agreed | ||||
| @@ -30,6 +30,8 @@ Source1:        vdirsyncer.service | ||||
| Source2:        vdirsyncer.timer | ||||
| # default deadline (200ms) is too short for obs | ||||
| Patch1:         python-vdirsyncer-shift-deadline.patch | ||||
| # Compatibility with latest click - taken directly from upstream git | ||||
| Patch2:         3eb9ce5ae4320d52e6c876874511ff96a8a45f51.patch | ||||
| BuildRequires:  %{python_module atomicwrites} | ||||
| BuildRequires:  %{python_module setuptools_scm} | ||||
| BuildRequires:  fdupes | ||||
| @@ -44,7 +46,7 @@ Requires:       python-click-threading >= 0.2 | ||||
| Requires:       python-requests >= 2.20.0 | ||||
| Requires:       python-requests-toolbelt >= 0.4.0 | ||||
| Requires(post): update-alternatives | ||||
| Requires(postun): update-alternatives | ||||
| Requires(postun):update-alternatives | ||||
| Recommends:     python-requests-oauthlib | ||||
| BuildArch:      noarch | ||||
| # SECTION test requirements | ||||
| @@ -58,10 +60,8 @@ BuildRequires:  %{python_module requests >= 2.20.0} | ||||
| BuildRequires:  %{python_module requests-toolbelt >= 0.4.40} | ||||
| BuildRequires:  %{python_module urllib3} | ||||
| # /SECTION | ||||
| %ifpython3 | ||||
| Provides:       vdirsyncer = %{version} | ||||
| Obsoletes:      vdirsyncer < %{version} | ||||
| %endif | ||||
| %python_subpackages | ||||
|  | ||||
| %description | ||||
| @@ -73,6 +73,7 @@ what OfflineIMAP is for IMAP. | ||||
| %prep | ||||
| %setup -q -n vdirsyncer-%{version} | ||||
| %patch1 -p1 | ||||
| %patch2 -p1 | ||||
| rm -rf vdirsyncer.egg-info | ||||
|  | ||||
| %build | ||||
| @@ -81,11 +82,15 @@ rm -rf vdirsyncer.egg-info | ||||
| %install | ||||
| %python_install | ||||
| %python_clone -a %{buildroot}%{_bindir}/vdirsyncer | ||||
| %python_expand %fdupes %{buildroot}/%{$python_sitelib} | ||||
|  | ||||
| mkdir -p %{buildroot}%{_userunitdir} | ||||
| install -Dpm 0644 %{SOURCE0} %{buildroot}%{_userunitdir}/vdirsyncer.service | ||||
| install -Dpm 0644 %{SOURCE1} %{buildroot}%{_userunitdir}/vdirsyncer.timer | ||||
| %{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 | ||||
|  | ||||
| %check | ||||
| export DETERMINISTIC_TESTS=true | ||||
| @@ -93,7 +98,10 @@ export DETERMINISTIC_TESTS=true | ||||
| %pytest -k 'not test_legacy_status and not test_open_graphical_browser and not test_verbosity' | ||||
|  | ||||
| %post | ||||
| %python_install_alternative vdirsyncer | ||||
| 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 | ||||
|  | ||||
| %postun | ||||
| %python_uninstall_alternative vdirsyncer | ||||
| @@ -102,8 +110,11 @@ export DETERMINISTIC_TESTS=true | ||||
| %doc README.rst | ||||
| %license LICENSE | ||||
| %python_alternative %{_bindir}/vdirsyncer | ||||
| %{python_sitelib}/* | ||||
| %{python_sitelib}/vdirsyncer* | ||||
| %{_userunitdir}/vdirsyncer-%{python_bin_suffix}.service | ||||
| %{_userunitdir}/vdirsyncer-%{python_bin_suffix}.timer | ||||
| %{_userunitdir}/vdirsyncer.service | ||||
| %{_userunitdir}/vdirsyncer.timer | ||||
| %ghost %{_sysconfdir}/alternatives/vdirsyncer* | ||||
|  | ||||
| %changelog | ||||
|   | ||||
		Reference in New Issue
	
	Block a user