commit: d3eef09bf9b697c9884189e2f048bfa71a202818 Author: Alfred Wingate <parona <AT> protonmail <DOT> com> AuthorDate: Fri Mar 13 23:45:34 2026 +0000 Commit: Sam James <sam <AT> gentoo <DOT> org> CommitDate: Sat Mar 14 18:46:43 2026 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d3eef09b
dev-db/mycli: add 1.64.0 Signed-off-by: Alfred Wingate <parona <AT> protonmail.com> Part-of: https://codeberg.org/gentoo/gentoo/pulls/311 Signed-off-by: Sam James <sam <AT> gentoo.org> dev-db/mycli/Manifest | 2 + dev-db/mycli/mycli-1.64.0.ebuild | 190 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 192 insertions(+) diff --git a/dev-db/mycli/Manifest b/dev-db/mycli/Manifest index 2ec2cde9f6e9..3242470ac09b 100644 --- a/dev-db/mycli/Manifest +++ b/dev-db/mycli/Manifest @@ -3,3 +3,5 @@ DIST mycli-1.59.0.tar.gz 350772 BLAKE2B ee639a836cee08c71db4da801b9376093422ea2a DIST mycli-1.59.0.tar.gz.provenance 9433 BLAKE2B c70c48165568e033ff8051d66bc17294390fac8f6aa5a18afa317f4b76813a96cd6bbab6fb2677fb86c0676650d998ad8359bb6ace78fdfdfa67826782161ee5 SHA512 12326f87f1b374339ed5253d7eaf64065463c20a9fc26bccd898a6df18023800a2d235fe92472ac74edd5aa2571eac68a2c83684d01d5b5520015fa97488c5a0 DIST mycli-1.62.0.tar.gz 355488 BLAKE2B ff3931068f97b8bed0be964d4035520121913c8370143879dbc7dff31448017b5303d8ce51582e8205f2d4120a0b2a411b6da7f743522e563d2958b3d73f446a SHA512 77638d7448c8070984881b1b5a9f31c53f6a986e06cbad982573ae886795b7a4b3de4ecb2e3118c6dd22be97f413e8c50912252dbf93ad648fbe83c643d22e7d DIST mycli-1.62.0.tar.gz.provenance 9527 BLAKE2B 6a39ac6c2404f1caf463b6b10a8e65dc8faf1c1eb0cc3c5ac769873eb84b6ffecab81b879595a8d34553533b82027e512c9e460a717a335f5daee854a896a24b SHA512 65df9fde6992bb9fca5d3d4b03ef517381134c87be22da38532ef819876e9d9e25853135a7b70730fa65a0daee2b1f852e89a2afa0d77c51b92a5fc6a8fd45df +DIST mycli-1.64.0.tar.gz 356929 BLAKE2B 2cc581f8f79c75aafb2eae6523ac3b2842e958ef45b4031cafea78a17dd6c5df01e778b51c9e4002c82ce31b297636ad1f26141d20e98b483a54280c27ea06e8 SHA512 b4af6b15990975e40a4ff15e605e2692d71b3a54bd83b84dc97b8a5b638eadf6e95d3a311abbb8f07e55c10b119bcf738bdf663366cf04ed2432039cbedc8efe +DIST mycli-1.64.0.tar.gz.provenance 9605 BLAKE2B 320f5f1ef0b356948a2e87b8acb0b99ad840ede59fe8b5bf102b472ed25ef4b6d8c03ec41b95e1edc4346068364bae4f6bdbe956d3efded926756936bf08da1b SHA512 aa1e1f5e31addc744c8cf378e400aa034da7eb89e93d9458eccdecfd52bfa261ff990ce21267f7961f1ffedffc3b8499eb0899fcec06d87e078d3de994cf38f0 diff --git a/dev-db/mycli/mycli-1.64.0.ebuild b/dev-db/mycli/mycli-1.64.0.ebuild new file mode 100644 index 000000000000..a6ec734f4e13 --- /dev/null +++ b/dev-db/mycli/mycli-1.64.0.ebuild @@ -0,0 +1,190 @@ +# Copyright 1999-2026 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_{12..14} ) +PYPI_VERIFY_REPO=https://github.com/dbcli/mycli +inherit distutils-r1 edo eapi9-ver multiprocessing 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" + +# optional llm unpackaged +IUSE="ssh" + +# ~paramiko-3.5.1: Pinned due to breakage. Feature soft deprecated for future removal +# https://github.com/dbcli/mycli/commit/82c7d92a16ad15906c46df14cc6e6ee0249609e6 +# https://github.com/dbcli/mycli/issues/1464 +RDEPEND=" + $(python_gen_cond_dep ' + >=dev-python/cli-helpers-2.11.0[${PYTHON_USEDEP}] + >=dev-python/click-8.3.1[${PYTHON_USEDEP}] + >=dev-python/configobj-5.0.9[${PYTHON_USEDEP}] + >=dev-python/cryptography-46.0.5[${PYTHON_USEDEP}] + >=dev-python/keyring-25.7.0[${PYTHON_USEDEP}] + >=dev-python/prompt-toolkit-3.0.6[${PYTHON_USEDEP}] + <dev-python/prompt-toolkit-4.0.0[${PYTHON_USEDEP}] + >=dev-python/pycryptodome-3.23.0[${PYTHON_USEDEP}] + >=dev-python/pyfzf-0.3.1[${PYTHON_USEDEP}] + >=dev-python/pygments-2.19.2[${PYTHON_USEDEP}] + >=dev-python/pymysql-1.1.2[${PYTHON_USEDEP}] + >=dev-python/pyperclip-1.11.0[${PYTHON_USEDEP}] + >=dev-python/rapidfuzz-3.14.3[${PYTHON_USEDEP}] + >=dev-python/sqlglot-29.0.1[${PYTHON_USEDEP}] + <dev-python/sqlparse-0.6.0[${PYTHON_USEDEP}] + >=dev-python/sqlparse-0.3.0[${PYTHON_USEDEP}] + >=dev-python/wcwidth-0.6.0[${PYTHON_USEDEP}] + ssh? ( + ~dev-python/paramiko-3.5.1[${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/behave-1.3.3[${PYTHON_USEDEP}] + ~dev-python/paramiko-3.5.1[${PYTHON_USEDEP}] + >=dev-python/pexpect-4.9.0[${PYTHON_USEDEP}] + dev-python/sshtunnel[${PYTHON_USEDEP}] + ) + ') +" + +EPYTEST_PLUGINS=() +distutils_enable_tests pytest + +export SETUPTOOLS_SCM_PRETEND_VERSION=${PV} + +python_prepare_all() { + # no coverage please + sed -e 's/import coverage ; coverage.process_startup(); //' \ + -i test/features/environment.py test/features/steps/wrappers.py || die + + # dont pin dependencies + sed -e '/^dependencies = \[/,/^\]$/ s/"\(.*\) ~=/"\1 >=/' \ + -i pyproject.toml || die + + # convert from pycryptodomex to pycryptodome + sed -e 's/pycryptodomex/pycryptodome/' -i pyproject.toml || die + sed -e 's/from Cryptodome/from Crypto/' -i mycli/config.py || die + + # network-sandbox messes with these + sed -e '/run mycli on localhost without port/i @gentoo_skip' \ + -e '/run mycli on TCP host without port/i @gentoo_skip' \ + -e '/run mycli without host and port/i @gentoo_skip' \ + -i test/features/connection.feature || die + + # Requires an old school vi and the symlink for vi itself messes with this + sed -e '/edit sql in file with external editor/i @gentoo_skip' \ + -i test/features/iocommands.feature || 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" + + EPYTEST_IGNORE=( + # Requires unpackaged llm + test/test_llm_special.py + # AssertionError: assert 8 in [4, 5, 6, 7] + # Per upstream: "...it is a flaky test at best." + # https://github.com/dbcli/mycli/commit/3d08910a366d4505a40e8a0fb36c210330723f18 + test/test_special_iocommands.py::test_watch_query_full + ) + + local failures=() + if ! nonfatal distutils-r1_src_test ; then + failures+=( pytest ) + fi + + if ! nonfatal edo behave \ + --jobs=$(get_makeopts_jobs) \ + --summary --verbose \ + --tags="not @gentoo_skip" \ + test/features ; then + failures+=( behave ) + fi + + 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 +} + +pkg_postinst() { + if use ssh && ver_replacing -lt 1.49; then + elog "The built-in SSH functionality has been soft deprecated in mycli." + elog "It may be removed upstream in a future release and even sooner" + elog "downstream in the ebuild due to the pinned paramiko dependency." + elog "See also https://github.com/dbcli/mycli/issues/1464" + elog "" + fi + if ver_replacing -lt 1.50; then + elog "Reading configuration from '.my.cnf' has been deprecated." + elog "Configuration should be done in '.myclirc' from now on," + elog "and in the future '.my.cnf' will be ignored." + elog "See also https://github.com/dbcli/mycli/issues/1490" + elog "" + fi +}
