From d722408fc0c24f100bcd3845c0c0805d6ed8d0c6792fcd6ba2fbac7669ae591d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Chv=C3=A1tal?= Date: Mon, 25 May 2020 13:34:47 +0000 Subject: [PATCH 1/2] Accepting request 808748 from home:pgajdos:python submit OBS-URL: https://build.opensuse.org/request/show/808748 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-helpdev?expand=0&rev=8 --- python-helpdev.changes | 5 +++++ python-helpdev.spec | 11 ++++++++++- 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/python-helpdev.changes b/python-helpdev.changes index c5c0480..2127d01 100644 --- a/python-helpdev.changes +++ b/python-helpdev.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Mon May 25 10:59:16 UTC 2020 - Petr Gajdos + +- %python3_only -> %python_alternative + ------------------------------------------------------------------- Mon May 18 08:11:04 UTC 2020 - Antonio Larrosa diff --git a/python-helpdev.spec b/python-helpdev.spec index f04475c..7869e83 100644 --- a/python-helpdev.spec +++ b/python-helpdev.spec @@ -30,6 +30,8 @@ BuildRequires: fdupes BuildRequires: python-rpm-macros Requires: python-importlib-metadata Requires: python-psutil >= 5.6 +Requires(post): update-alternatives +Requires(postun): update-alternatives BuildArch: noarch # SECTION test requirements BuildRequires: %{python_module importlib-metadata} @@ -50,15 +52,22 @@ sed -i '1{\,^#!%{_bindir}/env python,d}' helpdev/*.py %install %python_install +%python_clone -a %{buildroot}%{_bindir}/helpdev %python_expand %fdupes %{buildroot}%{$python_sitelib} %check #test_check_python_packages needs the binary %pytest -k 'not test_check_python_packages' +%post +%python_install_alternative helpdev + +%postun +%python_uninstall_alternative helpdev + %files %{python_files} %doc README.rst -%python3_only %{_bindir}/helpdev +%python_alternative %{_bindir}/helpdev %{python_sitelib}/* %changelog From 20f8234fc2d11e60fff1d4add85a18883117af1d9d12bf03fcb5419730a275e1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Chv=C3=A1tal?= Date: Tue, 26 May 2020 07:44:06 +0000 Subject: [PATCH 2/2] Accepting request 808930 from home:alarrosa:branches:devel:languages:python - python-psutil is only used to call its "swap_memory" and "virtual_memory" functions, so we reduced the required version from 5.6 to 5.4.8 so we can build packages for SLE/Leap. OBS-URL: https://build.opensuse.org/request/show/808930 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-helpdev?expand=0&rev=9 --- python-helpdev.changes | 7 +++++++ python-helpdev.spec | 5 +++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/python-helpdev.changes b/python-helpdev.changes index 2127d01..a7e7cf0 100644 --- a/python-helpdev.changes +++ b/python-helpdev.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Tue May 26 07:33:07 UTC 2020 - Antonio Larrosa + +- python-psutil is only used to call its "swap_memory" and + "virtual_memory" functions, so we reduced the required version + from 5.6 to 5.4.8 so we can build packages for SLE/Leap. + ------------------------------------------------------------------- Mon May 25 10:59:16 UTC 2020 - Petr Gajdos diff --git a/python-helpdev.spec b/python-helpdev.spec index 7869e83..cbcd0cb 100644 --- a/python-helpdev.spec +++ b/python-helpdev.spec @@ -29,13 +29,13 @@ BuildRequires: %{python_module setuptools} BuildRequires: fdupes BuildRequires: python-rpm-macros Requires: python-importlib-metadata -Requires: python-psutil >= 5.6 +Requires: python-psutil >= 5.4.8 Requires(post): update-alternatives Requires(postun): update-alternatives BuildArch: noarch # SECTION test requirements BuildRequires: %{python_module importlib-metadata} -BuildRequires: %{python_module psutil >= 5.6} +BuildRequires: %{python_module psutil >= 5.4.8} BuildRequires: %{python_module pytest} # /SECTION %python_subpackages @@ -46,6 +46,7 @@ HelpDev - Extracts information about the Python environment easily. %prep %setup -q -n helpdev-v%{version} sed -i '1{\,^#!%{_bindir}/env python,d}' helpdev/*.py +sed -i -e "s/psutil>=5.6/psutil>=5.4.8/" setup.py %build %python_build