commit: da2c094a107dfc2ae90b6e15dc54aa9fb75af7c1
Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Tue Oct 14 06:05:31 2025 +0000
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Tue Oct 14 06:48:45 2025 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=da2c094a
dev-python/sqlglot: Bump to 27.27.0
Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>
dev-python/sqlglot/Manifest | 1 +
dev-python/sqlglot/sqlglot-27.27.0.ebuild | 93 +++++++++++++++++++++++++++++++
2 files changed, 94 insertions(+)
diff --git a/dev-python/sqlglot/Manifest b/dev-python/sqlglot/Manifest
index 60c31e0b10d2..fdd33971eaab 100644
--- a/dev-python/sqlglot/Manifest
+++ b/dev-python/sqlglot/Manifest
@@ -2,3 +2,4 @@ DIST sqlglot-26.33.0-crates.tar.xz 8859792 BLAKE2B
abb2051b392c53dc3caa705ddd8df
DIST sqlglot-26.33.0.tar.gz 5353340 BLAKE2B
18ace866ec89ced24911803497e8cb5c55fc6c157bf62b893e90df914b8be3360403ffff67f196080cdef9b9b9078b86d471494ae9768e7947a8b4d5d39e49af
SHA512
df38e899d59bdd07aca0e5370833133308f9c5be4d0c990bf8112a48776fae034b622938aba968769aa5dc5e2957d56da48c89045b91b2d33783e6e25acc4a7b
DIST sqlglot-27.24.2-crates.tar.xz 8973180 BLAKE2B
f893ebe4b94d4c2ab94f8fa902e51066e861511f698b24660d5becd31a98837c5a7f23a3d80c0716e8017012ae61f7202440c0092e1417e5f61b62e2e9f4260b
SHA512
6a92b1ba2fbb51eac170db7a927927f8a06f184ebf820107a813c9cfa4dcdbea794199090a33986b48f5f00b3f43b404b7e1d26f5bf9663c53cb2b8f134d69af
DIST sqlglot-27.26.0.tar.gz 5490283 BLAKE2B
6492b62b6bef8f1b6c1a756896800429996b873a8b58264224e26c00e6c4fb4ff2f99dd595acb6021320c0fa6fc7838d9ca6a29966ce602797c100ab1cb64ed8
SHA512
2c76505c4c4a61d0f8f3ad294f8b3627bb63458c233d807db2ac89d7b12522b3e1caadef361eef4acc99507c9035a00e873aff9bdf1748b28b5fec3d0d4e8747
+DIST sqlglot-27.27.0.tar.gz 5491023 BLAKE2B
aa08211b3ee5c695b0f52558c4665a7cbf1dd373d87e15df6fff4828cdb728c2580c44231bd591cab25fb7a1e6a686b6d052b67cae1042911470c34aadaeaa61
SHA512
1346cd22c958f23da326d86f4d1ff425df4150ce51b6e00673b34c2d5cc28d3c32a0eb75dd0793db6ae0f3d37be778bc29c007dd9b348462d0410e941498c159
diff --git a/dev-python/sqlglot/sqlglot-27.27.0.ebuild
b/dev-python/sqlglot/sqlglot-27.27.0.ebuild
new file mode 100644
index 000000000000..8f5401ed64eb
--- /dev/null
+++ b/dev-python/sqlglot/sqlglot-27.27.0.ebuild
@@ -0,0 +1,93 @@
+# Copyright 2023-2025 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
+}