forked from pool/python-pipreqs
- Convert to libalternatives on SLE-16-based and newer systems only
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-pipreqs?expand=0&rev=13
This commit is contained in:
@@ -1,3 +1,8 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Thu Aug 21 15:19:11 UTC 2025 - Markéta Machová <mmachova@suse.com>
|
||||||
|
|
||||||
|
- Convert to libalternatives on SLE-16-based and newer systems only
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Sat Jul 19 07:26:50 UTC 2025 - Markéta Machová <mmachova@suse.com>
|
Sat Jul 19 07:26:50 UTC 2025 - Markéta Machová <mmachova@suse.com>
|
||||||
|
|
||||||
|
@@ -16,7 +16,11 @@
|
|||||||
#
|
#
|
||||||
|
|
||||||
|
|
||||||
|
%if 0%{?suse_version} > 1500
|
||||||
%bcond_without libalternatives
|
%bcond_without libalternatives
|
||||||
|
%else
|
||||||
|
%bcond_with libalternatives
|
||||||
|
%endif
|
||||||
%{?sle15_python_module_pythons}
|
%{?sle15_python_module_pythons}
|
||||||
Name: python-pipreqs
|
Name: python-pipreqs
|
||||||
Version: 0.4.13
|
Version: 0.4.13
|
||||||
@@ -29,13 +33,18 @@ BuildRequires: %{python_module pip}
|
|||||||
BuildRequires: %{python_module pytest}
|
BuildRequires: %{python_module pytest}
|
||||||
BuildRequires: %{python_module setuptools}
|
BuildRequires: %{python_module setuptools}
|
||||||
BuildRequires: %{python_module wheel}
|
BuildRequires: %{python_module wheel}
|
||||||
BuildRequires: alts
|
|
||||||
BuildRequires: fdupes
|
BuildRequires: fdupes
|
||||||
BuildRequires: python-rpm-macros
|
BuildRequires: python-rpm-macros
|
||||||
Requires: alts
|
|
||||||
Requires: python-docopt
|
Requires: python-docopt
|
||||||
Requires: python-yarg
|
Requires: python-yarg
|
||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
|
%if %{with libalternatives}
|
||||||
|
BuildRequires: alts
|
||||||
|
Requires: alts
|
||||||
|
%else
|
||||||
|
Requires(post): update-alternatives
|
||||||
|
Requires(postun): update-alternatives
|
||||||
|
%endif
|
||||||
# SECTION test requirements
|
# SECTION test requirements
|
||||||
BuildRequires: %{python_module docopt}
|
BuildRequires: %{python_module docopt}
|
||||||
BuildRequires: %{python_module yarg}
|
BuildRequires: %{python_module yarg}
|
||||||
@@ -61,6 +70,12 @@ chmod a-x pipreqs/pipreqs.py
|
|||||||
# Ignore tests that require network access
|
# Ignore tests that require network access
|
||||||
%pytest -k 'not (test_get_imports_info or test_ignored_directory or test_init or test_init_overwrite or teset_init_savepath or test_omit_version or test_clean or test_dynamic_version)'
|
%pytest -k 'not (test_get_imports_info or test_ignored_directory or test_init or test_init_overwrite or teset_init_savepath or test_omit_version or test_clean or test_dynamic_version)'
|
||||||
|
|
||||||
|
%post
|
||||||
|
%python_install_alternative pipreqs
|
||||||
|
|
||||||
|
%postun
|
||||||
|
%python_uninstall_alternative pipreqs
|
||||||
|
|
||||||
%pre
|
%pre
|
||||||
%python_libalternatives_reset_alternative pipreqs
|
%python_libalternatives_reset_alternative pipreqs
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user