commit: ebeb77b95831156d0194adedc0ee12bdb0978153 Author: Michał Górny <mgorny <AT> gentoo <DOT> org> AuthorDate: Fri Sep 19 12:04:44 2025 +0000 Commit: Michał Górny <mgorny <AT> gentoo <DOT> org> CommitDate: Fri Sep 19 12:23:19 2025 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ebeb77b9
dev-python/sqlglot: Bump to 27.16.3 Signed-off-by: Michał Górny <mgorny <AT> gentoo.org> dev-python/sqlglot/Manifest | 1 + dev-python/sqlglot/sqlglot-27.16.3.ebuild | 175 ++++++++++++++++++++++++++++++ 2 files changed, 176 insertions(+) diff --git a/dev-python/sqlglot/Manifest b/dev-python/sqlglot/Manifest index 4355375d03e8..bc8cfd4440ed 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.14.0.tar.gz 5462946 BLAKE2B a88f1775a1dc5d42678eab8427f857bb060f0dfcf3ba97f43bd1761b6807a7c1fd216019047d4f053f665547791f94cc52197b2d175a13e1d76a02373b4251f1 SHA512 33f072e6898e442bf690bf44d2757fd41f3a9bfc74e062cd17db60d651dca39aba2658f32958f9eed3bd1943d53b02412e5b6588762c720a2d0847e61195bcfe DIST sqlglot-27.15.3.tar.gz 5469854 BLAKE2B 6c39c40663b946abdad21c961797018938a4ed2d95cb118fbc2235794ba66f7bfd0f98bd0d338b80133087e4cfef63c3ce4098b57b4662f92ef6653fdcaa0590 SHA512 9d9ce9c6c142734476ef286fd3b7268c500c127e40ecc809db9c92bd71c987b080814641eac1beccecdac266501403c789a5428fd2bed554a54abf758aa013e8 +DIST sqlglot-27.16.3.tar.gz 5471626 BLAKE2B ec8f0a831767380362c4c2fe31d3e63355904bbe8a063172efe5f1b893fbc5fce98f9540e9a89136070db6beebe0ac4384b894e0fb103a8bd2c014a917b60b3f SHA512 b9aae79f96b2a7d797c762ab471737b29fa7760798e9121490db2f16a953a67baeb71c0d3e86d77ff00e311a2240503d1155f16669905847d91a5d4eedf18574 diff --git a/dev-python/sqlglot/sqlglot-27.16.3.ebuild b/dev-python/sqlglot/sqlglot-27.16.3.ebuild new file mode 100644 index 000000000000..9a517e6a4e70 --- /dev/null +++ b/dev-python/sqlglot/sqlglot-27.16.3.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 +}
