summaryrefslogtreecommitdiff
path: root/gnu/packages/databases.scm
diff options
context:
space:
mode:
authorMaxim Cournoyer <maxim@guixotic.coop>2026-05-15 21:26:55 +0900
committerMaxim Cournoyer <maxim@guixotic.coop>2026-05-29 13:20:05 +0900
commitf9a815858082dff541f1ce5ac22cbc2f5b5faf80 (patch)
treed514c1d975ca5198cb28b00c8e93389d13199a56 /gnu/packages/databases.scm
parent2c79f4d9328dbd703664cc3a2033c0f41575670f (diff)
gnu: mysql-connector-python: Update to 9.7.0.
* gnu/packages/databases.scm (mysql-connector-python): Update to 9.7.0. [#:configure-flags]: Delete. [#:phases] {chdir}: New phase. {check}: Remove all substitutions. [propagated-inputs]: Delete. [inputs]: Add zstd:lib. Remove protobuf-3.20. Replace openssl-1.1 with openssl. Change-Id: Ic00e586a85988f4a4f8939842b2b6017b3f19160
Diffstat (limited to 'gnu/packages/databases.scm')
-rw-r--r--gnu/packages/databases.scm54
1 files changed, 5 insertions, 49 deletions
diff --git a/gnu/packages/databases.scm b/gnu/packages/databases.scm
index dca8b1cf9b1..15466b7b673 100644
--- a/gnu/packages/databases.scm
+++ b/gnu/packages/databases.scm
@@ -1331,7 +1331,7 @@ Language.")
1331(define-public mysql-connector-python 1331(define-public mysql-connector-python
1332 (package 1332 (package
1333 (name "mysql-connector-python") 1333 (name "mysql-connector-python")
1334 (version "8.3.0") 1334 (version "9.7.0")
1335 (source 1335 (source
1336 (origin 1336 (origin
1337 (method git-fetch) 1337 (method git-fetch)
@@ -1340,66 +1340,23 @@ Language.")
1340 (commit version))) 1340 (commit version)))
1341 (file-name (git-file-name name version)) 1341 (file-name (git-file-name name version))
1342 (sha256 1342 (sha256
1343 (base32 "18jvpnnwmfrn961rvqmsygp7dw3spf3swhxhal4hhj5hqddckj5f")))) 1343 (base32 "0zdm35apj1cfraxwlqfmr04pm87qpw73ilb8p88cn08zsa8q11hg"))))
1344 (build-system pyproject-build-system) 1344 (build-system pyproject-build-system)
1345 (arguments 1345 (arguments
1346 (list 1346 (list
1347 ;; tests: 1371 passed
1348 #:phases 1347 #:phases
1349 #~(modify-phases %standard-phases 1348 #~(modify-phases %standard-phases
1350 (add-after 'unpack 'compatibility
1351 (lambda _
1352 (substitute* "src/mysql_capi.c"
1353 (("res = mysql_options\\(&self->session, MYSQL_OPT_LOAD_DATA_LOCAL_DIR.*")
1354 "res = 0;")
1355 (("mysql_options\\(&self->session, MYSQL_OPT_LOAD_DATA_LOCAL_DIR.*")
1356 "")
1357 (("mysql_options\\(&self->session, MYSQL_OPT_TLS_CIPHERSUITES.*")
1358 "")
1359 ;; The C API does not have mysql_bind_param, so we produce an
1360 ;; error here.
1361 (("status = mysql_bind_param.*") "status = 1;")
1362 (("#include \"mysql_capi_conversion\\.h\"" all)
1363 (string-append all "\n" "#include <stdbool.h>")))))
1364 (add-after 'unpack 'chdir 1349 (add-after 'unpack 'chdir
1365 (lambda _ 1350 (lambda _
1351 ;; Our protobuf is too old for the mysqlx dev API, so use the
1352 ;; classic one without the C modules.
1366 (chdir "mysql-connector-python"))) 1353 (chdir "mysql-connector-python")))
1367 (add-before 'build 'prepare-build
1368 (lambda _
1369 (setenv "MYSQL_CAPI" #$(this-package-input "mysql"))))
1370 (replace 'check 1354 (replace 'check
1371 (lambda* (#:key tests? #:allow-other-keys) 1355 (lambda* (#:key tests? #:allow-other-keys)
1372 (when tests? 1356 (when tests?
1373 ;; Some of these tests might be failing due to the build 1357 ;; Some of these tests might be failing due to the build
1374 ;; container's restrictions, others are due to the version 1358 ;; container's restrictions, others are due to the version
1375 ;; mismatch. 1359 ;; mismatch.
1376 (substitute* "tests/cext/test_cext_api.py"
1377 (("def test_change_user") "def _do_not_test_change_user")
1378 (("def test_get_character_set_info")
1379 "def _do_not_test_get_character_set_info"))
1380 (substitute* "tests/test_bugs.py"
1381 (("def test_change_user") "def _do_not_test_change_user")
1382 (("def test_lost_connection") "def _do_not_test_lost_connection")
1383 (("def test_kill_query") "def _do_not_test_kill_query")
1384 ;; These all fail because of expired certificates.
1385 (("def test_cext_verify_server_certificate")
1386 "def _do_not_test_cext_verify_server_certificate")
1387 (("def test_pure_verify_server_certificate")
1388 "def _do_not_test_pure_verify_server_certificate")
1389 (("def test_verify_server_name_cext_cnx")
1390 "def _do_not_test_verify_server_name_cext_cnx")
1391 (("def test_verify_server_name_pure_cnx")
1392 "def _do_not_test_verify_server_name_pure_cnx"))
1393 (substitute* '("tests/test_connection.py"
1394 "tests/test_aio_connection.py")
1395 (("def test_allow_local_infile_in_path")
1396 "def _do_not_test_allow_local_infile_in_path")
1397 ;; This fails because of expired certificates.
1398 (("def test_connect_with_unix_socket")
1399 "def _do_not_test_connect_with_unix_socket"))
1400 (substitute* "tests/test_constants.py"
1401 (("def test_deprecated")
1402 "def _do_not_test_deprecated"))
1403 (mkdir-p "/tmp/datadir") 1360 (mkdir-p "/tmp/datadir")
1404 (invoke "python3" "unittests.py" 1361 (invoke "python3" "unittests.py"
1405 "--verbosity=3" 1362 "--verbosity=3"
@@ -1407,9 +1364,8 @@ Language.")
1407 "--keep" 1364 "--keep"
1408 "--mysql-topdir=/tmp/datadir" 1365 "--mysql-topdir=/tmp/datadir"
1409 "--unix-socket=/tmp/datadir"))))))) 1366 "--unix-socket=/tmp/datadir")))))))
1410 (propagated-inputs (list python-protobuf))
1411 (inputs (list mysql protobuf-3.20 openssl-1.1 zlib))
1412 (native-inputs (list python-setuptools)) 1367 (native-inputs (list python-setuptools))
1368 (inputs (list mysql openssl zlib `(,zstd "lib")))
1413 (home-page "https://dev.mysql.com/doc/connector-python/en/index.html") 1369 (home-page "https://dev.mysql.com/doc/connector-python/en/index.html")
1414 (synopsis "MySQL driver written in Python") 1370 (synopsis "MySQL driver written in Python")
1415 (description "MySQL Connector/Python enables Python programs to access 1371 (description "MySQL Connector/Python enables Python programs to access