commit:     a3c5a254949bc375e5b9431e6ddadd41bb13e0d8
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Thu Jun  6 01:43:43 2024 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Thu Jun  6 02:02:35 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a3c5a254

dev-python/sqlglot: Bump to 25.0.2

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

 dev-python/sqlglot/Manifest              |   1 +
 dev-python/sqlglot/sqlglot-25.0.2.ebuild | 121 +++++++++++++++++++++++++++++++
 2 files changed, 122 insertions(+)

diff --git a/dev-python/sqlglot/Manifest b/dev-python/sqlglot/Manifest
index 16533dcae5e9..a5e8a044315e 100644
--- a/dev-python/sqlglot/Manifest
+++ b/dev-python/sqlglot/Manifest
@@ -22,6 +22,7 @@ DIST smallvec-1.11.2.crate 34801 BLAKE2B 
58645e99db8f02db64d02c75860c7ea41836c42
 DIST sqlglot-24.0.3.tar.gz 18699657 BLAKE2B 
263092d5646f3f29c8f1251102623c37257a678f5837ca374576ce96ab49ec6db030bdfacd34bf729119faea995a5698e7952c381880f5e0616c60260f525aba
 SHA512 
765449ead2e3561970c4e77d80dab9449ae283a6d214b8eb7386f82c0eee2a60869ecd1a0e9453640786fbda3bea5550a3856bef1dc73a7fcf0500b318c79dae
 DIST sqlglot-24.1.0.tar.gz 18704713 BLAKE2B 
2ea8b2bec6c3e4237cfa0e1310da744555ef18f46cb5a0ead83e50a53fea1857094acb6422be638c18fc935650bf522d987f97eb71883a41b2cb3e6279d5ac59
 SHA512 
f0379cba95cf2e17cde6a010f651285bdace7619a51e4bc4260388966682d41cc65215405dbe5e33cc34aab8c3c088de5bb9c44baf4c9290aa3725ca89cb5dc2
 DIST sqlglot-24.1.2.tar.gz 18714358 BLAKE2B 
83f5e45a53e4ed2dbd897d2fa25576debaae9e7dcb267383db9a44e6cc45beccf5e9e6353977bd8ace085d559077f9d7b45c091edd83b7828acd64bcc5cfdd8c
 SHA512 
1228467ff8d3b73a78c6b34921b7dda0abdc6a0ff34965aa15bbc4a63163982b0e5452e3d913e67e897a3ede3cb4a7ee5372ded02c7f3f60ab9d31e2f2a60d07
+DIST sqlglot-25.0.2.tar.gz 18728128 BLAKE2B 
c0530a0d08e0800f118bc89c8aaa324a31e444d7f49743cc86314223076406cb0f447fbd5da876797da76ca9ac3a82c89ce21b474c5a00d8d0fbd5a145d0fe6a
 SHA512 
27428ffd104c923baac188fd3ba5f29db601a3296d1c1fe87591a0c2c442973dc96b1973be1158f15eed683c89d355e8fc9f1a88acf9c655065cd58ecac19c47
 DIST syn-2.0.41.crate 246016 BLAKE2B 
9d389f2e2a0acb4c84c309456e8ffcc88c5d4d541535ed136832d7a6054dde45a598bb68e8a6f3062ca2a96e1ceae947d54b3aec9bad65b0c51d6733aa6c80db
 SHA512 
6bbaf69ca783025dfb81ac3612ac60bfbed31b2d87792909b35c12892dadebdaff2ddf9463105e536b671dce5870610ab90fe29471284bbd3014dca8d6993f1a
 DIST target-lexicon-0.12.12.crate 25156 BLAKE2B 
f3803596c75f6c89438592a1176c3748fc2c0524d7d50a20056de1cd26d40c572b05bafcdf6dd702752864bea37c8b4f28f96dadc12a5b3bb1d279b25e489f85
 SHA512 
6147295c43ba1b7b087a3c5ab51534b2985e4e77e5e15687978cfb9d07e21c4fd9bc7191576d6cabd268d08a44dc733c4a957e59dba8b948c2055d8bb433aeca
 DIST unicode-ident-1.0.12.crate 42168 BLAKE2B 
4cede03c08758ccd6bf53a0d0057d7542dfdd0c93d342e89f3b90460be85518a9fd24958d8b1da2b5a09b5ddbee8a4263982194158e171c2bba3e394d88d6dac
 SHA512 
bc1824e1e4452a40732fc69874d7e1a66f7803717a314790dcf48867eba34bc9441331ef031e386912e52c385645c25b6ed39d4f149973b5b97371b1b96b1920

diff --git a/dev-python/sqlglot/sqlglot-25.0.2.ebuild 
b/dev-python/sqlglot/sqlglot-25.0.2.ebuild
new file mode 100644
index 000000000000..3ecfcc322a3e
--- /dev/null
+++ b/dev-python/sqlglot/sqlglot-25.0.2.ebuild
@@ -0,0 +1,121 @@
+# 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]
+       [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}]
+       )
+"
+
+distutils_enable_tests pytest
+
+QA_FLAGS_IGNORED="usr/lib.*/py.*/site-packages/sqlglotrs/sqlglotrs.*.so"
+
+src_unpack() {
+       cargo_src_unpack
+}
+
+src_prepare() {
+       # remove fragile timing check
+       sed -i -e '/assertLessEqual(time\.time/d' tests/test_parser.py || die
+       distutils-r1_src_prepare
+}
+
+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
+}

Reply via email to