commit:     c5b25198d935241ffd4cff15f16b2863faac22d8
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Wed Aug 13 19:05:07 2025 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Wed Aug 13 19:31:05 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c5b25198

dev-python/sqlglot: Bump to 27.7.0

Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>

 dev-python/sqlglot/Manifest              |   1 +
 dev-python/sqlglot/sqlglot-27.7.0.ebuild | 180 +++++++++++++++++++++++++++++++
 2 files changed, 181 insertions(+)

diff --git a/dev-python/sqlglot/Manifest b/dev-python/sqlglot/Manifest
index f7ac8273f1b3..2bfd501c6546 100644
--- a/dev-python/sqlglot/Manifest
+++ b/dev-python/sqlglot/Manifest
@@ -4,3 +4,4 @@ DIST sqlglot-27.5.1-crates.tar.xz 8859792 BLAKE2B 
abb2051b392c53dc3caa705ddd8df7
 DIST sqlglot-27.5.1.tar.gz 5406588 BLAKE2B 
cdd541c15c314b96c52610fbbae4fba4bda96e76983ead1d2f145c234d6b54bb267c8dec342dde83d3b691233956288f6accc26ee5fa53cd4ead64cd76e1cd74
 SHA512 
435ce78f58bffe402d859c995d503142b83ea96dbe259c5d1e7037d33c1cf49f4b604da3b3cd1f77652334bd4482c8929f3d35f8174b0b258f5d5e3edac7596b
 DIST sqlglot-27.6.0-crates.tar.xz 8859792 BLAKE2B 
abb2051b392c53dc3caa705ddd8df7076819a26dcdaa89fa3760559a79578db01e86943c2d0ffb8006263c2dca3aa50d20023eae9d772f8ebd12a8a2d3266cdd
 SHA512 
7cca439a06433a62bcd4a2af33d240f46e9b5240cc158edbc654efb37a464aa0f1ebbe9749b2fc6352127b4809b63af2341fac6240050c414e578ae99444ba5d
 DIST sqlglot-27.6.0.tar.gz 5409152 BLAKE2B 
4de40e48e39842903c082d52fa57af8db99726abbbb47af1b618f651460a6c01f8b7233cc481412d2f0cc5d214a7723a8eb83de26e508a4d1eee75b7aa2c9622
 SHA512 
8033fbce129ff7f32865bbb6f3121a4c0a74d097e424458ddce494492bd8fa4a905f022275bdca49bd4d62c5f1f8774cdb5be6d57c273fc1fdfe40793f22e66a
+DIST sqlglot-27.7.0.tar.gz 5414964 BLAKE2B 
2efcebbe2934dd998383a73712e42b06100897c3414c95f9b9b6c31672e93dc3a610a68bbd5876e83c79bb38d59c24341de8399b74112b2aa20249a5b72ce360
 SHA512 
c373d23389ba52b69fa82ac48c116db98706aab7c9309207c9057e6bca2c11378d6281658cdd1a1535f66954b0c599aecbfa218f697c329bf637dc1d43262817

diff --git a/dev-python/sqlglot/sqlglot-27.7.0.ebuild 
b/dev-python/sqlglot/sqlglot-27.7.0.ebuild
new file mode 100644
index 000000000000..dd19ceb9d941
--- /dev/null
+++ b/dev-python/sqlglot/sqlglot-27.7.0.ebuild
@@ -0,0 +1,180 @@
+# Copyright 2023-2025 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+CRATES="
+       [email protected]
+       [email protected]
+       [email protected]
+       [email protected]
+       [email protected]
+       [email protected]
+       [email protected]
+       [email protected]
+       [email protected]
+       [email protected]
+       [email protected]
+       [email protected]
+       [email protected]
+       [email protected]
+       [email protected]
+       [email protected]
+       [email protected]
+       [email protected]
+       [email protected]
+       [email protected]
+       [email protected]
+       [email protected]
+       [email protected]
+       [email protected]
+       [email protected]
+       [email protected]
+       [email protected]
+       [email protected]
+       [email protected]
+       [email protected]
+       [email protected]
+       [email protected]
+       [email protected]
+       [email protected]
+       [email protected]
+       [email protected]
+       [email protected]
+       [email protected]
+       [email protected]
+       [email protected]
+       [email protected]
+       [email protected]
+       [email protected]
+       [email protected]
+       [email protected]
+       [email protected]
+       [email protected]
+       [email protected]
+       [email protected]
+       [email protected]
+       [email protected]
+       [email protected]
+       [email protected]
+       [email protected]
+       [email protected]
+       [email protected]
+       [email protected]
+       [email protected]
+       [email protected]
+       [email protected]
+       [email protected]
+       [email protected]
+       [email protected]
+       [email protected]
+       [email protected]
+       [email protected]
+       [email protected]
+       [email protected]
+       [email protected]
+       [email protected]
+       [email protected]
+       [email protected]
+       [email protected]
+       [email protected]
+       [email protected]
+       [email protected]
+       [email protected]
+       [email protected]
+       [email protected]
+       [email protected]
+       [email protected]
+"
+
+CARGO_OPTIONAL=1
+DISTUTILS_EXT=1
+DISTUTILS_USE_PEP517=setuptools
+PYTHON_COMPAT=( python3_{11..14} )
+CRATE_PV=26.33.0
+
+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
+               local DISTUTILS_UPSTREAM_PEP517=maturin
+               cd sqlglotrs || die
+               distutils-r1_python_compile
+               cd - >/dev/null || die
+       fi
+}
+
+python_test() {
+       local EPYTEST_DESELECT=(
+               # timing, sigh
+               # https://github.com/tobymao/sqlglot/issues/3961
+               
tests/test_generator.py::TestGenerator::test_generate_nested_binary
+       )
+       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
+}

Reply via email to