commit:     a57ee3624c8a75133446a0e43f84fa34e377d67c
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Mon Jul 28 05:35:24 2025 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Mon Jul 28 05:56:00 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a57ee362

dev-python/sqlglot: Bump to 27.4.1

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

 dev-python/sqlglot/Manifest              |   2 +
 dev-python/sqlglot/sqlglot-27.4.1.ebuild | 179 +++++++++++++++++++++++++++++++
 2 files changed, 181 insertions(+)

diff --git a/dev-python/sqlglot/Manifest b/dev-python/sqlglot/Manifest
index 8a615c418b02..43229436c096 100644
--- a/dev-python/sqlglot/Manifest
+++ b/dev-python/sqlglot/Manifest
@@ -4,3 +4,5 @@ DIST sqlglot-27.3.1-crates.tar.xz 8859792 BLAKE2B 
abb2051b392c53dc3caa705ddd8df7
 DIST sqlglot-27.3.1.tar.gz 5394397 BLAKE2B 
d9620f38a2b25b79253d4b5d3bab957f13ca3590b401da984fdfe8066cb66bb5fc91fa35e29d4c784966e9d8a165c403b3ebcb796b4d6ae9274991c2edd1b619
 SHA512 
345555074f8011b303eff15eb3e7e0acedf4c7d84f59090bf29d886032589ee979960c0da197d758c909443899637f8b750c7dd09011b1acb57aba7f59fbbaff
 DIST sqlglot-27.4.0-crates.tar.xz 8859792 BLAKE2B 
abb2051b392c53dc3caa705ddd8df7076819a26dcdaa89fa3760559a79578db01e86943c2d0ffb8006263c2dca3aa50d20023eae9d772f8ebd12a8a2d3266cdd
 SHA512 
7cca439a06433a62bcd4a2af33d240f46e9b5240cc158edbc654efb37a464aa0f1ebbe9749b2fc6352127b4809b63af2341fac6240050c414e578ae99444ba5d
 DIST sqlglot-27.4.0.tar.gz 5396640 BLAKE2B 
86326aa4ae54a7e27c8fd9288575cd051d75c84a9f70903cb63f97d84d700f8dfa9d03610d7718b0d34f4bf94beed90b3dd1283443be7d4d0e24431ea715af2e
 SHA512 
3c6345533f809871a64405f602fa354799099c77594ffc2fa4ecdb94acbb0606964145525cb0fefbccf23f4a1680453bd780f272d943ccc1738548e75e9296b6
+DIST sqlglot-27.4.1-crates.tar.xz 8859792 BLAKE2B 
abb2051b392c53dc3caa705ddd8df7076819a26dcdaa89fa3760559a79578db01e86943c2d0ffb8006263c2dca3aa50d20023eae9d772f8ebd12a8a2d3266cdd
 SHA512 
7cca439a06433a62bcd4a2af33d240f46e9b5240cc158edbc654efb37a464aa0f1ebbe9749b2fc6352127b4809b63af2341fac6240050c414e578ae99444ba5d
+DIST sqlglot-27.4.1.tar.gz 5397779 BLAKE2B 
a7d42bbbd3983ffae3867d34ec65b2df4e1361415cf36e017a54af6cfe914179fee94112e4e126013227e2618e5f600e5871bf1c9aad54d35ca0abdbed1ce120
 SHA512 
3a0bd025f702299bf9d442587ae87c10cf4de43a53a4d307ec566cea1c0bb3ffa824fd71dcab7e0f412b613cb250c98b1812d24e66ee593ae60c9e559fbc157e

diff --git a/dev-python/sqlglot/sqlglot-27.4.1.ebuild 
b/dev-python/sqlglot/sqlglot-27.4.1.ebuild
new file mode 100644
index 000000000000..aa0c5230423e
--- /dev/null
+++ b/dev-python/sqlglot/sqlglot-27.4.1.ebuild
@@ -0,0 +1,179 @@
+# 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} )
+
+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${PV}/${P}-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