From cf01e408bd44ada473c685af61f5cde37454a23f9e3cbceaf988d50adaf626ae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Chv=C3=A1tal?= Date: Mon, 25 May 2020 09:21:14 +0000 Subject: [PATCH] Accepting request 808651 from home:pgajdos:python submit OBS-URL: https://build.opensuse.org/request/show/808651 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-msoffcrypto-tool?expand=0&rev=8 --- python-msoffcrypto-tool.changes | 5 +++++ python-msoffcrypto-tool.spec | 11 ++++++++++- 2 files changed, 15 insertions(+), 1 deletion(-) 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