commit: e1e6b070bbc5169d80546e3867f9012b8c341f19 Author: Michał Górny <mgorny <AT> gentoo <DOT> org> AuthorDate: Fri Sep 5 04:02:47 2025 +0000 Commit: Michał Górny <mgorny <AT> gentoo <DOT> org> CommitDate: Fri Sep 5 04:10:12 2025 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e1e6b070
dev-python/sqlglot: Bump to 27.12.0 Signed-off-by: Michał Górny <mgorny <AT> gentoo.org> dev-python/sqlglot/Manifest | 1 + dev-python/sqlglot/sqlglot-27.12.0.ebuild | 175 ++++++++++++++++++++++++++++++ 2 files changed, 176 insertions(+) diff --git a/dev-python/sqlglot/Manifest b/dev-python/sqlglot/Manifest index 2d69434960b4..da5102c54d0b 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.10.0.tar.gz 5437988 BLAKE2B 600a9bbb94f7fae9bdb0cd8e2e01ffa8d4dd0a113ccd1123bc92b65094d41bf98cb405647fe28ecff63a72401ae10d1a12ef489f063efa7c0aa22f68d754656f SHA512 b6e4eb2c28549c417e8311298d862887205dbcb0e2ff58621988ec904a5e02b6420c69bd5ac8399576207ad799764a2880d09910e42102fef7c21f19a0d8bd89 DIST sqlglot-27.11.0.tar.gz 5443357 BLAKE2B 6af93c7efd402e1ed94fc52d74503945b99e832196d2edd3eb5ee315a7c8ec31d4c3380d5270b78ac8ea54959f4b6dabbad2794d05e78d90588d99195190cc17 SHA512 58ca620725c253f1f917ff468f797d9afb68186b987dc3770c1a78d8a4d59f3d0453a26239e4f0080214316fd1abbb21653c3795a7099f515dae366ab5c4e951 +DIST sqlglot-27.12.0.tar.gz 5450508 BLAKE2B f7eb5b9aebed247f9896cf7e2afe0aa217a2db9c0f25c0527a31769e8921446e6ced1fd7a233fb95db162ade7fb2840404bb31e3197cff62a1b0b6e45c047bcb SHA512 95e6e161b0b586d28ce4ee3470f09b06fef996600b9d6f200fdc5d5a0e844b30166be0efd28fc9cc2f447547d3b53ecbb618e9bd3fe7420f2ba06354135b6c20 diff --git a/dev-python/sqlglot/sqlglot-27.12.0.ebuild b/dev-python/sqlglot/sqlglot-27.12.0.ebuild new file mode 100644 index 000000000000..9a517e6a4e70 --- /dev/null +++ b/dev-python/sqlglot/sqlglot-27.12.0.ebuild @@ -0,0 +1,175 @@ +# 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 + local DISTUTILS_UPSTREAM_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 +}
