summaryrefslogtreecommitdiff
path: root/dev-python/sqlglot
diff options
context:
space:
mode:
Diffstat (limited to 'dev-python/sqlglot')
-rw-r--r--dev-python/sqlglot/Manifest9
-rw-r--r--dev-python/sqlglot/sqlglot-26.16.4.ebuild (renamed from dev-python/sqlglot/sqlglot-26.12.1.ebuild)3
-rw-r--r--dev-python/sqlglot/sqlglot-26.17.1.ebuild96
3 files changed, 104 insertions, 4 deletions
diff --git a/dev-python/sqlglot/Manifest b/dev-python/sqlglot/Manifest
index c1da36424b8b..f060d12011f1 100644
--- a/dev-python/sqlglot/Manifest
+++ b/dev-python/sqlglot/Manifest
@@ -1,4 +1,7 @@
-DIST sqlglot-26.12.1-crates.tar.xz 8327388 BLAKE2B 69213d11940f9d4e743b169ef831b8b52a771f012e247570cf0703580a14af435d4d033b4b3ddfca6f4022b741261a24f3b47e5137de644d863714006520f857 SHA512 5de0781c54265b369e5e46b7cfbcc04a3118aa8d1323bff14f2841c95d471f545c923eedb88dbbb81a910801c5a505ff37a25701af936c06cf55a1659cd8822e
-DIST sqlglot-26.12.1.tar.gz 5341371 BLAKE2B 73d45669337786903f5e3e14683e96fa4d258696cd1116d3f82034437178612651e8c804cfb072cae444bd6a0d0496556f20e459d3d7470700215e16c23cb4af SHA512 2839c23d6ffd3dc2fc63258b43485c6f8471cdadec3be53012fccad41158ca834ac6aef41b21c004a749be130fef40d5747cb0d88a9a22c8dedf3b153c675aa2
-EBUILD sqlglot-26.12.1.ebuild 2139 BLAKE2B 1aec95095de601663c67803a003823c22a83e5c28eb0677e233d17fc1ecc6551f49a8443ed0f7c14aa2e9d875099acab5aa4b4faae6359b7a57d55be33ffed06 SHA512 f6d5827a7315c32b01d00502d243571f17380d41210fc172fed8788274f170aa92daf1998ac9d9c577be2202fcf910749dc4db9aa965bea72f6b7e9246a5a321
+DIST sqlglot-26.16.4-crates.tar.xz 8327388 BLAKE2B 69213d11940f9d4e743b169ef831b8b52a771f012e247570cf0703580a14af435d4d033b4b3ddfca6f4022b741261a24f3b47e5137de644d863714006520f857 SHA512 5de0781c54265b369e5e46b7cfbcc04a3118aa8d1323bff14f2841c95d471f545c923eedb88dbbb81a910801c5a505ff37a25701af936c06cf55a1659cd8822e
+DIST sqlglot-26.16.4.tar.gz 5355134 BLAKE2B 3fd5e7687f7a65a9499773a53b7d694ba02caa1ad7aabaa744716329716b3e62d2c999aadc6a66f2524a3d41a8bc80d753b18e0c77997d7abbf3e67748be83ab SHA512 791ed728405759b6053f620bb3dd5c16eddf60566087e6290e22503816d7c52f52a1bed3b897f41d2ae9cd9b6c3e4730f3c154ae29ca64e0ac07e10d27deedf7
+DIST sqlglot-26.17.1-crates.tar.xz 8327388 BLAKE2B 69213d11940f9d4e743b169ef831b8b52a771f012e247570cf0703580a14af435d4d033b4b3ddfca6f4022b741261a24f3b47e5137de644d863714006520f857 SHA512 5de0781c54265b369e5e46b7cfbcc04a3118aa8d1323bff14f2841c95d471f545c923eedb88dbbb81a910801c5a505ff37a25701af936c06cf55a1659cd8822e
+DIST sqlglot-26.17.1.tar.gz 5356122 BLAKE2B 7c83c2569c767a424929b0d88aa451e29f83596e3b381db9e35175488492ef1e30bc7fbf2a33a7a261c2396259db12b1cc89f07420f3e1994c416b5d891be258 SHA512 5cef50050b412baa5ef72056b377d327e6d19990de07f9b6f5d915b7bc628ee3a343fc64003e1ea3fc2555759c79662d4081d7925d3dd6b77f6c08a6507e971e
+EBUILD sqlglot-26.16.4.ebuild 2181 BLAKE2B 37eccbe55db0c3efc481dbde4c4adacbd673f33508c0055a0229459076f96a55ab3d2f665dbcc45074f653a21cae3eb2ea8a4e2304d3a9975a36d3d0e10da4fb SHA512 98e782c5e6acfcf6885244dcd4fca989add77abcf8488633e53b55f2b347e79f66f7c825ab85062875365b665eb15b420d018de22cdbfbc4ef47340ec263730a
+EBUILD sqlglot-26.17.1.ebuild 2181 BLAKE2B 37eccbe55db0c3efc481dbde4c4adacbd673f33508c0055a0229459076f96a55ab3d2f665dbcc45074f653a21cae3eb2ea8a4e2304d3a9975a36d3d0e10da4fb SHA512 98e782c5e6acfcf6885244dcd4fca989add77abcf8488633e53b55f2b347e79f66f7c825ab85062875365b665eb15b420d018de22cdbfbc4ef47340ec263730a
MISC metadata.xml 611 BLAKE2B 10bf684677182565c9932d51ed9b3b9c80d376d6db945bd7b0dd0d9a19a85dc0d10cb169ff2048ae5f7f73d0f438d259b6231c13c525b5374ec99377f4ffdd10 SHA512 2b26d0f77962807052b94ad78addcfdce9859042af3be34df267dc6e70b6231dd779563935fd21955cd8646fd0cce3fee8c939387ac8056194a0b777743dd2ae
diff --git a/dev-python/sqlglot/sqlglot-26.12.1.ebuild b/dev-python/sqlglot/sqlglot-26.16.4.ebuild
index e6c62a001c9e..63c868d11554 100644
--- a/dev-python/sqlglot/sqlglot-26.12.1.ebuild
+++ b/dev-python/sqlglot/sqlglot-26.16.4.ebuild
@@ -6,7 +6,7 @@ EAPI=8
CRATES=""
DISTUTILS_EXT=1
DISTUTILS_USE_PEP517=setuptools
-PYTHON_COMPAT=( python3_{10..13} )
+PYTHON_COMPAT=( python3_{11..13} )
CARGO_OPTIONAL=1
@@ -62,6 +62,7 @@ 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
diff --git a/dev-python/sqlglot/sqlglot-26.17.1.ebuild b/dev-python/sqlglot/sqlglot-26.17.1.ebuild
new file mode 100644
index 000000000000..63c868d11554
--- /dev/null
+++ b/dev-python/sqlglot/sqlglot-26.17.1.ebuild
@@ -0,0 +1,96 @@
+# Copyright 2023-2025 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+CRATES=""
+DISTUTILS_EXT=1
+DISTUTILS_USE_PEP517=setuptools
+PYTHON_COMPAT=( python3_{11..13} )
+
+CARGO_OPTIONAL=1
+
+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}]
+ )
+"
+
+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
+}