commit: d506b5286fd98dfa15c6ba9708227edbeabf0db8 Author: Michał Górny <mgorny <AT> gentoo <DOT> org> AuthorDate: Thu May 29 13:46:58 2025 +0000 Commit: Michał Górny <mgorny <AT> gentoo <DOT> org> CommitDate: Thu May 29 13:46:58 2025 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d506b528
dev-python/sqlglot: Bump to 26.23.0 Signed-off-by: Michał Górny <mgorny <AT> gentoo.org> dev-python/sqlglot/Manifest | 2 + dev-python/sqlglot/sqlglot-26.23.0.ebuild | 178 ++++++++++++++++++++++++++++++ 2 files changed, 180 insertions(+) diff --git a/dev-python/sqlglot/Manifest b/dev-python/sqlglot/Manifest index 0e4c16b942cb..81dd3ac744f6 100644 --- a/dev-python/sqlglot/Manifest +++ b/dev-python/sqlglot/Manifest @@ -1,2 +1,4 @@ DIST sqlglot-26.22.1-crates.tar.xz 8327388 BLAKE2B 69213d11940f9d4e743b169ef831b8b52a771f012e247570cf0703580a14af435d4d033b4b3ddfca6f4022b741261a24f3b47e5137de644d863714006520f857 SHA512 5de0781c54265b369e5e46b7cfbcc04a3118aa8d1323bff14f2841c95d471f545c923eedb88dbbb81a910801c5a505ff37a25701af936c06cf55a1659cd8822e DIST sqlglot-26.22.1.tar.gz 5369216 BLAKE2B a47491d4ef3ec4510f8e7d5247d15c2b168886372b3e997f7a8b13469a74b7bd4b171fc6e1a710f4f61977cdf8cb39ddf1d382675bb077ae79ae28d1d63ce7cc SHA512 db15df6c32b8aee6bb24cf0442f91c25869b067d0360b1fd98836144abe4e777d6e00d6d296eacaaa34f9e05c0b7cda040ec7b31f2d06efa9ca08d1293038f69 +DIST sqlglot-26.23.0-crates.tar.xz 8859792 BLAKE2B abb2051b392c53dc3caa705ddd8df7076819a26dcdaa89fa3760559a79578db01e86943c2d0ffb8006263c2dca3aa50d20023eae9d772f8ebd12a8a2d3266cdd SHA512 7cca439a06433a62bcd4a2af33d240f46e9b5240cc158edbc654efb37a464aa0f1ebbe9749b2fc6352127b4809b63af2341fac6240050c414e578ae99444ba5d +DIST sqlglot-26.23.0.tar.gz 5369411 BLAKE2B 621d8bba91e72b3671aa0d2fa90ac0e4e9d3b6c116be02a423eb779ab8bd67f9edcabeb6e94ddea6856a22373a02e5517053945f7ea2728ef6b56333671e68c0 SHA512 54b378ad94be7c641b537e9917d2b69c3abdbcfff81a28b8a280d5198b35d6157f518289101332abf0643b3ea56670f948b6db598d358b06ac2a6ace38df8acc diff --git a/dev-python/sqlglot/sqlglot-26.23.0.ebuild b/dev-python/sqlglot/sqlglot-26.23.0.ebuild new file mode 100644 index 000000000000..207cbfd84c15 --- /dev/null +++ b/dev-python/sqlglot/sqlglot-26.23.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 +}
