15
0

Accepting request 1239039 from home:mcalabkova:branches:devel:languages:python

- sphinx_rtd_theme is now an optional dependency for Sphinx
- split HTML docs to the doc subpackage

OBS-URL: https://build.opensuse.org/request/show/1239039
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-mysqlclient?expand=0&rev=47
This commit is contained in:
2025-01-21 00:41:36 +00:00
committed by Git OBS Bridge
parent b3659b1047
commit 4b4b1c9d00
2 changed files with 27 additions and 4 deletions

View File

@@ -1,7 +1,7 @@
#
# spec file for package python-mysqlclient
#
# 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
@@ -38,8 +38,6 @@ BuildRequires: %{python_module setuptools}
BuildRequires: fdupes
BuildRequires: libmysqlclient-devel
BuildRequires: python-rpm-macros
BuildRequires: python3-Sphinx
BuildRequires: python3-attrs
BuildRequires: unzip
Recommends: mariadb
Provides: python-mysql = %{version}
@@ -64,6 +62,17 @@ MySQLdb is an interface to the popular MySQL database server for Python.
This package adds Python 3 support and bug fixes to MySQLdb1.
%package -n python-mysqlclient-doc
Summary: HTML documentation for python-mysqlclient
Group: Documentation/Other
BuildRequires: python3-Sphinx
BuildRequires: python3-attrs
BuildRequires: python3-sphinx_rtd_theme
Requires: python3-mysqlclient = %{version}
%description -n python-mysqlclient-doc
This package contains HTML docs for python-mysqlclient.
%prep
%setup -q -n mysqlclient-%{version}
%autopatch -p1
@@ -103,13 +112,21 @@ exit $exit_code
%if !%{with test}
%python_install
%python_expand %fdupes %{buildroot}%{$python_sitearch}
mkdir -p %{buildroot}%{_docdir}/python-mysqlclient/
mv build/sphinx/html %{buildroot}%{_docdir}/python-mysqlclient/
%endif
%if !%{with test}
%files %{python_files}
%license LICENSE
%doc HISTORY.rst MANIFEST.in README.md build/sphinx/html
%doc HISTORY.rst MANIFEST.in README.md
%{python_sitearch}/*
%files -n python-mysqlclient-doc
%license LICENSE
%dir %{_docdir}/python-mysqlclient
%{_docdir}/python-mysqlclient/html/
%endif
%changelog