commit:     55b54a2cb10de5f381647de51a190e4b9f321f31
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Tue Mar  4 05:57:48 2025 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Tue Mar  4 06:47:59 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=55b54a2c

dev-python/sqlglot: Bump to 26.8.0

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

 dev-python/sqlglot/Manifest              |   1 +
 dev-python/sqlglot/sqlglot-26.8.0.ebuild | 177 +++++++++++++++++++++++++++++++
 2 files changed, 178 insertions(+)

diff --git a/dev-python/sqlglot/Manifest b/dev-python/sqlglot/Manifest
index b51b3b050782..8f2d6cd242a6 100644
--- a/dev-python/sqlglot/Manifest
+++ b/dev-python/sqlglot/Manifest
@@ -56,6 +56,7 @@ DIST serde-1.0.216.crate 79000 BLAKE2B 
98c0f5cee2f9212c6b7620d2068665379471ceb75
 DIST serde_derive-1.0.216.crate 57674 BLAKE2B 
12a9228679c16288c08c8b256707e276aec79f84ac7af0c4cfd1f109500dfea80438df17d798acdd30a9743c753e70093b22bd324217529bac483f257682a3e2
 SHA512 
80fcb552279ac7562297df878f2f5e9ac09241701f5cf1088fcbf473b638f58cd3092a7930d8937ca0df9a47b9ae1a42d490cd46a275259cd8089fe8f5426469
 DIST serde_json-1.0.133.crate 150739 BLAKE2B 
7891eb5b8edcc7fd09ab1e15d3881ffdcb629aa39f2bd758c0505700a5f2dfabd85b1b66c3b094268bc1627b346e204c792f4ca61efa76c54ab9cd5744fb0ee2
 SHA512 
20e65ec87bff319897a141960d13deb5cadcf821209c1ee8799f1dc7f458ce432bc62c16df5bdada1c8d3cc01ff23b8125e8fa0a03545d4614f32efd687dc69f
 DIST sqlglot-26.7.0.tar.gz 5322836 BLAKE2B 
c44996699bb9831e3bba1fbb8ea4eb8c88f47f2e27a30e61143606e576f5ea07d78fd9a180c1f9f13df4a610b9d33fb104ea44f3f50a5fee3886d7efcb10a378
 SHA512 
40b8a544b87510d5cb098d9ede8c0a00ab2d5a82b3fac816a1377d79377c4daad65b29a04f9dfbcad672d831f1d07104686fba80b29d1591d7922d7c58c66d72
+DIST sqlglot-26.8.0.tar.gz 5325732 BLAKE2B 
442247956468c411489d3b8ca4edb094eb5814ea72505897e818880acd656daa2d5192b7e1e4ec468dcada2836f708a16ca042d3c51c96982464c1998ae692cf
 SHA512 
8a67977e346f2c67ce1aafd998720eb1eb2e6a0411c4f78b4455f5936961ff274d0e9553a5c62727698499c9e7d98daee76836d0fc0ccb6b55b472f88cfe6b73
 DIST syn-2.0.87.crate 278076 BLAKE2B 
93385f64103fdb482bec34c7912474ae7a5935948715e6eb9a54907e0db5c39f089f6cd393bab33c935c59a1bbb0f4099431f206343811c1a450554d96a35756
 SHA512 
bcfff545d6dfefd81e09f8f30a86bdd85759b3a7d4093ef3365ed02718e10dbd604c52b94c9d7fa955d339fdc5b6c079940c6f345b5a48c52b5c8607794ca6f2
 DIST target-lexicon-0.12.16.crate 26488 BLAKE2B 
e7950e4a302059a1bfc9bc15618a3c1b971a17cffae117a6e8f5f63a0d82fd2bd02680301d15338612d5426d349dd24cfee30ee787a15a7d3187f2a6825e69ce
 SHA512 
092639957c4a0391560b6442b31c47159c04d12e971010f730a6ec9cb5389e4be903ef3d7daa06db95e64dc78b6970731fb647179ebaad2b12e9ed5e9b24da27
 DIST tinytemplate-1.2.1.crate 26490 BLAKE2B 
af39d96f33f63238e455a4e38fde1d1730fd9661ae68be7b05df6ef9d2ab1a04db1332cc4ec9deb6da3a8e22b124df81b0fa8916d8491b808742bb733c8e48be
 SHA512 
0cc080057e096f0796e72004343e1a8332c2e8a12e43f6ade150ebf632e9c29c7ad04de0b940cd57df81efdc4d07a6607da9b86a30d8383e39ac3d7be185edb9

diff --git a/dev-python/sqlglot/sqlglot-26.8.0.ebuild 
b/dev-python/sqlglot/sqlglot-26.8.0.ebuild
new file mode 100644
index 000000000000..f66889c1ac68
--- /dev/null
+++ b/dev-python/sqlglot/sqlglot-26.8.0.ebuild
@@ -0,0 +1,177 @@
+# Copyright 2023-2025 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+DISTUTILS_EXT=1
+DISTUTILS_USE_PEP517=setuptools
+PYTHON_COMPAT=( python3_{10..13} )
+
+CARGO_OPTIONAL=1
+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]
+"
+
+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? (
+               ${CARGO_CRATE_URIS}
+       )
+"
+
+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}]
+       )
+"
+
+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_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