2013-08-06 14:10:41 +00:00
|
|
|
#
|
|
|
|
|
# spec file for package python-manuel
|
|
|
|
|
#
|
2025-02-07 13:10:14 +00:00
|
|
|
# Copyright (c) 2025 SUSE LLC
|
2018-04-16 17:30:01 +00:00
|
|
|
# Copyright (c) 2013-2018 LISA GmbH, Bingen, Germany.
|
2013-08-06 14:10:41 +00:00
|
|
|
#
|
|
|
|
|
# All modifications and additions to the file contributed by third parties
|
|
|
|
|
# remain the property of their copyright owners, unless otherwise agreed
|
|
|
|
|
# upon. The license for this file, and modifications and additions to the
|
|
|
|
|
# file, is the same license as for the pristine package itself (unless the
|
|
|
|
|
# license for the pristine package is not an Open Source License, in which
|
|
|
|
|
# case the license is the MIT License). An "Open Source License" is a
|
|
|
|
|
# license that conforms to the Open Source Definition (Version 1.9)
|
|
|
|
|
# published by the Open Source Initiative.
|
2015-05-07 12:06:02 +00:00
|
|
|
|
2019-01-02 12:32:14 +00:00
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
2013-08-06 14:10:41 +00:00
|
|
|
#
|
|
|
|
|
|
2015-05-07 12:06:02 +00:00
|
|
|
|
2025-05-08 08:56:08 +00:00
|
|
|
%global flavor @BUILD_FLAVOR@%{nil}
|
|
|
|
|
%if "%{flavor}" == "doc"
|
|
|
|
|
%bcond_without doc
|
|
|
|
|
%define psuffix -doc
|
|
|
|
|
%else
|
|
|
|
|
%bcond_with doc
|
|
|
|
|
%define psuffix %{nil}
|
|
|
|
|
%endif
|
|
|
|
|
|
2024-02-06 14:27:50 +00:00
|
|
|
%{?sle15allpythons}
|
2025-05-08 08:56:08 +00:00
|
|
|
Name: python-manuel%{psuffix}
|
2025-02-07 13:10:14 +00:00
|
|
|
Version: 1.13.0
|
2013-08-06 14:10:41 +00:00
|
|
|
Release: 0
|
2019-01-10 08:21:19 +00:00
|
|
|
Summary: Python module to build tested documentation
|
2015-05-07 12:06:02 +00:00
|
|
|
License: Apache-2.0
|
2019-01-02 12:32:14 +00:00
|
|
|
URL: https://pypi.org/project/manuel/
|
2023-01-03 18:59:40 +00:00
|
|
|
# SourceRepository: https://github.com/benji-york/manuel
|
2017-06-29 07:38:38 +00:00
|
|
|
Source: https://files.pythonhosted.org/packages/source/m/manuel/manuel-%{version}.tar.gz
|
2023-01-03 18:59:40 +00:00
|
|
|
BuildRequires: %{python_module pip}
|
2021-05-31 12:30:34 +00:00
|
|
|
BuildRequires: %{python_module pytest}
|
2019-01-02 12:32:14 +00:00
|
|
|
BuildRequires: %{python_module setuptools}
|
2023-01-03 18:59:40 +00:00
|
|
|
BuildRequires: %{python_module wheel}
|
2017-06-29 07:38:38 +00:00
|
|
|
BuildRequires: fdupes
|
|
|
|
|
BuildRequires: python-rpm-macros
|
2013-08-06 14:10:41 +00:00
|
|
|
BuildArch: noarch
|
2025-05-08 08:56:08 +00:00
|
|
|
|
|
|
|
|
%if %{with doc} && 0%{?suse_version} >= 1600
|
2020-12-04 10:19:15 +00:00
|
|
|
# SECTION Documentation requirements:
|
|
|
|
|
BuildRequires: python3-Sphinx
|
2023-05-02 10:35:37 +00:00
|
|
|
BuildRequires: python3-myst-parser
|
|
|
|
|
BuildRequires: python3-sphinxcontrib-copybutton
|
2020-12-04 10:19:15 +00:00
|
|
|
# /SECTION
|
2025-05-08 08:56:08 +00:00
|
|
|
%elif %{with doc}
|
|
|
|
|
ExclusiveArch: do-not-build
|
2024-01-16 10:48:08 +00:00
|
|
|
%endif
|
2020-12-04 10:19:15 +00:00
|
|
|
# SECTION Testing requirements:
|
|
|
|
|
BuildRequires: %{python_module zope.testing}
|
|
|
|
|
# /SECTION
|
2017-06-29 07:38:38 +00:00
|
|
|
%python_subpackages
|
2013-08-06 14:10:41 +00:00
|
|
|
|
|
|
|
|
%description
|
2019-01-10 08:21:19 +00:00
|
|
|
Manuel lets the user build tested documentation.
|
2013-08-06 14:10:41 +00:00
|
|
|
|
|
|
|
|
Documentation, a full list of included plug-ins, and examples are available
|
|
|
|
|
with the -doc package and at http://packages.python.org/manuel/.
|
|
|
|
|
|
2017-06-29 07:38:38 +00:00
|
|
|
%package doc
|
2013-08-06 14:10:41 +00:00
|
|
|
Summary: Build tested documentation
|
|
|
|
|
|
2017-06-29 07:38:38 +00:00
|
|
|
%description doc
|
2013-08-06 14:10:41 +00:00
|
|
|
This package contains documentation files for %{name}.
|
|
|
|
|
|
|
|
|
|
%prep
|
2022-10-17 10:53:39 +00:00
|
|
|
%autosetup -p1 -n manuel-%{version}
|
2013-08-06 14:10:41 +00:00
|
|
|
|
|
|
|
|
%build
|
2025-05-08 08:56:08 +00:00
|
|
|
%if %{without doc}
|
2023-01-03 18:59:40 +00:00
|
|
|
%pyproject_wheel
|
2025-05-08 08:56:08 +00:00
|
|
|
%else
|
2023-05-02 10:35:37 +00:00
|
|
|
sphinx-build -c sphinx/ -a src/manuel docs/
|
2023-01-03 18:59:40 +00:00
|
|
|
rm docs/.buildinfo
|
2024-01-16 10:48:08 +00:00
|
|
|
%endif
|
2013-08-06 14:10:41 +00:00
|
|
|
|
|
|
|
|
%install
|
2025-05-08 08:56:08 +00:00
|
|
|
%if %{without doc}
|
2023-01-03 18:59:40 +00:00
|
|
|
%pyproject_install
|
2024-01-16 10:48:08 +00:00
|
|
|
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
2025-05-08 08:56:08 +00:00
|
|
|
%else
|
2023-01-03 18:59:40 +00:00
|
|
|
%{python_expand #
|
|
|
|
|
mkdir -p %{buildroot}%{_docdir}/%{$python_prefix}-manuel-doc
|
|
|
|
|
cp -r docs/* %{buildroot}%{_docdir}/%{$python_prefix}-manuel-doc
|
|
|
|
|
%fdupes %{buildroot}%{_docdir}/%{$python_prefix}-manuel-doc
|
|
|
|
|
}
|
2024-01-16 10:48:08 +00:00
|
|
|
%endif
|
2013-08-06 14:10:41 +00:00
|
|
|
|
2025-05-08 08:56:08 +00:00
|
|
|
%if %{without doc}
|
2013-08-06 14:10:41 +00:00
|
|
|
%check
|
2021-05-31 12:30:34 +00:00
|
|
|
%pytest src/manuel/tests.py
|
2013-08-06 14:10:41 +00:00
|
|
|
|
2017-06-29 07:38:38 +00:00
|
|
|
%files %{python_files}
|
2019-01-02 12:32:14 +00:00
|
|
|
%license LICENSE.rst
|
|
|
|
|
%doc CHANGES.rst COPYRIGHT.rst PKG-INFO README.rst
|
2020-12-04 10:19:15 +00:00
|
|
|
%{python_sitelib}/manuel
|
2023-01-03 18:59:40 +00:00
|
|
|
%{python_sitelib}/manuel-%{version}.dist-info
|
2025-05-08 08:56:08 +00:00
|
|
|
%endif
|
2013-08-06 14:10:41 +00:00
|
|
|
|
2025-05-08 08:56:08 +00:00
|
|
|
%if %{with doc}
|
|
|
|
|
%files %{python_files}
|
2023-01-03 18:59:40 +00:00
|
|
|
%doc %{_docdir}/%{python_prefix}-manuel-doc
|
2024-01-16 10:48:08 +00:00
|
|
|
%endif
|
2013-08-06 14:10:41 +00:00
|
|
|
|
|
|
|
|
%changelog
|