Compare commits
1 Commits
Author | SHA256 | Date | |
---|---|---|---|
6638605b91 |
3
_multibuild
Normal file
3
_multibuild
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
<multibuild>
|
||||||
|
<package>doc</package>
|
||||||
|
</multibuild>
|
@@ -1,3 +1,8 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Thu May 8 08:54:10 UTC 2025 - Daniel Garcia <daniel.garcia@suse.com>
|
||||||
|
|
||||||
|
- Use multibuild for doc subpackage
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Fri Feb 7 12:30:21 UTC 2025 - John Paul Adrian Glaubitz <adrian.glaubitz@suse.com>
|
Fri Feb 7 12:30:21 UTC 2025 - John Paul Adrian Glaubitz <adrian.glaubitz@suse.com>
|
||||||
|
|
||||||
|
@@ -17,8 +17,17 @@
|
|||||||
#
|
#
|
||||||
|
|
||||||
|
|
||||||
|
%global flavor @BUILD_FLAVOR@%{nil}
|
||||||
|
%if "%{flavor}" == "doc"
|
||||||
|
%bcond_without doc
|
||||||
|
%define psuffix -doc
|
||||||
|
%else
|
||||||
|
%bcond_with doc
|
||||||
|
%define psuffix %{nil}
|
||||||
|
%endif
|
||||||
|
|
||||||
%{?sle15allpythons}
|
%{?sle15allpythons}
|
||||||
Name: python-manuel
|
Name: python-manuel%{psuffix}
|
||||||
Version: 1.13.0
|
Version: 1.13.0
|
||||||
Release: 0
|
Release: 0
|
||||||
Summary: Python module to build tested documentation
|
Summary: Python module to build tested documentation
|
||||||
@@ -33,12 +42,15 @@ BuildRequires: %{python_module wheel}
|
|||||||
BuildRequires: fdupes
|
BuildRequires: fdupes
|
||||||
BuildRequires: python-rpm-macros
|
BuildRequires: python-rpm-macros
|
||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
%if 0%{?suse_version} >= 1600
|
|
||||||
|
%if %{with doc} && 0%{?suse_version} >= 1600
|
||||||
# SECTION Documentation requirements:
|
# SECTION Documentation requirements:
|
||||||
BuildRequires: python3-Sphinx
|
BuildRequires: python3-Sphinx
|
||||||
BuildRequires: python3-myst-parser
|
BuildRequires: python3-myst-parser
|
||||||
BuildRequires: python3-sphinxcontrib-copybutton
|
BuildRequires: python3-sphinxcontrib-copybutton
|
||||||
# /SECTION
|
# /SECTION
|
||||||
|
%elif %{with doc}
|
||||||
|
ExclusiveArch: do-not-build
|
||||||
%endif
|
%endif
|
||||||
# SECTION Testing requirements:
|
# SECTION Testing requirements:
|
||||||
BuildRequires: %{python_module zope.testing}
|
BuildRequires: %{python_module zope.testing}
|
||||||
@@ -61,16 +73,18 @@ This package contains documentation files for %{name}.
|
|||||||
%autosetup -p1 -n manuel-%{version}
|
%autosetup -p1 -n manuel-%{version}
|
||||||
|
|
||||||
%build
|
%build
|
||||||
|
%if %{without doc}
|
||||||
%pyproject_wheel
|
%pyproject_wheel
|
||||||
%if 0%{?suse_version} >= 1600
|
%else
|
||||||
sphinx-build -c sphinx/ -a src/manuel docs/
|
sphinx-build -c sphinx/ -a src/manuel docs/
|
||||||
rm docs/.buildinfo
|
rm docs/.buildinfo
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%install
|
%install
|
||||||
|
%if %{without doc}
|
||||||
%pyproject_install
|
%pyproject_install
|
||||||
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
||||||
%if 0%{?suse_version} >= 1600
|
%else
|
||||||
%{python_expand #
|
%{python_expand #
|
||||||
mkdir -p %{buildroot}%{_docdir}/%{$python_prefix}-manuel-doc
|
mkdir -p %{buildroot}%{_docdir}/%{$python_prefix}-manuel-doc
|
||||||
cp -r docs/* %{buildroot}%{_docdir}/%{$python_prefix}-manuel-doc
|
cp -r docs/* %{buildroot}%{_docdir}/%{$python_prefix}-manuel-doc
|
||||||
@@ -78,6 +92,7 @@ cp -r docs/* %{buildroot}%{_docdir}/%{$python_prefix}-manuel-doc
|
|||||||
}
|
}
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
|
%if %{without doc}
|
||||||
%check
|
%check
|
||||||
%pytest src/manuel/tests.py
|
%pytest src/manuel/tests.py
|
||||||
|
|
||||||
@@ -86,9 +101,10 @@ cp -r docs/* %{buildroot}%{_docdir}/%{$python_prefix}-manuel-doc
|
|||||||
%doc CHANGES.rst COPYRIGHT.rst PKG-INFO README.rst
|
%doc CHANGES.rst COPYRIGHT.rst PKG-INFO README.rst
|
||||||
%{python_sitelib}/manuel
|
%{python_sitelib}/manuel
|
||||||
%{python_sitelib}/manuel-%{version}.dist-info
|
%{python_sitelib}/manuel-%{version}.dist-info
|
||||||
|
%endif
|
||||||
|
|
||||||
%if 0%{?suse_version} >= 1600
|
%if %{with doc}
|
||||||
%files %{python_files doc}
|
%files %{python_files}
|
||||||
%doc %{_docdir}/%{python_prefix}-manuel-doc
|
%doc %{_docdir}/%{python_prefix}-manuel-doc
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user