forked from pool/python-flit
- Convert to libalternatives on SLE-16-based and newer systems only
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-flit?expand=0&rev=31
This commit is contained in:
@@ -1,3 +1,8 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Tue Aug 19 14:01:31 UTC 2025 - Markéta Machová <mmachova@suse.com>
|
||||||
|
|
||||||
|
- Convert to libalternatives on SLE-16-based and newer systems only
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Tue Jul 8 13:53:24 UTC 2025 - Markéta Machová <mmachova@suse.com>
|
Tue Jul 8 13:53:24 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-flit
|
Name: python-flit
|
||||||
Version: 3.12.0
|
Version: 3.12.0
|
||||||
@@ -31,16 +35,21 @@ BuildRequires: %{python_module flit-core >= %{version}}
|
|||||||
BuildRequires: %{python_module pip}
|
BuildRequires: %{python_module pip}
|
||||||
BuildRequires: %{python_module requests}
|
BuildRequires: %{python_module requests}
|
||||||
BuildRequires: %{python_module tomli-w}
|
BuildRequires: %{python_module tomli-w}
|
||||||
BuildRequires: alts
|
|
||||||
BuildRequires: fdupes
|
BuildRequires: fdupes
|
||||||
BuildRequires: python-rpm-macros
|
BuildRequires: python-rpm-macros
|
||||||
Requires: alts
|
|
||||||
Requires: python-docutils
|
Requires: python-docutils
|
||||||
Requires: python-flit-core >= %{version}
|
Requires: python-flit-core >= %{version}
|
||||||
Requires: python-pip
|
Requires: python-pip
|
||||||
Requires: python-requests
|
Requires: python-requests
|
||||||
Requires: python-tomli-w
|
Requires: python-tomli-w
|
||||||
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 pytest >= 2.7.3}
|
BuildRequires: %{python_module pytest >= 2.7.3}
|
||||||
BuildRequires: %{python_module responses}
|
BuildRequires: %{python_module responses}
|
||||||
@@ -64,7 +73,7 @@ Simplified packaging of Python modules
|
|||||||
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
||||||
|
|
||||||
%check
|
%check
|
||||||
%{python_expand # create python name interpreter for test_find_python_excutable"
|
%{python_expand # create $python name interpreter for test_find_python_excutable"
|
||||||
mkdir build/testbin
|
mkdir build/testbin
|
||||||
ln -s %{_bindir}/$python build/testbin/python
|
ln -s %{_bindir}/$python build/testbin/python
|
||||||
}
|
}
|
||||||
@@ -74,6 +83,12 @@ export PATH=$PWD/build/testbin/:$PATH
|
|||||||
# "The error you get on a train, going through Oregon, without wifi"
|
# "The error you get on a train, going through Oregon, without wifi"
|
||||||
%pytest -k "not (test_invalid_classifier or InstallTests)"
|
%pytest -k "not (test_invalid_classifier or InstallTests)"
|
||||||
|
|
||||||
|
%post
|
||||||
|
%python_install_alternative flit
|
||||||
|
|
||||||
|
%postun
|
||||||
|
%python_uninstall_alternative flit
|
||||||
|
|
||||||
%pre
|
%pre
|
||||||
%python_libalternatives_reset_alternative flit
|
%python_libalternatives_reset_alternative flit
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user