commit: 39cd92e0e1921c84e9f6c586ce392988a81d0a98
Author: Arthur Zamarin <arthurzam <AT> gentoo <DOT> org>
AuthorDate: Tue Jan 13 20:09:56 2026 +0000
Commit: Arthur Zamarin <arthurzam <AT> gentoo <DOT> org>
CommitDate: Tue Jan 13 20:21:23 2026 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=39cd92e0
dev-python/sqlglot: add 28.6.0
Signed-off-by: Arthur Zamarin <arthurzam <AT> gentoo.org>
dev-python/sqlglot/Manifest | 1 +
dev-python/sqlglot/sqlglot-28.6.0.ebuild | 93 ++++++++++++++++++++++++++++++++
2 files changed, 94 insertions(+)
diff --git a/dev-python/sqlglot/Manifest b/dev-python/sqlglot/Manifest
index b2f3d9acfc27..e566f49937aa 100644
--- a/dev-python/sqlglot/Manifest
+++ b/dev-python/sqlglot/Manifest
@@ -2,3 +2,4 @@ DIST sqlglot-27.24.2-crates.tar.xz 8973180 BLAKE2B
f893ebe4b94d4c2ab94f8fa902e51
DIST sqlglot-27.29.0.tar.gz 5503507 BLAKE2B
f9c92b8f287ca4c99c792d005e62846afd669ba27b5d09042de06c8c3fa5e46b21abdf5134cc81ae3ae2cb13d0a5997c56ac07c14e5fb938544d5dbc08c70632
SHA512
5fc7a8a81b39a2dba007b501f1f5c2de9fa1e74b39d44e1bea706491db1ead0329aa2fbfb7c4997a50458137af70d259a227a8662ac26ba2904dde2b66922bb1
DIST sqlglot-28.4.1.tar.gz 5651480 BLAKE2B
93ec014282cf556b12c7cdc074000869f17fe46d25a886f9cd3aa88fa18363abd8e953d28296c3338e7bf4323b228f51189501ea624d90dbc597fc7a7cc4dea0
SHA512
3d396089a545d3571ffff2ae4a2c20156d27e0ed695d237250bca8cf84e2ac844321c2bbaf24951ea2ce3b89c2a5872f6ef8e88a51031c0d98e186b21cabac22
DIST sqlglot-28.5.0.tar.gz 5652688 BLAKE2B
8dc8b0ee8f8d5cf80856622bb8344ceefd1443edd25c6d54137f868fc5d3d97d61ca0ee4ed9230a137903531c7e137bf1856d4a46403e29a76dd9d69a5a8a476
SHA512
334107b7f226fd390b2dcf772ecb42eead89611a46ead876d661e9dc961afe5533d54320f6ee44220b616d16fa35899a10c8ed96b081a15f07d0d87661cb5082
+DIST sqlglot-28.6.0.tar.gz 5676522 BLAKE2B
270d3cb18b72422ca7a6d7376a3064a426ebb4dd9247afda3d54ddd9a9d39176192356d448ce97cff0af1528b111334809350397aa5819c3392e35e61bd66138
SHA512
c9d1e924ee22740c52509497f33fbeb208c9e73a99a29f77d96c8a9bb3e599e32706efea50e48015c153232cdcf4c1cc139b4398a9ed0184a2be2212be17d76a
diff --git a/dev-python/sqlglot/sqlglot-28.6.0.ebuild
b/dev-python/sqlglot/sqlglot-28.6.0.ebuild
new file mode 100644
index 000000000000..4992b97cbf62
--- /dev/null
+++ b/dev-python/sqlglot/sqlglot-28.6.0.ebuild
@@ -0,0 +1,93 @@
+# Copyright 2023-2026 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+CRATES="
+"
+
+CARGO_OPTIONAL=1
+DISTUTILS_EXT=1
+DISTUTILS_USE_PEP517=setuptools
+PYTHON_COMPAT=( python3_{11..14} )
+CRATE_PV=27.24.2
+
+inherit cargo distutils-r1 pypi optfeature
+
+DESCRIPTION="An easily customizable SQL parser and transpiler"
+HOMEPAGE="
+ https://sqlglot.com/
+ https://github.com/tobymao/sqlglot/
+ https://pypi.org/project/sqlglot/
+"
+SRC_URI+="
+ native-extensions? (
+
https://github.com/gentoo-crate-dist/sqlglot/releases/download/v${CRATE_PV}/sqlglot-${CRATE_PV}-crates.tar.xz
+ )
+"
+
+LICENSE="MIT"
+LICENSE+=" native-extensions? ("
+# Dependent crate licenses
+LICENSE+="
+ Apache-2.0 Apache-2.0-with-LLVM-exceptions MIT Unicode-DFS-2016
+"
+LICENSE+=" )"
+SLOT="0"
+KEYWORDS="~amd64 ~arm64 ~x86"
+IUSE="+native-extensions"
+
+BDEPEND="
+ native-extensions? (
+ ${RUST_DEPEND}
+ dev-util/maturin[${PYTHON_USEDEP}]
+ )
+ test? (
+ dev-python/pytz[${PYTHON_USEDEP}]
+ )
+"
+
+EPYTEST_PLUGINS=()
+distutils_enable_tests pytest
+
+QA_FLAGS_IGNORED="usr/lib.*/py.*/site-packages/sqlglotrs/sqlglotrs.*.so"
+
+pkg_setup() {
+ use native-extensions && rust_pkg_setup
+}
+
+src_unpack() {
+ cargo_src_unpack
+}
+
+python_compile() {
+ distutils-r1_python_compile
+
+ if use native-extensions; then
+ local DISTUTILS_USE_PEP517=maturin
+ cd sqlglotrs || die
+ distutils-r1_python_compile
+ cd - >/dev/null || die
+ fi
+}
+
+python_test() {
+ local EPYTEST_IGNORE=(
+ # Tests require pyspark or duckdb which aren't in the tree.
+ # Pandas would be a requirement normally, but it gets ignored
by proxy.
+ "tests/dataframe/integration/test_dataframe.py"
+ "tests/dataframe/integration/test_grouped_data.py"
+ "tests/dataframe/integration/test_session.py"
+ "tests/test_executor.py"
+ "tests/test_optimizer.py"
+ )
+
+ # make sure not to use an earlier installed version
+ local -x SQLGLOTRS_TOKENIZER=$(usex native-extensions 1 0)
+ rm -rf sqlglotrs || die
+ epytest
+}
+
+pkg_postinst() {
+ optfeature "simplifying timedelta expressions"
dev-python/python-dateutil
+}