diff options
| author | Michał Górny <mgorny@gentoo.org> | 2025-10-09 04:36:58 +0200 |
|---|---|---|
| committer | Michał Górny <mgorny@gentoo.org> | 2025-10-09 04:42:41 +0200 |
| commit | cf8f69e846d6a83d37afb748b725bae9614ea326 (patch) | |
| tree | 157500f0a2458ae9a69452aa8acc8d0d687f5c39 /dev-python | |
| parent | 5cf51d569464d35971af8536b8591bac51c865d3 (diff) | |
| download | gentoo-cf8f69e846d6a83d37afb748b725bae9614ea326.tar.gz gentoo-cf8f69e846d6a83d37afb748b725bae9614ea326.tar.bz2 gentoo-cf8f69e846d6a83d37afb748b725bae9614ea326.zip | |
dev-python/sqlglot: Bump to 27.24.2
Signed-off-by: Michał Górny <mgorny@gentoo.org>
Diffstat (limited to 'dev-python')
| -rw-r--r-- | dev-python/sqlglot/Manifest | 2 | ||||
| -rw-r--r-- | dev-python/sqlglot/sqlglot-27.24.2.ebuild | 93 |
2 files changed, 95 insertions, 0 deletions
diff --git a/dev-python/sqlglot/Manifest b/dev-python/sqlglot/Manifest index 1e7a354724e9..48e51038c3c6 100644 --- a/dev-python/sqlglot/Manifest +++ b/dev-python/sqlglot/Manifest @@ -1,3 +1,5 @@ DIST sqlglot-26.33.0-crates.tar.xz 8859792 BLAKE2B abb2051b392c53dc3caa705ddd8df7076819a26dcdaa89fa3760559a79578db01e86943c2d0ffb8006263c2dca3aa50d20023eae9d772f8ebd12a8a2d3266cdd SHA512 7cca439a06433a62bcd4a2af33d240f46e9b5240cc158edbc654efb37a464aa0f1ebbe9749b2fc6352127b4809b63af2341fac6240050c414e578ae99444ba5d DIST sqlglot-26.33.0.tar.gz 5353340 BLAKE2B 18ace866ec89ced24911803497e8cb5c55fc6c157bf62b893e90df914b8be3360403ffff67f196080cdef9b9b9078b86d471494ae9768e7947a8b4d5d39e49af SHA512 df38e899d59bdd07aca0e5370833133308f9c5be4d0c990bf8112a48776fae034b622938aba968769aa5dc5e2957d56da48c89045b91b2d33783e6e25acc4a7b DIST sqlglot-27.21.0.tar.gz 5484119 BLAKE2B 901a182c7cd226876cbd248500076044b9ba2302e40c646583e4de78934a8a41bbffc967bf274d7b231eef6774098fa0ccd2a3f04f562e785f51b4842ca63ab4 SHA512 d0e776c40a7a5f0149cb2f48f5be9e6e8c61c163ac74bbe62659e4056f051408f364b58ccae68ea7341e3adee480c8c9113e61b5aa46d951112b7aa4e66d1e8b +DIST sqlglot-27.24.2-crates.tar.xz 8973180 BLAKE2B f893ebe4b94d4c2ab94f8fa902e51066e861511f698b24660d5becd31a98837c5a7f23a3d80c0716e8017012ae61f7202440c0092e1417e5f61b62e2e9f4260b SHA512 6a92b1ba2fbb51eac170db7a927927f8a06f184ebf820107a813c9cfa4dcdbea794199090a33986b48f5f00b3f43b404b7e1d26f5bf9663c53cb2b8f134d69af +DIST sqlglot-27.24.2.tar.gz 5489180 BLAKE2B c41246a29ed2dddf4f5063625ebb55ee2663468321d02ba73b8c17bd3dec6c0407e09cad198e4bb2d02d7fbc0efa3d04583c37bcb9988ce9af25d874522ee8bf SHA512 045f181addf3e5f272991c6a475897878d491967e24ad849a08f690c5b93db817b213245dee99d725bdc309acc55207e8d5f388d51a65d111c253e5c6993f82c diff --git a/dev-python/sqlglot/sqlglot-27.24.2.ebuild b/dev-python/sqlglot/sqlglot-27.24.2.ebuild new file mode 100644 index 000000000000..8f5401ed64eb --- /dev/null +++ b/dev-python/sqlglot/sqlglot-27.24.2.ebuild @@ -0,0 +1,93 @@ +# Copyright 2023-2025 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +CRATES=" +" + +CARGO_OPTIONAL=1 +DISTUTILS_EXT=1 +DISTUTILS_USE_PEP517=setuptools +PYTHON_COMPAT=( python3_{11..14} ) +CRATE_PV=27.24.2 + +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${CRATE_PV}/sqlglot-${CRATE_PV}-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}] + ) +" + +EPYTEST_PLUGINS=() +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_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 +} |
