forked from pool/python-falcon
- Build doc package just for tumbleweed to remove
pydata-sphinx-theme requirement OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-falcon?expand=0&rev=61
This commit is contained in:
@@ -1,3 +1,9 @@
|
||||
-------------------------------------------------------------------
|
||||
Thu Jan 9 11:57:38 UTC 2025 - Daniel Garcia <daniel.garcia@suse.com>
|
||||
|
||||
- Build doc package just for tumbleweed to remove
|
||||
pydata-sphinx-theme requirement
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Nov 12 10:49:26 UTC 2024 - John Paul Adrian Glaubitz <adrian.glaubitz@suse.com>
|
||||
|
||||
|
@@ -1,7 +1,7 @@
|
||||
#
|
||||
# spec file for package python-falcon
|
||||
#
|
||||
# Copyright (c) 2024 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,6 +16,12 @@
|
||||
#
|
||||
|
||||
|
||||
%if 0%{?suse_version} > 1600
|
||||
%bcond_without doc
|
||||
%else
|
||||
%bcond_with doc
|
||||
%endif
|
||||
|
||||
%{?sle15_python_module_pythons}
|
||||
Name: python-falcon
|
||||
Version: 4.0.2
|
||||
@@ -31,7 +37,6 @@ BuildRequires: %{python_module ddt}
|
||||
BuildRequires: %{python_module httpx}
|
||||
BuildRequires: %{python_module myst-parser >= 2}
|
||||
BuildRequires: %{python_module pip}
|
||||
BuildRequires: %{python_module pydata-sphinx-theme}
|
||||
BuildRequires: %{python_module setuptools}
|
||||
BuildRequires: %{python_module sphinx-design}
|
||||
BuildRequires: %{python_module sphinx-tabs}
|
||||
@@ -53,6 +58,9 @@ BuildRequires: %{python_module httpx if (%python-base without python36-base)}
|
||||
BuildRequires: %{python_module uvicorn if (%python-base without python36-base)}
|
||||
BuildRequires: %{python_module websockets if (%python-base without python36-base)}
|
||||
%endif
|
||||
%if %{with doc}
|
||||
BuildRequires: %{python_module pydata-sphinx-theme}
|
||||
%endif
|
||||
# /SECTION
|
||||
BuildRequires: fdupes
|
||||
BuildRequires: python-rpm-macros
|
||||
@@ -86,11 +94,14 @@ rm tests/test_media_handlers.py
|
||||
%build
|
||||
export CFLAGS="%{optflags} -fno-strict-aliasing"
|
||||
%pyproject_wheel
|
||||
|
||||
%if %{with doc}
|
||||
export PYTHONPATH="$(pwd)"
|
||||
pushd docs
|
||||
make html
|
||||
rm _build/html/.buildinfo
|
||||
popd
|
||||
%endif
|
||||
|
||||
%install
|
||||
%pyproject_install
|
||||
@@ -98,9 +109,12 @@ popd
|
||||
%python_clone -a %{buildroot}%{_bindir}/falcon-inspect-app
|
||||
%python_clone -a %{buildroot}%{_bindir}/falcon-print-routes
|
||||
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
||||
|
||||
%if %{with doc}
|
||||
mkdir -p %{buildroot}%{_defaultdocdir}/%{name}-doc
|
||||
cp -ar docs/_build/html examples %{buildroot}%{_defaultdocdir}/%{name}-doc/
|
||||
%fdupes %{buildroot}%{_defaultdocdir}/%{name}-doc/
|
||||
%endif
|
||||
|
||||
%check
|
||||
export LANG=en_US.UTF8
|
||||
@@ -121,7 +135,9 @@ export LANG=en_US.UTF8
|
||||
%{python_sitelib}/falcon
|
||||
%{python_sitelib}/falcon-%{version}.dist-info
|
||||
|
||||
%if %{with doc}
|
||||
%files -n %{name}-doc
|
||||
%doc %{_defaultdocdir}/%{name}-doc
|
||||
%endif
|
||||
|
||||
%changelog
|
||||
|
Reference in New Issue
Block a user