diff --git a/python-docutils-ast-writer.changes b/python-docutils-ast-writer.changes index a303ed5..f334ca5 100644 --- a/python-docutils-ast-writer.changes +++ b/python-docutils-ast-writer.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Tue May 26 07:22:45 UTC 2020 - Petr Gajdos + +- %python3_only -> %python_alternative + ------------------------------------------------------------------- Mon Feb 25 00:58:33 UTC 2019 - John Vandenberg diff --git a/python-docutils-ast-writer.spec b/python-docutils-ast-writer.spec index 4458090..2dafd5f 100644 --- a/python-docutils-ast-writer.spec +++ b/python-docutils-ast-writer.spec @@ -1,7 +1,7 @@ # # spec file for package python-docutils-ast-writer # -# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2020 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -12,25 +12,28 @@ # 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/ +# Please submit bugfixes or comments via https://bugs.opensuse.org/ +# + %{?!python_module:%define python_module() python-%{**} python3-%{**}} Name: python-docutils-ast-writer Version: 0.1.2 Release: 0 -License: MIT Summary: AST Writer for docutils -Url: https://github.com/jimo1001/docutils-ast-writer +License: MIT Group: Development/Languages/Python +URL: https://github.com/jimo1001/docutils-ast-writer Source: https://files.pythonhosted.org/packages/source/d/docutils-ast-writer/docutils-ast-writer-%{version}.tar.gz Source1: https://raw.githubusercontent.com/jimo1001/docutils-ast-writer/master/LICENSE +BuildRequires: %{python_module docutils >= 0.12} BuildRequires: %{python_module setuptools} BuildRequires: fdupes BuildRequires: python-rpm-macros -BuildRequires: %{python_module docutils >= 0.12} Requires: python-docutils >= 0.12 +Requires(post): update-alternatives +Requires(postun): update-alternatives BuildArch: noarch - %python_subpackages %description @@ -45,14 +48,21 @@ cp %{SOURCE1} . %install %python_install +%python_clone -a %{buildroot}%{_bindir}/rst2ast %python_expand %fdupes %{buildroot}%{$python_sitelib} #%%check has no tests https://github.com/jimo1001/docutils-ast-writer/issues/2 +%post +%python_install_alternative rst2ast + +%postun +%python_uninstall_alternative rst2ast + %files %{python_files} %license LICENSE %doc README.rst -%python3_only %{_bindir}/rst2ast +%python_alternative %{_bindir}/rst2ast %{python_sitelib}/* %changelog