From 87db58e05bdfea9fb3f446d5d7da26002fe2648b6a7e35cc61df61e59fbd0e39 Mon Sep 17 00:00:00 2001 From: Matej Cepl Date: Tue, 14 Apr 2020 11:38:38 +0000 Subject: [PATCH] - Don't use %python3_only command, but properly use alternatives. OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-Pygments?expand=0&rev=63 --- python-Pygments.changes | 5 +++++ python-Pygments.spec | 16 +++++++--------- 2 files changed, 12 insertions(+), 9 deletions(-) diff --git a/python-Pygments.changes b/python-Pygments.changes index 586c7c8..984642b 100644 --- a/python-Pygments.changes +++ b/python-Pygments.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Tue Apr 14 11:38:23 UTC 2020 - Matej Cepl + +- Don't use %python3_only command, but properly use alternatives. + ------------------------------------------------------------------- Wed Mar 18 21:42:09 UTC 2020 - BenoƮt Monin diff --git a/python-Pygments.spec b/python-Pygments.spec index a52121b..152f566 100644 --- a/python-Pygments.spec +++ b/python-Pygments.spec @@ -67,22 +67,20 @@ sed -i '1 { /^#!/ d }' pygments/lexers/_usd_builtins.py %install %python_install -%{python_expand %$python_install -mv %{buildroot}%{_bindir}/pygmentize %{buildroot}%{_bindir}/pygmentize-%{$python_bin_suffix} -rm -rf %{buildroot}%{$python_sitelib}/tests -%fdupes %{buildroot}%{$python_sitelib} -%if "%{python3_bin_suffix}" != "" install -Dm0644 doc/pygmentize.1 %{buildroot}%{_mandir}/man1/pygmentize.1 -%endif +%python_clone -a %{buildroot}%{_bindir}/pygmentize +%python_clone -a %{buildroot}%{_mandir}/man1/pygmentize.1 +%{python_expand rm -rf %{buildroot}%{$python_sitelib}/tests +%fdupes %{buildroot}%{$python_sitelib} } %prepare_alternative pygmentize %post -%python_install_alternative pygmentize +%{python_install_alternative pygmentize pygmentize.1} %postun -%python_uninstall_alternative pygmentize +%{python_uninstall_alternative pygmentize pygmentize.1} %check %pytest @@ -91,7 +89,7 @@ install -Dm0644 doc/pygmentize.1 %{buildroot}%{_mandir}/man1/pygmentize.1 %license LICENSE %doc AUTHORS CHANGES %python_alternative %{_bindir}/pygmentize -%python3_only %{_mandir}/man1/pygmentize.1* +%python_alternative %{_mandir}/man1/pygmentize.1%{ext_man} %{python_sitelib}/pygments/ %{python_sitelib}/Pygments-%{version}-py%{python_version}.egg-info/