- 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
This commit is contained in:
parent
261354f07d
commit
87db58e05b
@ -1,3 +1,8 @@
|
||||
-------------------------------------------------------------------
|
||||
Tue Apr 14 11:38:23 UTC 2020 - Matej Cepl <mcepl@suse.com>
|
||||
|
||||
- Don't use %python3_only command, but properly use alternatives.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Mar 18 21:42:09 UTC 2020 - Benoît Monin <benoit.monin@gmx.fr>
|
||||
|
||||
|
@ -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/
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user