commit:     91977371c7a342ebc15748bb746eeac44ad84492
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Mon Nov 18 04:54:17 2024 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Mon Nov 18 04:54:17 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=91977371

dev-python/sqlglot: Bump to 25.31.3

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

 dev-python/sqlglot/Manifest               |   1 +
 dev-python/sqlglot/sqlglot-25.31.3.ebuild | 113 ++++++++++++++++++++++++++++++
 2 files changed, 114 insertions(+)

diff --git a/dev-python/sqlglot/Manifest b/dev-python/sqlglot/Manifest
index ca744a9a4a4e..97d975b9121a 100644
--- a/dev-python/sqlglot/Manifest
+++ b/dev-python/sqlglot/Manifest
@@ -30,6 +30,7 @@ DIST scopeguard-1.2.0.crate 11619 BLAKE2B 
8b7e9ed6cefef9ee55407fb9690d57a2a98bb9
 DIST smallvec-1.11.2.crate 34801 BLAKE2B 
58645e99db8f02db64d02c75860c7ea41836c427c03ee3b0b23365e73a406e4fd6ac312bf13fc5faef8bb6111c10fcfd5f839d5b3686e9b34d1626f8469fc327
 SHA512 
5cfb427c3b99b0dbd71f6154ed899abcde9d7d2992977ac7b2ef3a4c3ff51e4efafd133071a69609b4ed6cb269bdc26b79eb72e1988f10dfcaef8185d950cd1d
 DIST sqlglot-25.30.0.tar.gz 19626939 BLAKE2B 
25c0ad4146ceb8718c7725bd2fa24e0d012deb6db6ba64801561ecf0f88ec2bb6b9d8a695d63dea188c26a2d8a411d197dd19b02829266b3780a6a9cc3e3c1f7
 SHA512 
545b04a83fc68388655cd47c73efe1cc41f606a058f4d33c71ffc5a4c531fa675ba1439c3ffa271117bf5cd63039bce828ce5ee228e30f27fa5d9183e8e02c9f
 DIST sqlglot-25.31.2.tar.gz 19679402 BLAKE2B 
3ea776e3d76a9cab3fb1ed80fb1a5b63220ccc3cda9b6f6c0573915659482e61eca29ba49ad593226cb4ef75643535172923212c7c19dfa5dc9e3d8abc428628
 SHA512 
a0cac8161074460a51031d80f93eb7e58ac3aec5ab5a9397ebd48ab7b699d6faca1877edc0624e91d4c2e88d8e210c366f107a2fbe5f71ae56930f249fef7928
+DIST sqlglot-25.31.3.tar.gz 19677473 BLAKE2B 
6e72b192a7782495ff344b7c018cde58f11bb071f470db9149f31a38174a15d3b1d64cef90733209dd08d791ffab2a0ae263c28b9ec4ba5941ce89ed5758dbb8
 SHA512 
47acee570affd5eb8ee62a67812a26977598a882b9b261a53a07b8af9b58d74e5b4b8261271d3084497aba660ffe541d56f3503fa946e55b309cefedd609a445
 DIST syn-2.0.41.crate 246016 BLAKE2B 
9d389f2e2a0acb4c84c309456e8ffcc88c5d4d541535ed136832d7a6054dde45a598bb68e8a6f3062ca2a96e1ceae947d54b3aec9bad65b0c51d6733aa6c80db
 SHA512 
6bbaf69ca783025dfb81ac3612ac60bfbed31b2d87792909b35c12892dadebdaff2ddf9463105e536b671dce5870610ab90fe29471284bbd3014dca8d6993f1a
 DIST syn-2.0.87.crate 278076 BLAKE2B 
93385f64103fdb482bec34c7912474ae7a5935948715e6eb9a54907e0db5c39f089f6cd393bab33c935c59a1bbb0f4099431f206343811c1a450554d96a35756
 SHA512 
bcfff545d6dfefd81e09f8f30a86bdd85759b3a7d4093ef3365ed02718e10dbd604c52b94c9d7fa955d339fdc5b6c079940c6f345b5a48c52b5c8607794ca6f2
 DIST target-lexicon-0.12.12.crate 25156 BLAKE2B 
f3803596c75f6c89438592a1176c3748fc2c0524d7d50a20056de1cd26d40c572b05bafcdf6dd702752864bea37c8b4f28f96dadc12a5b3bb1d279b25e489f85
 SHA512 
6147295c43ba1b7b087a3c5ab51534b2985e4e77e5e15687978cfb9d07e21c4fd9bc7191576d6cabd268d08a44dc733c4a957e59dba8b948c2055d8bb433aeca

diff --git a/dev-python/sqlglot/sqlglot-25.31.3.ebuild 
b/dev-python/sqlglot/sqlglot-25.31.3.ebuild
new file mode 100644
index 000000000000..27ddd9c3901d
--- /dev/null
+++ b/dev-python/sqlglot/sqlglot-25.31.3.ebuild
@@ -0,0 +1,113 @@
+# Copyright 2023-2024 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]
+"
+
+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-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