From a065420d7dfb6f8cc2f99a282df0de29dfde17c5067c2fc7c083181fed6e646d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Chv=C3=A1tal?= Date: Wed, 20 May 2020 11:28:58 +0000 Subject: [PATCH] Accepting request 807611 from home:pgajdos:python submit OBS-URL: https://build.opensuse.org/request/show/807611 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-pydocstyle?expand=0&rev=17 --- python-pydocstyle.changes | 5 +++++ python-pydocstyle.spec | 11 ++++++++++- 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/python-pydocstyle.changes b/python-pydocstyle.changes index 219e70c..5a0e044 100644 --- a/python-pydocstyle.changes +++ b/python-pydocstyle.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Wed May 20 07:26:23 UTC 2020 - Petr Gajdos + +- %python3_only -> %python_alternative + ------------------------------------------------------------------- Sun Feb 9 17:08:50 UTC 2020 - Arun Persaud diff --git a/python-pydocstyle.spec b/python-pydocstyle.spec index bb6f0c1..6ee50ce 100644 --- a/python-pydocstyle.spec +++ b/python-pydocstyle.spec @@ -42,6 +42,8 @@ BuildRequires: fdupes BuildRequires: python-rpm-macros Requires: python-six > 1.10.0 Requires: python-snowballstemmer +Requires(post): update-alternatives +Requires(postun): update-alternatives Provides: python-pep257 = %{version} Obsoletes: python-pep257 < %{version} BuildArch: noarch @@ -71,6 +73,7 @@ sed -i /^pytestmark/d src/tests/test_integration.py %install %python_install +%python_clone -a %{buildroot}%{_bindir}/pydocstyle %{python_expand # sed -i -e '/^#! \//, 1d' %{buildroot}%{$python_sitelib}/pydocstyle/__main__.py dos2unix %{buildroot}%{$python_sitelib}/pydocstyle/__main__.py @@ -81,10 +84,16 @@ dos2unix %{buildroot}%{$python_sitelib}/pydocstyle/__main__.py export PYTHONPATH=$(pwd)/src %pytest +%post +%python_install_alternative pydocstyle + +%postun +%python_uninstall_alternative pydocstyle + %files %{python_files} %doc README.rst %license LICENSE-MIT -%python3_only %{_bindir}/pydocstyle +%python_alternative %{_bindir}/pydocstyle %{python_sitelib}/pydocstyle %{python_sitelib}/pydocstyle-%{version}-py*.egg-info