commit: f801b4fde77587bfd1b4fe8782277cb8d56d3f84 Author: Michał Górny <mgorny <AT> gentoo <DOT> org> AuthorDate: Sun Jun 22 03:48:02 2025 +0000 Commit: Michał Górny <mgorny <AT> gentoo <DOT> org> CommitDate: Sun Jun 22 03:58:16 2025 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f801b4fd
dev-python/sqlglot: Bump to 26.30.0 Signed-off-by: Michał Górny <mgorny <AT> gentoo.org> dev-python/sqlglot/Manifest | 2 + dev-python/sqlglot/sqlglot-26.30.0.ebuild | 178 ++++++++++++++++++++++++++++++ 2 files changed, 180 insertions(+) diff --git a/dev-python/sqlglot/Manifest b/dev-python/sqlglot/Manifest index a7daf22647fe..923b3e585e59 100644 --- a/dev-python/sqlglot/Manifest +++ b/dev-python/sqlglot/Manifest @@ -1,2 +1,4 @@ DIST sqlglot-26.29.0-crates.tar.xz 8859792 BLAKE2B abb2051b392c53dc3caa705ddd8df7076819a26dcdaa89fa3760559a79578db01e86943c2d0ffb8006263c2dca3aa50d20023eae9d772f8ebd12a8a2d3266cdd SHA512 7cca439a06433a62bcd4a2af33d240f46e9b5240cc158edbc654efb37a464aa0f1ebbe9749b2fc6352127b4809b63af2341fac6240050c414e578ae99444ba5d DIST sqlglot-26.29.0.tar.gz 5335487 BLAKE2B 0d0475d3beb1df5d414cb627f6d37cc0ee116ca83262c3157c3e0608667f28a807e3d615c53aec392416f75eaed6ed679d570fb38e58aa7e354aefc1384d36f4 SHA512 f56f945b5dff7cf631eb3e26685d132e3dfd77ea4ea897ef75a6df1c0b23830f84cce0b85d780c86fedee54529f9ee04af0362a94c6a7b6b2d11a8ceb94abfd2 +DIST sqlglot-26.30.0-crates.tar.xz 8859792 BLAKE2B abb2051b392c53dc3caa705ddd8df7076819a26dcdaa89fa3760559a79578db01e86943c2d0ffb8006263c2dca3aa50d20023eae9d772f8ebd12a8a2d3266cdd SHA512 7cca439a06433a62bcd4a2af33d240f46e9b5240cc158edbc654efb37a464aa0f1ebbe9749b2fc6352127b4809b63af2341fac6240050c414e578ae99444ba5d +DIST sqlglot-26.30.0.tar.gz 5339339 BLAKE2B 7b65105318653e2cbed6c7fea8ffa0112776e1919d22ae48f0e11daadb45f8aa5e9ff62c3333ef95a16fb7e6d01dea0f5e4a06e50a4435c85d06a006b893d324 SHA512 204cb4a0019e6b60c3a0bc04725311a8f02de38ca25a1aa3e2f9cbdeada3839cf5cde5b21db515c7ecb8630f3b771d7ef8a86c7e12ab024370e486363e4fb8c1 diff --git a/dev-python/sqlglot/sqlglot-26.30.0.ebuild b/dev-python/sqlglot/sqlglot-26.30.0.ebuild new file mode 100644 index 000000000000..207cbfd84c15 --- /dev/null +++ b/dev-python/sqlglot/sqlglot-26.30.0.ebuild @@ -0,0 +1,178 @@ +# 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..13} ) + +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${PV}/${P}-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}] + ) +" + +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_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 +}
