commit: 5117c5b067522a12c618800b0e5698fd59d6f70d Author: Michał Górny <mgorny <AT> gentoo <DOT> org> AuthorDate: Wed Jul 2 04:35:50 2025 +0000 Commit: Michał Górny <mgorny <AT> gentoo <DOT> org> CommitDate: Wed Jul 2 04:35:50 2025 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5117c5b0
dev-python/sqlglot: Bump to 26.33.0 Signed-off-by: Michał Górny <mgorny <AT> gentoo.org> dev-python/sqlglot/Manifest | 2 + dev-python/sqlglot/sqlglot-26.33.0.ebuild | 179 ++++++++++++++++++++++++++++++ 2 files changed, 181 insertions(+) diff --git a/dev-python/sqlglot/Manifest b/dev-python/sqlglot/Manifest index 2139d11506e5..26e35d1ef494 100644 --- a/dev-python/sqlglot/Manifest +++ b/dev-python/sqlglot/Manifest @@ -2,3 +2,5 @@ DIST sqlglot-26.31.0-crates.tar.xz 8859792 BLAKE2B abb2051b392c53dc3caa705ddd8df DIST sqlglot-26.31.0.tar.gz 5341968 BLAKE2B 82db65bdfbb59ed62ed7ba381325121593d70d5a0a4d4c4b3bdc2d161250342794b52c062aafb8c50592665154e1b858df01dc0501e13817eb96c4e908166295 SHA512 d1308a0c14abbea57bbea2f40770efae495b4bd4f74d09b1aaed73638d0213adb8ad87c998f11f7edb25062e617cea9954f312000be38b5ff88f05f7782ae5af DIST sqlglot-26.32.0-crates.tar.xz 8859792 BLAKE2B abb2051b392c53dc3caa705ddd8df7076819a26dcdaa89fa3760559a79578db01e86943c2d0ffb8006263c2dca3aa50d20023eae9d772f8ebd12a8a2d3266cdd SHA512 7cca439a06433a62bcd4a2af33d240f46e9b5240cc158edbc654efb37a464aa0f1ebbe9749b2fc6352127b4809b63af2341fac6240050c414e578ae99444ba5d DIST sqlglot-26.32.0.tar.gz 5352453 BLAKE2B f17af9424a70b96755ea281fb829b5749f1ebf83d653c122cb5406de5bbcdf5b170bb2a17cd1770db87aa10127759b403f472d7139f19487fde1a22ed07fb87b SHA512 d13f79f324c3d76c97b2f5110dfe2de6c6ecd128eeef89dfc461a75a0bea26f433f6520c4c36c7488743faa2d42758539c0fe7f6daf703ab2da14607e046a01f +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 diff --git a/dev-python/sqlglot/sqlglot-26.33.0.ebuild b/dev-python/sqlglot/sqlglot-26.33.0.ebuild new file mode 100644 index 000000000000..aa0c5230423e --- /dev/null +++ b/dev-python/sqlglot/sqlglot-26.33.0.ebuild @@ -0,0 +1,179 @@ +# 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} ) + +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}] + ) +" + +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_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 +}
