diff options
| author | Michał Górny <mgorny@gentoo.org> | 2025-04-25 06:34:25 +0200 |
|---|---|---|
| committer | Michał Górny <mgorny@gentoo.org> | 2025-04-25 06:34:25 +0200 |
| commit | 94d671eea3c9cf6c67e1be64657428dcff7eee9f (patch) | |
| tree | 14c3607de73fc3608ac4033acd1899c71396235f /dev-python | |
| parent | 706329c8bcc089e595af43422d78addbdcc61875 (diff) | |
| download | gentoo-94d671eea3c9cf6c67e1be64657428dcff7eee9f.tar.gz gentoo-94d671eea3c9cf6c67e1be64657428dcff7eee9f.tar.bz2 gentoo-94d671eea3c9cf6c67e1be64657428dcff7eee9f.zip | |
dev-python/sqlglot: Bump to 26.16.2
Signed-off-by: Michał Górny <mgorny@gentoo.org>
Diffstat (limited to 'dev-python')
| -rw-r--r-- | dev-python/sqlglot/Manifest | 2 | ||||
| -rw-r--r-- | dev-python/sqlglot/sqlglot-26.16.2.ebuild | 96 |
2 files changed, 98 insertions, 0 deletions
diff --git a/dev-python/sqlglot/Manifest b/dev-python/sqlglot/Manifest index 1ba5675de8b5..062aa4370abe 100644 --- a/dev-python/sqlglot/Manifest +++ b/dev-python/sqlglot/Manifest @@ -2,3 +2,5 @@ DIST sqlglot-26.15.0-crates.tar.xz 8327388 BLAKE2B 69213d11940f9d4e743b169ef831b DIST sqlglot-26.15.0.tar.gz 5350274 BLAKE2B d4fb9262af3facd04896f94a21f927f8a91edd1e67563a043ca338012b76abd2e4b60899032f5718b503accc829d95d786a2605eba49bf15709844edfd3e358b SHA512 0b7eb7a8c2bec05873837c16420c577a50affe8ca2f028f863b6bb50e3f9be18e5873c33de122940e04dab2e8e46329090cade371ef9e2f60535ad23e25b43f0 DIST sqlglot-26.16.0-crates.tar.xz 8327388 BLAKE2B 69213d11940f9d4e743b169ef831b8b52a771f012e247570cf0703580a14af435d4d033b4b3ddfca6f4022b741261a24f3b47e5137de644d863714006520f857 SHA512 5de0781c54265b369e5e46b7cfbcc04a3118aa8d1323bff14f2841c95d471f545c923eedb88dbbb81a910801c5a505ff37a25701af936c06cf55a1659cd8822e DIST sqlglot-26.16.0.tar.gz 5351655 BLAKE2B 0618ff41709126854edfc74b55622d7dd1a61d619e10e7566b5a49b6a407b4a85b766b64b3604fa6507a66902a94746bc6735848b2d1fa018e0907d6e6f21079 SHA512 a7299d1c654521624f5d3e2962a597d21e7891b93eff762351fd664301388d69daff489ac5f8a626bfb6e4aadae1400513b1900b9d377f767ad4c6b8de3e52e7 +DIST sqlglot-26.16.2-crates.tar.xz 8327388 BLAKE2B 69213d11940f9d4e743b169ef831b8b52a771f012e247570cf0703580a14af435d4d033b4b3ddfca6f4022b741261a24f3b47e5137de644d863714006520f857 SHA512 5de0781c54265b369e5e46b7cfbcc04a3118aa8d1323bff14f2841c95d471f545c923eedb88dbbb81a910801c5a505ff37a25701af936c06cf55a1659cd8822e +DIST sqlglot-26.16.2.tar.gz 5352987 BLAKE2B 91328fa56cf64a560b13fd1bc18fa47c2667f2359e2081358a9e4e15b1c0bc8a46e022e78e4739dbddb4424a539f64bd6f14c018a4129e7b067e096cd2c044ad SHA512 7936addbe73a03fe8d770c9103aef181f5dfcbd33f2dbd7a60e004e2a01e429f5d217b261d7a7d379658acff2749af764046b3e18f3034b05c36b32b0150c45a diff --git a/dev-python/sqlglot/sqlglot-26.16.2.ebuild b/dev-python/sqlglot/sqlglot-26.16.2.ebuild new file mode 100644 index 000000000000..dfb5ad04a049 --- /dev/null +++ b/dev-python/sqlglot/sqlglot-26.16.2.ebuild @@ -0,0 +1,96 @@ +# Copyright 2023-2025 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +CRATES="" +DISTUTILS_EXT=1 +DISTUTILS_USE_PEP517=setuptools +PYTHON_COMPAT=( python3_{10..13} ) + +CARGO_OPTIONAL=1 + +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 +} |
