From 4b4b1c9d003b3a7fe800ecc89da9b211ecc5d9a61d1f78cb91172ca074199e79 Mon Sep 17 00:00:00 2001 From: Steve Kowalik Date: Tue, 21 Jan 2025 00:41:36 +0000 Subject: [PATCH 1/2] 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 --- python-mysqlclient.changes | 6 ++++++ python-mysqlclient.spec | 25 +++++++++++++++++++++---- 2 files changed, 27 insertions(+), 4 deletions(-) diff --git a/python-mysqlclient.changes b/python-mysqlclient.changes index 0ad04d0..be710f8 100644 --- a/python-mysqlclient.changes +++ b/python-mysqlclient.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Mon Jan 20 13:20:02 UTC 2025 - Markéta Machová + +- sphinx_rtd_theme is now an optional dependency for Sphinx +- split HTML docs to the doc subpackage + ------------------------------------------------------------------- Wed Nov 20 16:01:42 UTC 2024 - Dirk Müller diff --git a/python-mysqlclient.spec b/python-mysqlclient.spec index 2a643a4..4cc6c5d 100644 --- a/python-mysqlclient.spec +++ b/python-mysqlclient.spec @@ -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 From 6200e9f24eecad794133f91f2ef409ca1b24fd8c47f3bc39e4504f779143e874 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mark=C3=A9ta=20Machov=C3=A1?= Date: Tue, 21 Jan 2025 10:12:05 +0000 Subject: [PATCH 2/2] Accepting request 1239228 from home:mcalabkova:branches:devel:languages:python reduced the amount of rpmlint warnings OBS-URL: https://build.opensuse.org/request/show/1239228 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-mysqlclient?expand=0&rev=48 --- python-mysqlclient.spec | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/python-mysqlclient.spec b/python-mysqlclient.spec index 4cc6c5d..cc19b60 100644 --- a/python-mysqlclient.spec +++ b/python-mysqlclient.spec @@ -35,6 +35,7 @@ URL: https://github.com/PyMySQL/mysqlclient-python Source: https://files.pythonhosted.org/packages/source/m/mysqlclient/mysqlclient-%{version}.tar.gz BuildRequires: %{python_module devel} BuildRequires: %{python_module setuptools} +BuildRequires: dos2unix BuildRequires: fdupes BuildRequires: libmysqlclient-devel BuildRequires: python-rpm-macros @@ -69,6 +70,7 @@ BuildRequires: python3-Sphinx BuildRequires: python3-attrs BuildRequires: python3-sphinx_rtd_theme Requires: python3-mysqlclient = %{version} +BuildArch: noarch %description -n python-mysqlclient-doc This package contains HTML docs for python-mysqlclient. @@ -76,6 +78,8 @@ This package contains HTML docs for python-mysqlclient. %prep %setup -q -n mysqlclient-%{version} %autopatch -p1 +# wrong end-of-line encoding +dos2unix doc/*.rst README.md MANIFEST.in HISTORY.rst %build %if !%{with test} @@ -115,13 +119,15 @@ exit $exit_code mkdir -p %{buildroot}%{_docdir}/python-mysqlclient/ mv build/sphinx/html %{buildroot}%{_docdir}/python-mysqlclient/ +%fdupes %{buildroot}%{_docdir}/python-mysqlclient %endif %if !%{with test} %files %{python_files} %license LICENSE %doc HISTORY.rst MANIFEST.in README.md -%{python_sitearch}/* +%{python_sitearch}/MySQLdb +%{python_sitearch}/mysqlclient-%{version}*-info %files -n python-mysqlclient-doc %license LICENSE