1
0

Compare commits

4 Commits

2 changed files with 23 additions and 13 deletions

View File

@@ -1,3 +1,13 @@
-------------------------------------------------------------------
Mon Jun 9 14:15:18 UTC 2025 - Markéta Machová <mmachova@suse.com>
- Convert to libalternatives
-------------------------------------------------------------------
Tue May 27 15:24:45 UTC 2025 - Markéta Machová <mmachova@suse.com>
- Convert to pip-based build
-------------------------------------------------------------------
Tue May 26 07:33:07 UTC 2020 - Antonio Larrosa <alarrosa@suse.com>

View File

@@ -1,7 +1,7 @@
#
# spec file for package python-helpdev
#
# Copyright (c) 2020 SUSE LLC
# Copyright (c) 2025 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -16,22 +16,24 @@
#
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
%bcond_without libalternatives
Name: python-helpdev
Version: 0.7.1
Release: 0
Summary: HelpDev - Extracts information about the Python environment easily
License: MIT AND CC-BY-4.0
License: CC-BY-4.0 AND MIT
Group: Development/Languages/Python
URL: https://gitlab.com/dpizetta/helpdev
Source0: https://gitlab.com/dpizetta/helpdev/-/archive/v%{version}/helpdev-v%{version}.tar.gz
BuildRequires: %{python_module pip}
BuildRequires: %{python_module setuptools}
BuildRequires: %{python_module wheel}
BuildRequires: alts
BuildRequires: fdupes
BuildRequires: python-rpm-macros
Requires: alts
Requires: python-importlib-metadata
Requires: python-psutil >= 5.4.8
Requires(post): update-alternatives
Requires(postun): update-alternatives
BuildArch: noarch
# SECTION test requirements
BuildRequires: %{python_module importlib-metadata}
@@ -49,10 +51,10 @@ 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
%pyproject_wheel
%install
%python_install
%pyproject_install
%python_clone -a %{buildroot}%{_bindir}/helpdev
%python_expand %fdupes %{buildroot}%{$python_sitelib}
@@ -60,15 +62,13 @@ sed -i -e "s/psutil>=5.6/psutil>=5.4.8/" setup.py
#test_check_python_packages needs the binary
%pytest -k 'not test_check_python_packages'
%post
%python_install_alternative helpdev
%postun
%python_uninstall_alternative helpdev
%pre
%python_libalternatives_reset_alternative helpdev
%files %{python_files}
%doc README.rst
%python_alternative %{_bindir}/helpdev
%{python_sitelib}/*
%{python_sitelib}/helpdev
%{python_sitelib}/helpdev-%{version}*-info
%changelog