Accepting request 808937 from devel:languages:python

OBS-URL: https://build.opensuse.org/request/show/808937
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-helpdev?expand=0&rev=4
This commit is contained in:
2020-05-26 15:49:57 +00:00
committed by Git OBS Bridge
2 changed files with 25 additions and 3 deletions

View File

@@ -1,3 +1,15 @@
-------------------------------------------------------------------
Tue May 26 07:33:07 UTC 2020 - Antonio Larrosa <alarrosa@suse.com>
- 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 <pgajdos@suse.com>
- %python3_only -> %python_alternative
-------------------------------------------------------------------
Mon May 18 08:11:04 UTC 2020 - Antonio Larrosa <alarrosa@suse.com>

View File

@@ -29,11 +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
@@ -44,21 +46,29 @@ 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
%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