diff --git a/python-msoffcrypto-tool.changes b/python-msoffcrypto-tool.changes index 7f0a5ea..cad8215 100644 --- a/python-msoffcrypto-tool.changes +++ b/python-msoffcrypto-tool.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Mon May 25 06:50:54 UTC 2020 - Petr Gajdos + +- %python3_only -> %python_alternative + ------------------------------------------------------------------- Wed Apr 15 13:57:30 UTC 2020 - pgajdos@suse.com diff --git a/python-msoffcrypto-tool.spec b/python-msoffcrypto-tool.spec index d5efef5..39bc090 100644 --- a/python-msoffcrypto-tool.spec +++ b/python-msoffcrypto-tool.spec @@ -31,6 +31,8 @@ BuildRequires: python-rpm-macros Requires: python-cryptography >= 2.3 Requires: python-olefile >= 0.45 Requires: python-setuptools +Requires(post): update-alternatives +Requires(postun): update-alternatives BuildArch: noarch # SECTION test requirements BuildRequires: %{python_module coverage} @@ -54,15 +56,22 @@ wc -c msoffcrypto/method/xor_obfuscation.py | sed -n '/^0/{s/^0\s//;p}' | xargs %install %python_install +%python_clone -a %{buildroot}%{_bindir}/msoffcrypto-tool %python_expand %fdupes %{buildroot}%{$python_sitelib} %check %python_exec -m nose --with-doctest +%post +%python_install_alternative msoffcrypto-tool + +%postun +%python_uninstall_alternative msoffcrypto-tool + %files %{python_files} %doc README.md %license LICENSE.txt -%python3_only %{_bindir}/msoffcrypto-tool +%python_alternative %{_bindir}/msoffcrypto-tool %{python_sitelib}/* %changelog