[packages/python3-mysql-connector] Up to 8.0.33

arekm arekm at pld-linux.org
Thu Mar 21 14:18:58 CET 2024


commit e305f42aabc0b4b60e7e5722c0deba1b9e6a95b5
Author: Arkadiusz Miśkiewicz <arekm at maven.pl>
Date:   Thu Mar 21 13:28:58 2024 +0100

    Up to 8.0.33

 build.patch                  | 11 +++++++++++
 python3-mysql-connector.spec | 12 ++++++++----
 tests.patch                  | 23 +++++++++--------------
 3 files changed, 28 insertions(+), 18 deletions(-)
---
diff --git a/python3-mysql-connector.spec b/python3-mysql-connector.spec
index caa6b9e..c065828 100644
--- a/python3-mysql-connector.spec
+++ b/python3-mysql-connector.spec
@@ -10,17 +10,18 @@ Summary(pl.UTF-8):	Protokół kliencki MySQL zaimplementowany w Pythonie
 Name:		python3-%{pname}
 # check documentation to see which version is GA (we don't want devel releases)
 # https://dev.mysql.com/downloads/connector/python/
-Version:	8.0.29
+Version:	8.0.33
 Release:	1
 License:	GPL v2
 Group:		Libraries/Python
 Source0:	http://cdn.mysql.com/Downloads/Connector-Python/mysql-connector-python-%{version}-src.tar.gz
-# Source0-md5:	445eb59d7a9fdff424023a381b5567ee
+# Source0-md5:	97b96f27a08aff863a7fb4a15c8bcdd7
 #Source0:	https://pypi.debian.net/mysql-connector-python/mysql-connector-python-%{version}.tar.gz
 Patch0:		force-capi.patch
 Patch1:		tests.patch
+Patch2:		build.patch
 URL:		http://dev.mysql.com/doc/connector-python/en/
-BuildRequires:	mysql-devel >= 8.0
+BuildRequires:	mysql8.0-devel
 BuildRequires:	protobuf-devel >= 3.0.0
 BuildRequires:	python3-devel
 BuildRequires:	python3-modules
@@ -49,6 +50,7 @@ biblioteki MySQL-a, ani żadna kompilacja.
 %setup -q -n mysql-connector-python-%{version}-src
 %patch0 -p1
 %patch1 -p1
+%patch2 -p1
 
 %build
 export MYSQLXPB_PROTOC=%{_bindir}/protoc
@@ -81,7 +83,6 @@ export MYSQLXPB_PROTOBUF_LIB_DIR=%{_libdir}
 rm -rf $RPM_BUILD_ROOT
 
 %files
-%files -n python3-%{pname}
 %defattr(644,root,root,755)
 %doc CHANGES.txt README.txt
 %attr(755,root,root) %{py3_sitedir}/_mysql_connector.cpython-*.so
@@ -91,6 +92,7 @@ rm -rf $RPM_BUILD_ROOT
 %dir %{py3_sitedir}/mysql/__pycache__
 %{py3_sitedir}/mysql/__pycache__/*.py[co]
 %dir %{py3_sitedir}/mysql/connector
+%{py3_sitedir}/mysql/connector/py.typed
 %{py3_sitedir}/mysql/connector/*.py
 %dir %{py3_sitedir}/mysql/connector/__pycache__
 %{py3_sitedir}/mysql/connector/__pycache__/*.py[co]
@@ -106,7 +108,9 @@ rm -rf $RPM_BUILD_ROOT
 %{py3_sitedir}/mysql/connector/locales/eng/*.py
 %dir %{py3_sitedir}/mysql/connector/locales/eng/__pycache__
 %{py3_sitedir}/mysql/connector/locales/eng/__pycache__/*.py[co]
+%{py3_sitedir}/mysql/connector/plugins
 %dir %{py3_sitedir}/mysqlx
+%{py3_sitedir}/mysqlx/py.typed
 %{py3_sitedir}/mysqlx/*.py
 %dir %{py3_sitedir}/mysqlx/__pycache__
 %{py3_sitedir}/mysqlx/__pycache__/*.py[co]
diff --git a/build.patch b/build.patch
new file mode 100644
index 0000000..1ad80cc
--- /dev/null
+++ b/build.patch
@@ -0,0 +1,11 @@
+--- mysql-connector-python-8.0.33-src/cpydist/utils.py~	2023-03-30 12:58:04.000000000 +0200
++++ mysql-connector-python-8.0.33-src/cpydist/utils.py	2024-03-21 13:22:42.266660572 +0100
+@@ -200,7 +200,7 @@ def mysql_c_api_info(mysql_config):
+         return _mysql_c_api_info_win(mysql_config)
+ 
+     if os.path.isdir(mysql_config):
+-        mysql_config = os.path.join(mysql_config, "bin", "mysql_config")
++        mysql_config = os.path.join(mysql_config, "bin", "mysql_config8.0")
+ 
+     LOGGER.info("Getting MySQL information from %s", mysql_config)
+ 
diff --git a/tests.patch b/tests.patch
index 94a5005..c5ee616 100644
--- a/tests.patch
+++ b/tests.patch
@@ -1,6 +1,6 @@
---- mysql-connector-python-8.0.11/tests/mysqld.py~	2018-04-10 14:35:30.000000000 +0200
-+++ mysql-connector-python-8.0.11/tests/mysqld.py	2018-05-28 08:25:18.652587431 +0200
-@@ -184,35 +184,7 @@ class MySQLServerBase(object):
+--- mysql-connector-python-8.0.33-src/tests/mysqld.py~	2023-03-30 12:58:04.000000000 +0200
++++ mysql-connector-python-8.0.33-src/tests/mysqld.py	2024-03-21 13:15:47.909993896 +0100
+@@ -181,30 +181,7 @@ class MySQLServerBase:
          Raises MySQLBootstrapError when something fails.
          """
  
@@ -11,28 +11,23 @@
 -            if self._sbindir:
 -                break
 -            for afile in files:
--                if (afile == EXEC_MYSQLD and
--                        os.access(os.path.join(root, afile), 0)):
+-                if afile == EXEC_MYSQLD and os.access(os.path.join(root, afile), 0):
 -                    self._sbindir = root
--                    LOGGER.debug("Located {} in {}".format(
--                        EXEC_MYSQLD, self._sbindir))
+-                    LOGGER.debug("Located {} in {}".format(EXEC_MYSQLD, self._sbindir))
 -                    try:
 -                        files_to_find.remove(EXEC_MYSQLD)
 -                    except ValueError:
--                            pass
--                elif (afile == EXEC_MYSQL and
--                        os.access(os.path.join(root, afile), 0)):
+-                        pass
+-                elif afile == EXEC_MYSQL and os.access(os.path.join(root, afile), 0):
 -                    self._bindir = root
--                    LOGGER.debug("Located {} in {}".format(
--                        EXEC_MYSQL, self._bindir))
+-                    LOGGER.debug("Located {} in {}".format(EXEC_MYSQL, self._bindir))
 -                    try:
 -                        files_to_find.remove(EXEC_MYSQLD)
 -                    except ValueError:
--                            pass
+-                        pass
 -
 -                if not files_to_find:
 -                    break
--
 +        self._sbindir = '/usr/sbin'
  
          if not self._sbindir:
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/python3-mysql-connector.git/commitdiff/e305f42aabc0b4b60e7e5722c0deba1b9e6a95b5



More information about the pld-cvs-commit mailing list