From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 3407D158091 for ; Sat, 21 Jun 2025 12:17:38 +0000 (UTC) Received: from lists.gentoo.org (bobolink.gentoo.org [140.211.166.189]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519) (No client certificate requested) (Authenticated sender: relay-lists.gentoo.org@gentoo.org) by smtp.gentoo.org (Postfix) with ESMTPSA id 1EB88341F79 for ; Sat, 21 Jun 2025 12:17:38 +0000 (UTC) Received: from bobolink.gentoo.org (localhost [127.0.0.1]) by bobolink.gentoo.org (Postfix) with ESMTP id 58BD81104DE; Sat, 21 Jun 2025 12:17:34 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519) (No client certificate requested) by bobolink.gentoo.org (Postfix) with ESMTPS id 4E40F1104DE for ; Sat, 21 Jun 2025 12:17:34 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id E07CD341F77 for ; Sat, 21 Jun 2025 12:17:33 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 5445A2A30 for ; Sat, 21 Jun 2025 12:17:32 +0000 (UTC) From: "Sam James" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Sam James" Message-ID: <1750508200.670b75270dd32f2e6fda4dc74c23842e69c3d014.sam@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: dev-db/mycli/ X-VCS-Repository: repo/gentoo X-VCS-Files: dev-db/mycli/Manifest dev-db/mycli/mycli-1.31.2.ebuild X-VCS-Directories: dev-db/mycli/ X-VCS-Committer: sam X-VCS-Committer-Name: Sam James X-VCS-Revision: 670b75270dd32f2e6fda4dc74c23842e69c3d014 X-VCS-Branch: master Date: Sat, 21 Jun 2025 12:17:32 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 252a4d18-f8b9-46c5-98a9-fdf844dacdcc X-Archives-Hash: 9dd400d43781e6315bae069dde1a7747 commit: 670b75270dd32f2e6fda4dc74c23842e69c3d014 Author: Alfred Wingate protonmail com> AuthorDate: Thu May 1 16:04:35 2025 +0000 Commit: Sam James gentoo org> CommitDate: Sat Jun 21 12:16:40 2025 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=670b7527 dev-db/mycli: add 1.31.2 Signed-off-by: Alfred Wingate protonmail.com> Part-of: https://github.com/gentoo/gentoo/pull/41881 Closes: https://github.com/gentoo/gentoo/pull/41881 Signed-off-by: Sam James gentoo.org> dev-db/mycli/Manifest | 1 + dev-db/mycli/mycli-1.31.2.ebuild | 134 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 135 insertions(+) diff --git a/dev-db/mycli/Manifest b/dev-db/mycli/Manifest index d804ddca0f12..26d808d34ed5 100644 --- a/dev-db/mycli/Manifest +++ b/dev-db/mycli/Manifest @@ -1 +1,2 @@ DIST mycli-1.31.1.tar.gz 294459 BLAKE2B b2437f57f4f9d5388982cd54dc30ce98c6fe4abc68b18d8643e28742231c812aec8220c2fa0f88ae0e9ebca6c55a814d9e93a3e33a6b12832f3b7dbd13681233 SHA512 95903570eb901fb4fe497435bf3e04ea6af25c0925f36d696088d8f667c9e60cd8dff04098cccda32084981cd74b2ff812ce99248df2d357fed05178e98adea2 +DIST mycli-1.31.2.tar.gz 295447 BLAKE2B e0e8520402b26e1cf1c502fe8d7f11156adf521fea2c88e28c43683ac14fef50c60aee1d5627e94841d38668e965a531f5cce28b5b38a7a69a1081f79c8a66af SHA512 1d3d427c07f9e5f9273c07ca45e9f46423b9263e2548b5e7e4f12ca90a7e7aa87c7b78ee48fc6f172b8a5074c5497a5186b059a4e4ef388252d83580fbd870e3 diff --git a/dev-db/mycli/mycli-1.31.2.ebuild b/dev-db/mycli/mycli-1.31.2.ebuild new file mode 100644 index 000000000000..957cf4f4d938 --- /dev/null +++ b/dev-db/mycli/mycli-1.31.2.ebuild @@ -0,0 +1,134 @@ +# 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.2.1[${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/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-5.1.3[${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}] + ) + ') +" + +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 + 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 +}