forked from pool/python-falcon
- Convert to libalternatives on SLE-16-based and newer systems
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-falcon?expand=0&rev=67
This commit is contained in:
@@ -1,3 +1,8 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Tue Aug 19 12:18:37 UTC 2025 - Markéta Machová <mmachova@suse.com>
|
||||||
|
|
||||||
|
- Convert to libalternatives on SLE-16-based and newer systems
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Tue Jul 8 13:19:46 UTC 2025 - Markéta Machová <mmachova@suse.com>
|
Tue Jul 8 13:19:46 UTC 2025 - Markéta Machová <mmachova@suse.com>
|
||||||
|
|
||||||
|
@@ -21,7 +21,11 @@
|
|||||||
%else
|
%else
|
||||||
%bcond_with doc
|
%bcond_with doc
|
||||||
%endif
|
%endif
|
||||||
|
%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-falcon
|
Name: python-falcon
|
||||||
Version: 4.0.2
|
Version: 4.0.2
|
||||||
@@ -45,10 +49,15 @@ BuildRequires: %{python_module sphinx-tabs}
|
|||||||
BuildRequires: %{python_module sphinxcontrib-copybutton}
|
BuildRequires: %{python_module sphinxcontrib-copybutton}
|
||||||
BuildRequires: %{python_module websockets}
|
BuildRequires: %{python_module websockets}
|
||||||
BuildRequires: %{python_module wheel}
|
BuildRequires: %{python_module wheel}
|
||||||
BuildRequires: alts
|
|
||||||
BuildRequires: fdupes
|
BuildRequires: fdupes
|
||||||
BuildRequires: python-rpm-macros
|
BuildRequires: python-rpm-macros
|
||||||
|
%if %{with libalternatives}
|
||||||
|
BuildRequires: alts
|
||||||
Requires: alts
|
Requires: alts
|
||||||
|
%else
|
||||||
|
Requires(post): update-alternatives
|
||||||
|
Requires(postun): update-alternatives
|
||||||
|
%endif
|
||||||
Suggests: %{name}-doc
|
Suggests: %{name}-doc
|
||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
# TODO: Cython support
|
# TODO: Cython support
|
||||||
@@ -110,7 +119,7 @@ popd
|
|||||||
%python_clone -a %{buildroot}%{_bindir}/falcon-bench
|
%python_clone -a %{buildroot}%{_bindir}/falcon-bench
|
||||||
%python_clone -a %{buildroot}%{_bindir}/falcon-inspect-app
|
%python_clone -a %{buildroot}%{_bindir}/falcon-inspect-app
|
||||||
%python_clone -a %{buildroot}%{_bindir}/falcon-print-routes
|
%python_clone -a %{buildroot}%{_bindir}/falcon-print-routes
|
||||||
%python_group_libalternatives falcon-bench falcon-inspect-app falcon-print-routes
|
%{python_group_libalternatives} falcon-bench falcon-inspect-app falcon-print-routes
|
||||||
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
||||||
|
|
||||||
%if %{with doc}
|
%if %{with doc}
|
||||||
@@ -126,6 +135,12 @@ export LANG=en_US.UTF8
|
|||||||
%pre
|
%pre
|
||||||
%python_libalternatives_reset_alternative falcon-bench
|
%python_libalternatives_reset_alternative falcon-bench
|
||||||
|
|
||||||
|
%post
|
||||||
|
%python_install_alternative falcon-bench falcon-inspect-app falcon-print-routes
|
||||||
|
|
||||||
|
%postun
|
||||||
|
%python_uninstall_alternative falcon-bench
|
||||||
|
|
||||||
%files %{python_files}
|
%files %{python_files}
|
||||||
%doc README.rst
|
%doc README.rst
|
||||||
%license LICENSE
|
%license LICENSE
|
||||||
|
Reference in New Issue
Block a user