14
0
forked from pool/python-pysrt

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

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-pysrt?expand=0&rev=15
This commit is contained in:
2020-05-05 22:19:03 +00:00
committed by Git OBS Bridge
parent bad3a14d81
commit 56db6b673d
2 changed files with 15 additions and 1 deletions

View File

@@ -1,3 +1,8 @@
-------------------------------------------------------------------
Tue May 5 22:18:14 UTC 2020 - Matej Cepl <mcepl@suse.com>
- Don't use %python3_only command, but properly use alternatives.
------------------------------------------------------------------- -------------------------------------------------------------------
Fri Apr 17 11:45:05 UTC 2020 - Paolo Stivanin <info@paolostivanin.com> Fri Apr 17 11:45:05 UTC 2020 - Paolo Stivanin <info@paolostivanin.com>

View File

@@ -31,6 +31,8 @@ BuildRequires: %{python_module setuptools}
BuildRequires: fdupes BuildRequires: fdupes
BuildRequires: python-rpm-macros BuildRequires: python-rpm-macros
Requires: python-chardet Requires: python-chardet
Requires(post): update-alternatives
Requires(postun): update-alternatives
BuildArch: noarch BuildArch: noarch
%python_subpackages %python_subpackages
@@ -48,14 +50,21 @@ sed -e '1d' -i pysrt/commands.py
%install %install
%python_install %python_install
%python_clone -a %{buildroot}%{_bindir}/srt
%python_expand %fdupes %{buildroot}%{$python_sitelib} %python_expand %fdupes %{buildroot}%{$python_sitelib}
%check %check
%pytest %pytest
%post
%python_install_alternative srt
%postun
%python_uninstall_alternative srt
%files %{python_files} %files %{python_files}
%doc README.rst %doc README.rst
%python3_only %{_bindir}/srt %python_alternative %{_bindir}/srt
%{python_sitelib}/pysrt %{python_sitelib}/pysrt
%{python_sitelib}/pysrt-%{version}-py%{python_version}.egg-info %{python_sitelib}/pysrt-%{version}-py%{python_version}.egg-info