15
0

Accepting request 800654 from devel:languages:python

- Don't use %python3_only command, but properly use alternatives.

OBS-URL: https://build.opensuse.org/request/show/800654
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-CommonMark?expand=0&rev=11
This commit is contained in:
2020-05-08 21:02:40 +00:00
committed by Git OBS Bridge
2 changed files with 15 additions and 1 deletions

View File

@@ -1,3 +1,8 @@
-------------------------------------------------------------------
Wed May 6 09:55:17 UTC 2020 - Matej Cepl <mcepl@suse.com>
- Don't use %python3_only command, but properly use alternatives.
-------------------------------------------------------------------
Mon Mar 16 10:26:20 UTC 2020 - Tomáš Chvátal <tchvatal@suse.com>

View File

@@ -30,6 +30,8 @@ BuildRequires: %{python_module setuptools}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
Requires: python-setuptools
Requires(post): update-alternatives
Requires(postun): update-alternatives
Provides: python-commonmark = %{version}
Obsoletes: python-commonmark < %{version}
BuildArch: noarch
@@ -60,6 +62,7 @@ CommonMark specification, using only native modules.
%install
%python_install
%python_clone -a %{buildroot}%{_bindir}/cmark
%python_expand %fdupes %{buildroot}%{$python_sitelib}
%check
@@ -68,10 +71,16 @@ export LANG=en_US.UTF-8
# On python2 we error out on unicode issues
PYTHONPATH=%{buildroot}%{python3_sitelib} python3 setup.py test
%post
%python_install_alternative cmark
%postun
%python_uninstall_alternative cmark
%files %{python_files}
%license LICENSE
%doc README.rst
%{python_sitelib}/*
%python3_only %{_bindir}/cmark
%python_alternative %{_bindir}/cmark
%changelog