diff options
author | V3n3RiX <venerix@koprulu.sector> | 2024-11-14 03:02:32 +0000 |
---|---|---|
committer | V3n3RiX <venerix@koprulu.sector> | 2024-11-14 03:02:32 +0000 |
commit | d3c7d3e5f9607edef1a795ccc502ab3eb3121165 (patch) | |
tree | d36ccc4ef4aa53927a8cd66bc5d3ab06fe1bdd24 /dev-python/mysqlclient | |
parent | 4dc2f97ed84159736ecfb5dea5485e83b27810d1 (diff) |
gentoo auto-resync : 14:11:2024 - 03:02:32
Diffstat (limited to 'dev-python/mysqlclient')
-rw-r--r-- | dev-python/mysqlclient/Manifest | 2 | ||||
-rw-r--r-- | dev-python/mysqlclient/mysqlclient-2.2.6.ebuild | 93 |
2 files changed, 95 insertions, 0 deletions
diff --git a/dev-python/mysqlclient/Manifest b/dev-python/mysqlclient/Manifest index 6089f17db5b0..c39853024cc1 100644 --- a/dev-python/mysqlclient/Manifest +++ b/dev-python/mysqlclient/Manifest @@ -1,3 +1,5 @@ DIST mysqlclient-2.2.4.tar.gz 90400 BLAKE2B b41ed12bd8b2ea49b34d038db93e599eb05c9a910ab712fc8b7feed918f83bf3c4c8e55eac45ee944edefc26b0610b19cee9e9b76450adf9981ecc9b5fa44d85 SHA512 d1f7ba693368309a14a0982c2f1e0731617b482044afab765c8d81ea26dc6950a110c6cab48792ea1397add7b7151c756d5d22827fcce836404456f8956538a6 +DIST mysqlclient-2.2.6.tar.gz 91055 BLAKE2B e515e693100135404bf00a41b7fe0364c8276ee1be847b22ef014bb01ef065a0bbb12cb2becbdb27a1b2a9528d43c668ba36ec25f8b43adffcc5762ed641a011 SHA512 cb5f9e8e0c8bfc8d1360a3ca03d6961b4e083ce25727d0340727e3d70816d37147ebce8507eb1a2c42e093b63ba375f9806958834c0703abe7c27908c7a094d1 EBUILD mysqlclient-2.2.4.ebuild 1906 BLAKE2B 2933bebdeb02261acf236861d3e329ab9543dc26e31558847b63c4d0070937a8f5aa8c0507414bbf5accdb59ade12975667503ee2967bc8540ee7d6497eeecb8 SHA512 6b4ae00c0c879a2e251baf912a47183abe460d74280e64f857f917bd09f2653de18d6ff741c332b999c4512d499ee9c5b572f9e1bcdd0a5894cd2f70cd1b0dee +EBUILD mysqlclient-2.2.6.ebuild 1911 BLAKE2B 84abfd07e0b87e1efb332d332a448c37fb7b3f150b53dd5fb9fd9126dad3fac09ab6232d72830948fff22e62ec20d9d32d3864cde0d05b7e36c6d8c14983b848 SHA512 2c9d1303714414247fbe417bb051f3e2b61c10d119d96effa2fcdd0b3c342de23aec7f7255a5dc235e42a3bf4d6d3d2763f522a90f4d70b728c5dee43e4f526c MISC metadata.xml 507 BLAKE2B 3c274117dde5aed93bb78488b1c106ea9b18243725d88867e6b568a09229d97bc35a1116d8a529c5c72cabcb9feb33de8157448cf3d339dbf1861d8a9ff2c1d6 SHA512 4304ae4addf93365b2acfd493a27a0144bfe0dd2d559a3fce73f52d0d1683c84b1597c9d11f36b332b6428523fd8082297ab39ce000d961ccdf39d92833828ac diff --git a/dev-python/mysqlclient/mysqlclient-2.2.6.ebuild b/dev-python/mysqlclient/mysqlclient-2.2.6.ebuild new file mode 100644 index 000000000000..872432e74f99 --- /dev/null +++ b/dev-python/mysqlclient/mysqlclient-2.2.6.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..13} ) + +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 ~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 +} |