public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Sam James" <sam@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-db/mycli/
Date: Mon, 28 Jul 2025 16:28:08 +0000 (UTC)	[thread overview]
Message-ID: <1753719904.0fb4590b891b927a7573eabdc3d83b42fac15e36.sam@gentoo> (raw)

commit:     0fb4590b891b927a7573eabdc3d83b42fac15e36
Author:     Alfred Wingate <parona <AT> protonmail <DOT> com>
AuthorDate: Mon Jul 28 13:52:22 2025 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Mon Jul 28 16:25:04 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0fb4590b

dev-db/mycli: add 1.37.0

Signed-off-by: Alfred Wingate <parona <AT> protonmail.com>
Part-of: https://github.com/gentoo/gentoo/pull/43210
Signed-off-by: Sam James <sam <AT> gentoo.org>

 dev-db/mycli/Manifest            |   1 +
 dev-db/mycli/mycli-1.37.0.ebuild | 137 +++++++++++++++++++++++++++++++++++++++
 2 files changed, 138 insertions(+)

diff --git a/dev-db/mycli/Manifest b/dev-db/mycli/Manifest
index a96678ee09c6..85af18b72208 100644
--- a/dev-db/mycli/Manifest
+++ b/dev-db/mycli/Manifest
@@ -1,3 +1,4 @@
 DIST mycli-1.31.2.tar.gz 295447 BLAKE2B e0e8520402b26e1cf1c502fe8d7f11156adf521fea2c88e28c43683ac14fef50c60aee1d5627e94841d38668e965a531f5cce28b5b38a7a69a1081f79c8a66af SHA512 1d3d427c07f9e5f9273c07ca45e9f46423b9263e2548b5e7e4f12ca90a7e7aa87c7b78ee48fc6f172b8a5074c5497a5186b059a4e4ef388252d83580fbd870e3
 DIST mycli-1.34.2.tar.gz 296111 BLAKE2B 1be7585bc5282c6f5fdd29971a16b98ba1c926da8a0452adb239e35678300a10a7bface45d6adda9837c8900623fd81b958f39945a0d980f0f7ca1179eacf221 SHA512 fd32c049dc5f6d679ad57ffc5323a76692b09bdb1245a89fe01657cde169305203004660d1a6f689ec71b52003e67178642e8395de3c6aceb033ae92b743b7ce
 DIST mycli-1.36.0.tar.gz 298806 BLAKE2B 8b0bf32213bf0c3f3e00054846544d893e63435011ffcde7dd312ae6b599a593c11d62ec9f462f1f90898b0f6ecb73e5708e8d398ebe237fc1ccc4214b903447 SHA512 edbedc7b3157eb58a8271bfd8750ddb40545acc246f09a8ec5791fd15d2c12056349b9be29ebe262f6634c9ba698d00ba1aa313f1ceb046e7923c3ea01461d2c
+DIST mycli-1.37.0.tar.gz 300531 BLAKE2B f081db26a2f1ab9c804384525abd0e98dee308da0075691433fe323e6638757cec689cd4ab559b5ffafc5d953b961785b8f8a3b380eaeae5bad47c29165fc9c6 SHA512 6e6cb2c4de7a6b5b9d758806abd076fdfbd2ea9bdc89d0096948a6dad68b55d4378d5687eac950409b0eb8e6d67ae6da0851b749129ed63b701496427a33dbb2

