summaryrefslogtreecommitdiff
path: root/dev-python/mysqlclient
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2024-02-04 17:43:06 +0000
committerV3n3RiX <venerix@koprulu.sector>2024-02-04 17:43:06 +0000
commit27ad6a285576ce16e4c74d806efee77166f0c3c6 (patch)
treea24d8faefbaa796b7f97c5f8aac57c68f8958001 /dev-python/mysqlclient
parent11300a8104238529425a7b6651499bf195bf1839 (diff)
gentoo auto-resync : 04:02:2024 - 17:43:06
Diffstat (limited to 'dev-python/mysqlclient')
-rw-r--r--dev-python/mysqlclient/Manifest2
-rw-r--r--dev-python/mysqlclient/mysqlclient-2.2.3.ebuild93
2 files changed, 95 insertions, 0 deletions
diff --git a/dev-python/mysqlclient/Manifest b/dev-python/mysqlclient/Manifest
index d7b22d0a98e7..f143c8921495 100644
--- a/dev-python/mysqlclient/Manifest
+++ b/dev-python/mysqlclient/Manifest
@@ -1,3 +1,5 @@
DIST mysqlclient-2.2.1.tar.gz 89966 BLAKE2B b5098ea4afe8ba720c40eda2f0f5da043622bed51a123e225530d505edfef2f02efba477238d73f343a6cc4969bf021156e15528f05a12d905ea6231e47d65bd SHA512 3ff3823cef4662268387e5c13d006595219c5a3371201eb251d84db5eec028b32fd7b672dbdac9f4dffa906fddcfc9a5ee130e3b03e4dc0cfb060411ad75eea8
+DIST mysqlclient-2.2.3.tar.gz 90174 BLAKE2B 11626ac7cc93d70667cd105f77df5666f605fb16290f77ef485666e1f74b3aa47fdddaa2ea9f6b6196682f0c9772abe6c8557e01836362cc97ca6f0459716ae0 SHA512 72dd6fc351642adfa8148ff76da352233d83f8c11d8f8ad925b4a6e5d4c3dbe12e6a78d5cc1cd430b37d81d2a306c83bc5f262282f74a6c13e22cd09eeeeeaf3
EBUILD mysqlclient-2.2.1.ebuild 1912 BLAKE2B fefcb981eb79dc1eb4d308245e715e0d2edc4eb5e62a8c445f2f27744f35398ea9021d4e2c49e282665b7ca1062562461637208eb3861e48fa886a09f39e18b6 SHA512 bbbb3b3e1059a08c5ee70e5432f7989650042196f11a4549f6879c5e85e5f037357a441ddfe726d08ce79b7feea19d8a068b8a233680d38f9e129612665be2f3
+EBUILD mysqlclient-2.2.3.ebuild 1917 BLAKE2B 69b65dc2d2e8462f559caf68f19be538440eb2d72c26826e8dbe4add617b7c854e3c727de42606182a5c587b9bef3011ff375a76b41f920e95cb64940435a87e SHA512 bbdc7a1fe0f73fc44d96caa88a9929c6cccc5224cb88f545fc70f7949214797d88dbd99e0b39859f2b200dbe670811c15d48c0c79256052b59058940b88f0cb1
MISC metadata.xml 507 BLAKE2B 3c274117dde5aed93bb78488b1c106ea9b18243725d88867e6b568a09229d97bc35a1116d8a529c5c72cabcb9feb33de8157448cf3d339dbf1861d8a9ff2c1d6 SHA512 4304ae4addf93365b2acfd493a27a0144bfe0dd2d559a3fce73f52d0d1683c84b1597c9d11f36b332b6428523fd8082297ab39ce000d961ccdf39d92833828ac
diff --git a/dev-python/mysqlclient/mysqlclient-2.2.3.ebuild b/dev-python/mysqlclient/mysqlclient-2.2.3.ebuild
new file mode 100644
index 000000000000..ab4bb8e39c0e
--- /dev/null
+++ b/dev-python/mysqlclient/mysqlclient-2.2.3.ebuild
@@ -0,0 +1,93 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+DISTUTILS_EXT=1
+DISTUTILS_USE_PEP517=setuptools
+PYTHON_COMPAT=( python3_{10..12} )
+
+inherit distutils-r1 pypi
+
+DESCRIPTION="Python interface to MySQL"
+HOMEPAGE="
+ https://pypi.org/project/mysqlclient/
+ https://github.com/PyMySQL/mysqlclient/
+"
+
+LICENSE="GPL-2+"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux"
+
+DEPEND="
+ dev-db/mysql-connector-c:0=
+"
+RDEPEND="
+ ${DEPEND}
+"
+BDEPEND="
+ test? (
+ dev-db/mariadb[server]
+ )
+"
+
+distutils_enable_sphinx doc \
+ dev-python/sphinx-rtd-theme
+distutils_enable_tests pytest
+
+src_test() {
+ rm -r src || die
+
+ local datadir="${T}/mysql" \
+ install_log="${T}/mysqld_install.log" \
+ pidfile="${T}/mysqld.pid" \
+ socket="${T}/mysqld.sock" \
+ log="${T}/mysqld.log"
+ einfo "Creating test MySQL instance ..."
+ if ! mysql_install_db \
+ --no-defaults \
+ --auth-root-authentication-method=normal \
+ --basedir="${EPREFIX}/usr" \
+ --datadir="${datadir}" >& "${install_log}"
+ then
+ cat "${install_log}"
+ die "Failed to create database"
+ fi
+
+ einfo "Starting test MySQL instance ..."
+ mysqld \
+ --no-defaults \
+ --character-set-server=utf8 \
+ --pid-file="${pidfile}" \
+ --socket="${socket}" \
+ --skip-networking \
+ --datadir="${datadir}" >& "${log}" &
+
+ local i timeout=10
+ einfo "Waiting for MySQL to start for up to ${timeout} seconds ..."
+ for i in seq 1 ${timeout}; do
+ [[ -S "${socket}" ]] && break
+ sleep 1
+ done
+ if [[ ! -S "${socket}" ]]; then
+ cat "${log}"
+ die "MySQL failed to start in ${timeout} seconds"
+ fi
+
+ cat > "${T}/mysql.cnf" <<- EOF
+ [MySQLdb-tests]
+ socket = ${socket}
+ user = root
+ database = test
+ EOF
+
+ distutils-r1_src_test
+
+ einfo "Stopping test MySQL instance ..."
+ pkill -F "${pidfile}" &>/dev/null
+}
+
+python_test() {
+ local -x TESTDB="${T}/mysql.cnf"
+ epytest
+}