summaryrefslogtreecommitdiff
path: root/dev-python/sqlglot
diff options
context:
space:
mode:
Diffstat (limited to 'dev-python/sqlglot')
-rw-r--r--dev-python/sqlglot/Manifest2
-rw-r--r--dev-python/sqlglot/sqlglot-26.0.1.ebuild113
2 files changed, 115 insertions, 0 deletions
diff --git a/dev-python/sqlglot/Manifest b/dev-python/sqlglot/Manifest
index f16efc51af7a..37801fc96c08 100644
--- a/dev-python/sqlglot/Manifest
+++ b/dev-python/sqlglot/Manifest
@@ -15,10 +15,12 @@ DIST pyo3-macros-backend-0.22.6.crate 66312 BLAKE2B ec0b11bee1ad2192e8d95cebab00
DIST quote-1.0.37.crate 28558 BLAKE2B a7d007a69e619f853af94333e1066bb767013312bd99f147b1b153611242bcfa9c76768b1ba47278589db309a9acd61a772c8ec3b567e48439bb9d831f9326d4 SHA512 c4ed21428c1f89cf22b85d80720a7869831a9c129d694617b0ce8c258278114ab98846f3f653abf736d1c86bc9224bbd695e9a7b06aa3adf292d02e1ef14cc05
DIST sqlglot-25.34.1.tar.gz 19772522 BLAKE2B 70ec20f25436858df7ae116d7c5cb68439b28601384a94e82343d45d3a3ebdd5bf2cae7f1455f9bb37144923eaf0ca0d4d5aa8a4b28ff36c767c0a38a3443d56 SHA512 62580df95d3984c8967e0c883156ba6bb089ce2180b24cb09d53d2e84c5ed2462808f7ce6858e3a91243a7ce25f5157dca5a0efe161afab0ccdb1428d9b918bb
DIST sqlglot-26.0.0.tar.gz 19775305 BLAKE2B 8c727ff5d8dee15acadd870171cf430cf10403fc50c40420df4f31d31e501ea1a1dc43c3e450fa1a2a372e815adc205539cf97124a419a7df0342d2e2c0f8e98 SHA512 6f1f9300af5c183aa19cbbb337a6bd47a7e512e583d33279484e7fac447c52ba45c89afe1ca6dd1a3dbeb7193de234f1f0f568c3cb061cdbf0987705ea389875
+DIST sqlglot-26.0.1.tar.gz 19785413 BLAKE2B 64e1df5df4391222a845eeb2804f78e241cff00596701954d79fa58e14fd9ee9ac6231cb2b54536c793c54f95cf66090f5a9d2d85b33adb8d6df2f232627cbc9 SHA512 b4f09828a3264367c7e562c0750179edb1457caa77d0a0c5e234d44762b9446ccbcecb7d9ed59152d2e85a957f496e6b0787f898f8c0fca1258b9eecaf7283a9
DIST syn-2.0.87.crate 278076 BLAKE2B 93385f64103fdb482bec34c7912474ae7a5935948715e6eb9a54907e0db5c39f089f6cd393bab33c935c59a1bbb0f4099431f206343811c1a450554d96a35756 SHA512 bcfff545d6dfefd81e09f8f30a86bdd85759b3a7d4093ef3365ed02718e10dbd604c52b94c9d7fa955d339fdc5b6c079940c6f345b5a48c52b5c8607794ca6f2
DIST target-lexicon-0.12.16.crate 26488 BLAKE2B e7950e4a302059a1bfc9bc15618a3c1b971a17cffae117a6e8f5f63a0d82fd2bd02680301d15338612d5426d349dd24cfee30ee787a15a7d3187f2a6825e69ce SHA512 092639957c4a0391560b6442b31c47159c04d12e971010f730a6ec9cb5389e4be903ef3d7daa06db95e64dc78b6970731fb647179ebaad2b12e9ed5e9b24da27
DIST unicode-ident-1.0.12.crate 42168 BLAKE2B 4cede03c08758ccd6bf53a0d0057d7542dfdd0c93d342e89f3b90460be85518a9fd24958d8b1da2b5a09b5ddbee8a4263982194158e171c2bba3e394d88d6dac SHA512 bc1824e1e4452a40732fc69874d7e1a66f7803717a314790dcf48867eba34bc9441331ef031e386912e52c385645c25b6ed39d4f149973b5b97371b1b96b1920
DIST unindent-0.2.3.crate 7306 BLAKE2B a57407b117e99c230750c7d4a2a0899586c8271e4ba88ecb409c976905c014f42885372c234a75fbfbedf71dbed779f95f735975d150adacdcb61152a49db4c2 SHA512 2f1eb420ea3653b00d3e5fa0c2c105da8fd8a37cb3e699373c168604b799fccd5f0faf0cddce4212d119c2afb0c86b41efc3a50752b83ff7beda2bd84d360505
EBUILD sqlglot-25.34.1.ebuild 2396 BLAKE2B 38cff7b615cff2d499692ba41b76cba7dc8e2941b0783d0b8095a69af6b092ff04f8a7f756f29c0e525e4a4c8f09f6f4d19f30e4d0117dc1da8101ea9c25cbd8 SHA512 f6602ea20b792e9546d76163887ad6b3c4f479dbea68761bb3ea16b7095b61fe649ad70f5465b8894be984059b1656c12662b0cc10bacbd2a1cef1cc67fcb27c
EBUILD sqlglot-26.0.0.ebuild 2396 BLAKE2B 38cff7b615cff2d499692ba41b76cba7dc8e2941b0783d0b8095a69af6b092ff04f8a7f756f29c0e525e4a4c8f09f6f4d19f30e4d0117dc1da8101ea9c25cbd8 SHA512 f6602ea20b792e9546d76163887ad6b3c4f479dbea68761bb3ea16b7095b61fe649ad70f5465b8894be984059b1656c12662b0cc10bacbd2a1cef1cc67fcb27c
+EBUILD sqlglot-26.0.1.ebuild 2396 BLAKE2B 38cff7b615cff2d499692ba41b76cba7dc8e2941b0783d0b8095a69af6b092ff04f8a7f756f29c0e525e4a4c8f09f6f4d19f30e4d0117dc1da8101ea9c25cbd8 SHA512 f6602ea20b792e9546d76163887ad6b3c4f479dbea68761bb3ea16b7095b61fe649ad70f5465b8894be984059b1656c12662b0cc10bacbd2a1cef1cc67fcb27c
MISC metadata.xml 611 BLAKE2B 10bf684677182565c9932d51ed9b3b9c80d376d6db945bd7b0dd0d9a19a85dc0d10cb169ff2048ae5f7f73d0f438d259b6231c13c525b5374ec99377f4ffdd10 SHA512 2b26d0f77962807052b94ad78addcfdce9859042af3be34df267dc6e70b6231dd779563935fd21955cd8646fd0cce3fee8c939387ac8056194a0b777743dd2ae
diff --git a/dev-python/sqlglot/sqlglot-26.0.1.ebuild b/dev-python/sqlglot/sqlglot-26.0.1.ebuild
new file mode 100644
index 000000000000..27ddd9c3901d
--- /dev/null
+++ b/dev-python/sqlglot/sqlglot-26.0.1.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="
+ autocfg@1.1.0
+ cfg-if@1.0.0
+ heck@0.5.0
+ indoc@2.0.4
+ libc@0.2.150
+ memoffset@0.9.0
+ once_cell@1.19.0
+ portable-atomic@1.9.0
+ proc-macro2@1.0.89
+ pyo3-build-config@0.22.6
+ pyo3-ffi@0.22.6
+ pyo3-macros-backend@0.22.6
+ pyo3-macros@0.22.6
+ pyo3@0.22.6
+ quote@1.0.37
+ syn@2.0.87
+ target-lexicon@0.12.16
+ unicode-ident@1.0.12
+ unindent@0.2.3
+"
+
+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
+}