diff --git a/dev-db/mycli/mycli-1.37.0.ebuild b/dev-db/mycli/mycli-1.37.0.ebuild
new file mode 100644
index 000000000000..4dd647721e08
--- /dev/null
+++ b/dev-db/mycli/mycli-1.37.0.ebuild
@@ -0,0 +1,137 @@
+# Copyright 1999-2025 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+DISTUTILS_SINGLE_IMPL=yes
+DISTUTILS_USE_PEP517=setuptools
+PYTHON_COMPAT=( python3_{11..13} )
+
+inherit distutils-r1 pypi
+
+DESCRIPTION="CLI for MySQL Database with auto-completion and syntax highlighting"
+HOMEPAGE="
+	https://www.mycli.net/
+	https://github.com/dbcli/mycli/
+	https://pypi.org/project/mycli/
+"
+
+LICENSE="BSD MIT"
+SLOT="0"
+KEYWORDS="~amd64 ~arm64 ~x86"
+IUSE="ssh"
+
+RDEPEND="
+	$(python_gen_cond_dep '
+		>=dev-python/cli-helpers-2.7.0[${PYTHON_USEDEP}]
+		>=dev-python/click-7.0[${PYTHON_USEDEP}]
+		>=dev-python/configobj-5.0.5[${PYTHON_USEDEP}]
+		>=dev-python/cryptography-1.0.0[${PYTHON_USEDEP}]
+		>=dev-python/prompt-toolkit-3.0.6[${PYTHON_USEDEP}]
+		<dev-python/prompt-toolkit-4.0.0[${PYTHON_USEDEP}]
+		>=dev-python/pyaes-1.6.1[${PYTHON_USEDEP}]
+		>=dev-python/pyfzf-0.3.1[${PYTHON_USEDEP}]
+		>=dev-python/pygments-1.6[${PYTHON_USEDEP}]
+		>=dev-python/pymysql-0.9.2[${PYTHON_USEDEP}]
+		>=dev-python/pyperclip-1.8.1[${PYTHON_USEDEP}]
+		=dev-python/sqlglot-26*[${PYTHON_USEDEP}]
+		<dev-python/sqlparse-0.6.0[${PYTHON_USEDEP}]
+		>=dev-python/sqlparse-0.3.0[${PYTHON_USEDEP}]
+		ssh? (
+			dev-python/paramiko[${PYTHON_USEDEP}]
+			dev-python/sshtunnel[${PYTHON_USEDEP}]
+		)
+	')
+"
+BDEPEND="
+	$(python_gen_cond_dep '
+		dev-python/setuptools-scm[${PYTHON_USEDEP}]
+		test? (
+			dev-db/mysql[server]
+			dev-python/paramiko[${PYTHON_USEDEP}]
+			dev-python/sshtunnel[${PYTHON_USEDEP}]
+		)
+	')
+"
+
+EPYTEST_PLUGINS=()
+distutils_enable_tests pytest
+
+export SETUPTOOLS_SCM_PRETEND_VERSION=${PV}
+
+python_prepare_all() {
+	# Relax click requirement. Behave tests aren't hooked up here :/
+	# https://github.com/dbcli/mycli/commit/bb18b0c2f2ed7375efe31d379e616a11c82b1299
+	# https://github.com/dbcli/mycli/pull/1241
+	sed -e '/click/ s/,<8.1.8//' -i pyproject.toml || die
+
+	# no coverage please
+	sed -e 's/import coverage ; coverage.process_startup(); //' \
+		-i test/features/environment.py test/features/steps/wrappers.py || die
+
+	distutils-r1_python_prepare_all
+}
+
+src_test() {
+	# test/utils.py
+	local -x PYTEST_PASSWORD="notsecure"
+	local -x PYTEST_HOST="127.0.0.1"
+	local -x PYTEST_PORT="43307"
+	local -x PYTEST_CHARSET="utf8"
+
+	einfo "Creating mysql test instance ..."
+	mysqld \
+		--no-defaults \
+		--initialize-insecure \
+		--basedir="${EPREFIX}/usr" \
+		--datadir="${T}/mysql" 1>"${T}"/mysql_install.log || die
+
+	einfo "Starting mysql test instance ..."
+	mysqld \
+		--no-defaults \
+		--character-set-server="${PYTEST_CHARSET}" \
+		--bind-address="${PYTEST_HOST}" \
+		--port="${PYTEST_PORT}" \
+		--pid-file="${T}/mysqld.pid" \
+		--socket="${T}/mysqld.sock" \
+		--datadir="${T}/mysql" 1>"${T}/mysqld.log" 2>&1 &
+
+	# wait for it to start
+	local i
+	for (( i = 0; i < 10; i++ )); do
+		[[ -S ${T}/mysqld.sock ]] && break
+		sleep 1
+	done
+	[[ ! -S ${T}/mysqld.sock ]] && die "mysqld failed to start"
+
+	einfo "Configuring test mysql instance ..."
+	mysql \
+		-u root \
+		--socket="${T}/mysqld.sock" \
+		-e "ALTER USER 'root'@'localhost' IDENTIFIED BY '${PYTEST_PASSWORD}'" \
+		|| die "Failed to change mysql user password"
+
+	local failures=()
+	nonfatal distutils-r1_src_test
+	[[ ${?} -ne 0 ]] && failures+=( pytest )
+
+	# Behave is in a weird situation, last non beta version is 7 years old and doesnt build well with modern setuptools.
+	# Mycli doesnt pass tests with prereleases of updated behave.
+	#behave --jobs=$(get_makeopts_jobs)  --summary --verbose test/features
+	#[[ ${?} -ne 0 ]] && failures+=( behave )
+
+	einfo "Stopping mysql test instance ..."
+	pkill -F "${T}"/mysqld.pid || die
+	# wait for it to stop
+	local i
+	for (( i = 0; i < 10; i++ )); do
+		[[ -S ${T}/mysqld.sock ]] || break
+		sleep 1
+	done
+
+	rm -rf "${T}"/mysql || die
+
+	if [[ ${#failures[@]} -gt 0 ]]; then
+		die "Tests failed: ${failures}"
+	fi
+}


             reply	other threads:[~2025-07-28 16:28 UTC|newest]

Thread overview: 57+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-07-28 16:28 Sam James [this message]
  -- strict thread matches above, loose matches on Subject: below --
2025-11-04 11:40 [gentoo-commits] repo/gentoo:master commit in: dev-db/mycli/ Sam James
2025-11-04 11:40 Sam James
2025-07-28 16:28 Sam James
2025-07-19 16:58 Sam James
2025-07-19 16:58 Sam James
2025-07-13  4:35 Sam James
2025-07-09 14:32 Sam James
2025-07-09 14:32 Sam James
2025-07-05  4:53 Sam James
2025-06-21 12:17 Sam James
2025-05-03  6:08 Michał Górny
2025-03-28 15:06 Sam James
2025-02-11  1:30 Jakov Smolić
2025-02-10 21:25 Sam James
2025-01-17 13:51 Joonas Niilola
2024-04-26 13:23 Michał Górny
2023-11-22 17:44 Sam James
2023-11-22 17:44 Sam James
2023-08-12  3:05 Michał Górny
2023-07-30 17:09 Sam James
2023-07-29 19:25 Michał Górny
2023-07-28 15:58 Michał Górny
2023-07-28 15:58 Michał Górny
2023-07-28 15:58 Michał Górny
2023-07-28 15:58 Michał Górny
2023-02-25 22:28 Brian Evans
2023-02-25 22:28 Brian Evans
2023-02-24  6:00 Michał Górny
2022-04-22 13:24 Brian Evans
2021-09-22 10:29 Arthur Zamarin
2021-06-03 15:50 Brian Evans
2021-05-23 10:48 Michał Górny
2020-12-17 21:02 Brian Evans
2020-12-07 19:44 Brian Evans
2020-07-08 12:28 Brian Evans
2020-07-07 20:40 Brian Evans
2020-03-08  8:25 Michał Górny
2020-01-16  6:05 Michał Górny
2019-08-23 14:10 Brian Evans
2019-01-22 17:24 Brian Evans
2018-10-29 13:59 Brian Evans
2018-09-11 19:13 Brian Evans
2018-09-11 19:13 Brian Evans
2018-06-21 23:58 Aaron Bauman
2017-12-27 14:42 Brian Evans
2017-12-23 15:17 Brian Evans
2017-12-23 15:17 Brian Evans
2017-07-05 15:04 Brian Evans
2017-07-05 15:04 Brian Evans
2016-08-29 10:21 Patrice Clement
2016-06-08  7:08 Michał Górny
2016-04-17 13:27 Johann Schmitz
2016-01-21 21:18 Brian Evans
2016-01-21 21:18 Brian Evans
2015-11-15  9:16 Johann Schmitz
2015-09-15 17:22 Brian Evans

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1753719904.0fb4590b891b927a7573eabdc3d83b42fac15e36.sam@gentoo \
    --to=sam@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox