summaryrefslogtreecommitdiff
path: root/dev-db
diff options
context:
space:
mode:
authorCrucible <crucible@localhost>2026-10-07 03:05:00 -0500
committerCrucible <crucible@localhost>2026-10-07 03:05:00 -0500
commit4f8f07779b4dd78123821b104e43fd1eb15281dd (patch)
tree50283d655e8953ffa4cd36a42b39f72f09fed20b /dev-db
parent21cec7ace42ae94a3a1b32ecec396a199eebf3c9 (diff)
downloadsrcux-4f8f07779b4dd78123821b104e43fd1eb15281dd.tar.gz
srcux-4f8f07779b4dd78123821b104e43fd1eb15281dd.tar.xz
srcux-4f8f07779b4dd78123821b104e43fd1eb15281dd.zip
Publish srcux candidate 0000000583-20261007-030305
Diffstat (limited to 'dev-db')
-rw-r--r--dev-db/mycli/Manifest2
-rw-r--r--dev-db/mycli/mycli-2.27.0.ebuild175
2 files changed, 177 insertions, 0 deletions
diff --git a/dev-db/mycli/Manifest b/dev-db/mycli/Manifest
index f2750984651e..ce60a6f9ea2b 100644
--- a/dev-db/mycli/Manifest
+++ b/dev-db/mycli/Manifest
@@ -1,4 +1,6 @@
DIST mycli-2.25.3.tar.gz 36145883 BLAKE2B 8c46e84e0a6c66eb91a5c0d371e895a03544e22d75119e1cc15fc236077942202e670fc2ee41c8568d012962c5aa65560c746bd147644a2b9cae4770de002bdd SHA512 0b4b0814149c1466178b990bbb9cacc1143fc1583dc8636107652c0f4213fd52df9699e35a1a185a791e0c36e8cc3b8e3d8429dd77c51021fae87cdfa14d5d62
DIST mycli-2.25.3.tar.gz.provenance 9512 BLAKE2B f4664bb21b0c661558a6cb7ba95b7838b0d7fe6a5455b6f87d46bcdc661c38a012a77da31f33f1da693d36d05c8c9aef250282d1434bac3297f9355e2981b9eb SHA512 058dfd5157689bceb9c18bb025fc5d67ffc3dd9462f14d3b1539ffee0f9d5eeeceedd1e84d994dee03129a0161aa5702995ad663a798e6e57555199ea86205ed
+DIST mycli-2.27.0.tar.gz 36170663 BLAKE2B 9f3d4aa5abbd7c44dc80824412104bd5ef8d67182e8ddfd8806aafdcdcb36df90c1e975ca92be8345cad549fc48f9f3703070f8e741187c1c10dc88bc9d1f577 SHA512 ee972ccb49d5798fed48f0a45143df47973cf81efdef1a120332430e3b41143be4453f71a5f80c56998acc4c492d69e59c1ff5f5acb5bc0ec5800fb65d514a2d
+DIST mycli-2.27.0.tar.gz.provenance 9653 BLAKE2B b57c9f9c3bcc1abfe3784ac87acac9e9c0065226b520583ea43cec949eaa0a12f2e40f0a2f011760cb86b4cb2a4eb7d55c57f8653679521b097d7f0821fdec9b SHA512 22ece394063abb336563dc76d643ce0fe63806039a9d1db3dc20b0bca7ecd5f3aee38e5d1a0e9ec2a70467e2b4b999217f34459453d1f0b5174ab8b060c7c43e
DIST mycli-2.9.0.tar.gz 564998 BLAKE2B 108d9e242071f72580908bc0cb70ad3062be6f11b94a341fbffff1ba52f4d0ba1bed8971fe0e81e5e9ada2eee7f2278f2731f1b8a86f9a56206440c7542e7ef6 SHA512 06a6cbc86b73da73ca9955f7be7a86547dab3a590fb732f0d2b19516e784e39b1b293d131580c2c9fa0d2c7994a17084eae24ae606dd07e386cae47613d38b05
DIST mycli-2.9.0.tar.gz.provenance 9522 BLAKE2B 6b7e5f76ac781148147f84816983d8689478b1303d14573326130006c17f1d3b5a98342b8a7d0d1b118dc9bd4928da84aa9d653c6985ef93f2092901781dd6c8 SHA512 7503b3e70e0b9936279766faf39cc1c558fb8de477894ca83efe624f82be97f459879c14fa477cc02e71acedf3ad6ea03ba8c890b8e02996db1b6fb5a4acf83a
diff --git a/dev-db/mycli/mycli-2.27.0.ebuild b/dev-db/mycli/mycli-2.27.0.ebuild
new file mode 100644
index 000000000000..d3f2023a48d5
--- /dev/null
+++ b/dev-db/mycli/mycli-2.27.0.ebuild
@@ -0,0 +1,175 @@
+# Copyright 1999-2026 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+DISTUTILS_USE_PEP517=setuptools
+PYTHON_COMPAT=( python3_{13..14} )
+PYPI_VERIFY_REPO=https://github.com/dbcli/mycli
+inherit distutils-r1 edo multiprocessing pypi shell-completion
+
+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 dataframe packages (altair and polars) unpackaged
+# optional llm unpackaged
+
+RDEPEND="
+ >=dev-python/cli-helpers-2.15.1[${PYTHON_USEDEP}]
+ >=dev-python/click-8.5.0[${PYTHON_USEDEP}]
+ >=dev-python/clickdc-0.1.1[${PYTHON_USEDEP}]
+ >=dev-python/configobj-5.0.9[${PYTHON_USEDEP}]
+ >=dev-python/cryptography-50.0.1[${PYTHON_USEDEP}]
+ >=dev-python/jinja2-3.1.6[${PYTHON_USEDEP}]
+ >=dev-python/keyring-25.7.0[${PYTHON_USEDEP}]
+ <dev-python/prompt-toolkit-4.0.0[${PYTHON_USEDEP}]
+ >=dev-python/prompt-toolkit-3.0.41[${PYTHON_USEDEP}]
+ >=dev-python/pycryptodome-3.23.0[${PYTHON_USEDEP}]
+ >=dev-python/pyfzf-0.3.1[${PYTHON_USEDEP}]
+ >=dev-python/pygments-2.21.0[${PYTHON_USEDEP}]
+ >=dev-python/pymysql-1.2.3[${PYTHON_USEDEP}]
+ >=dev-python/pyperclip-1.11.0[${PYTHON_USEDEP}]
+ >=dev-python/rapidfuzz-3.14.5[${PYTHON_USEDEP}]
+ >=dev-python/sqlglot-30.17.0[${PYTHON_USEDEP}]
+ >=dev-python/sqlparse-0.6.0[${PYTHON_USEDEP}]
+ >=dev-python/yaspin-3.4.0[${PYTHON_USEDEP}]
+ >=dev-python/wcwidth-0.8.3[${PYTHON_USEDEP}]
+"
+BDEPEND="
+ dev-python/setuptools-scm[${PYTHON_USEDEP}]
+ test? (
+ dev-db/mysql[server]
+ >=dev-python/behave-1.3.3[${PYTHON_USEDEP}]
+ >=dev-python/pexpect-4.9.0[${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
+}
+
+python_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/pytests/test_special_llm.py"
+ # Requires unpackaged altairs and polars
+ "test/pytests/test_polars_transform.py"
+ "test/pytests/test_polars_completion.py"
+ )
+
+ EPYTEST_DESELECT=(
+ # Requires unpackaged polars
+ "test/pytests/test_main_modes_repl.py::test_transform_shell_redirect_writes_formatted_transformed_rows"
+ "test/pytests/test_main_modes_repl.py::test_transform_redirect_survives_database_reconnect"
+ "test/pytests/test_main_modes_repl.py::test_transform_redirect_output_failure_does_not_leak_to_next_query"
+ )
+
+ local failures=()
+ if ! nonfatal epytest -o addopts= ; 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 with ${EPYTHON}: ${failures}"
+ fi
+}
+
+python_install_all() {
+ distutils-r1_python_install_all
+
+ dobashcomp mycli/resources/completions/bash/mycli
+ dofishcomp mycli/resources/completions/fish/mycli.fish
+ dozshcomp mycli/resources/completions/zsh/_mycli
+}