commit: 0c0e544657d9c9a36e25934077b0e31c449ba26a Author: Michał Górny <mgorny <AT> gentoo <DOT> org> AuthorDate: Wed Oct 8 04:56:58 2025 +0000 Commit: Michał Górny <mgorny <AT> gentoo <DOT> org> CommitDate: Wed Oct 8 06:25:51 2025 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0c0e5446
dev-python/sqlglot: Bump to 27.21.0 Signed-off-by: Michał Górny <mgorny <AT> gentoo.org> dev-python/sqlglot/Manifest | 1 + dev-python/sqlglot/sqlglot-27.21.0.ebuild | 174 ++++++++++++++++++++++++++++++ 2 files changed, 175 insertions(+) diff --git a/dev-python/sqlglot/Manifest b/dev-python/sqlglot/Manifest index 9c7539a84492..cabda6f774da 100644 --- a/dev-python/sqlglot/Manifest +++ b/dev-python/sqlglot/Manifest @@ -2,3 +2,4 @@ DIST sqlglot-26.33.0-crates.tar.xz 8859792 BLAKE2B abb2051b392c53dc3caa705ddd8df DIST sqlglot-26.33.0.tar.gz 5353340 BLAKE2B 18ace866ec89ced24911803497e8cb5c55fc6c157bf62b893e90df914b8be3360403ffff67f196080cdef9b9b9078b86d471494ae9768e7947a8b4d5d39e49af SHA512 df38e899d59bdd07aca0e5370833133308f9c5be4d0c990bf8112a48776fae034b622938aba968769aa5dc5e2957d56da48c89045b91b2d33783e6e25acc4a7b DIST sqlglot-27.19.0.tar.gz 5479756 BLAKE2B 72ea02627fe22d6cbe7d40b9c61b93d9eb1f8f8c038efebefc922b6abec73ade89a01cac41acba1c841b91494fa3077544280777e399ef8d07bef8251900f751 SHA512 91e5b252557f7d03fded6625724676617fec9ab5614bae226c2200fea7ba95cdbfe52a224a6274b0cd7d646f58276685e3bd43b3c4180c946d1c1ad7158482ba DIST sqlglot-27.20.0.tar.gz 5480742 BLAKE2B 49875da9b993fc2333f9c0cfad9a8cffdd8aa2cc057ae7eb7807f217ab6e3a1a4f268664f3789480c30b7160663f3180b50c47050051a35664c1a28510e98923 SHA512 fef4fde85ebb64069e601c4a1ca59df7a1b4c85218f8a49c32486d0fdbcf234e70319e2b2ae4a908fdc8a9558b5f9c8d90bb45c53c43448d9adb1d1fd98ad866 +DIST sqlglot-27.21.0.tar.gz 5484119 BLAKE2B 901a182c7cd226876cbd248500076044b9ba2302e40c646583e4de78934a8a41bbffc967bf274d7b231eef6774098fa0ccd2a3f04f562e785f51b4842ca63ab4 SHA512 d0e776c40a7a5f0149cb2f48f5be9e6e8c61c163ac74bbe62659e4056f051408f364b58ccae68ea7341e3adee480c8c9113e61b5aa46d951112b7aa4e66d1e8b diff --git a/dev-python/sqlglot/sqlglot-27.21.0.ebuild b/dev-python/sqlglot/sqlglot-27.21.0.ebuild new file mode 100644 index 000000000000..e14a71567190 --- /dev/null +++ b/dev-python/sqlglot/sqlglot-27.21.0.ebuild @@ -0,0 +1,174 @@ +# Copyright 2023-2025 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +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] + [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] + [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] +" + +CARGO_OPTIONAL=1 +DISTUTILS_EXT=1 +DISTUTILS_USE_PEP517=setuptools +PYTHON_COMPAT=( python3_{11..14} ) +CRATE_PV=26.33.0 + +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 +}
