mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-08-24 18:58:08 -07:00
dev-python/sqlglot: Bump to 27.26.0
Signed-off-by: Michał Górny <mgorny@gentoo.org>
This commit is contained in:
@@ -4,3 +4,4 @@ DIST sqlglot-27.21.0.tar.gz 5484119 BLAKE2B 901a182c7cd226876cbd248500076044b9ba
|
||||
DIST sqlglot-27.24.2-crates.tar.xz 8973180 BLAKE2B f893ebe4b94d4c2ab94f8fa902e51066e861511f698b24660d5becd31a98837c5a7f23a3d80c0716e8017012ae61f7202440c0092e1417e5f61b62e2e9f4260b SHA512 6a92b1ba2fbb51eac170db7a927927f8a06f184ebf820107a813c9cfa4dcdbea794199090a33986b48f5f00b3f43b404b7e1d26f5bf9663c53cb2b8f134d69af
|
||||
DIST sqlglot-27.24.2.tar.gz 5489180 BLAKE2B c41246a29ed2dddf4f5063625ebb55ee2663468321d02ba73b8c17bd3dec6c0407e09cad198e4bb2d02d7fbc0efa3d04583c37bcb9988ce9af25d874522ee8bf SHA512 045f181addf3e5f272991c6a475897878d491967e24ad849a08f690c5b93db817b213245dee99d725bdc309acc55207e8d5f388d51a65d111c253e5c6993f82c
|
||||
DIST sqlglot-27.25.2.tar.gz 5489830 BLAKE2B 9bb24fd75f6cdf6141acfa0cee45f926ce2691fa68159ac7dfe15dd4f2f469f421b997e19c507e694c0a56e607a3535be4d59a4d250fe9b73483aa135ba00c40 SHA512 6bc31c853221b9eba1632fbc280c27b8568e90c24a44ec8bab7e53e1afa90e1f807cb0eca28b2e0d37cdc414c737b93e7f4fc8b9884b10a7088554bf7c320564
|
||||
DIST sqlglot-27.26.0.tar.gz 5490283 BLAKE2B 6492b62b6bef8f1b6c1a756896800429996b873a8b58264224e26c00e6c4fb4ff2f99dd595acb6021320c0fa6fc7838d9ca6a29966ce602797c100ab1cb64ed8 SHA512 2c76505c4c4a61d0f8f3ad294f8b3627bb63458c233d807db2ac89d7b12522b3e1caadef361eef4acc99507c9035a00e873aff9bdf1748b28b5fec3d0d4e8747
|
||||
|
||||
93
dev-python/sqlglot/sqlglot-27.26.0.ebuild
Normal file
93
dev-python/sqlglot/sqlglot-27.26.0.ebuild
Normal file
@@ -0,0 +1,93 @@
|
||||
# Copyright 2023-2025 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
CRATES="
|
||||
"
|
||||
|
||||
CARGO_OPTIONAL=1
|
||||
DISTUTILS_EXT=1
|
||||
DISTUTILS_USE_PEP517=setuptools
|
||||
PYTHON_COMPAT=( python3_{11..14} )
|
||||
CRATE_PV=27.24.2
|
||||
|
||||
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
|
||||
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
|
||||
}
|
||||
Reference in New Issue
Block a user