mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-08-24 18:58:08 -07:00
dev-python/sqlglot: Bump to 28.0.0
Signed-off-by: Michał Górny <mgorny@gentoo.org>
This commit is contained in:
@@ -3,3 +3,4 @@ DIST sqlglot-26.33.0.tar.gz 5353340 BLAKE2B 18ace866ec89ced24911803497e8cb5c55fc
|
||||
DIST sqlglot-27.24.2-crates.tar.xz 8973180 BLAKE2B f893ebe4b94d4c2ab94f8fa902e51066e861511f698b24660d5becd31a98837c5a7f23a3d80c0716e8017012ae61f7202440c0092e1417e5f61b62e2e9f4260b SHA512 6a92b1ba2fbb51eac170db7a927927f8a06f184ebf820107a813c9cfa4dcdbea794199090a33986b48f5f00b3f43b404b7e1d26f5bf9663c53cb2b8f134d69af
|
||||
DIST sqlglot-27.28.1.tar.gz 5498876 BLAKE2B 7adc2c5fe063f3ba98ad9f37471c2a0d4eed36c4a110cfde2531783dc17118f495d111f0f27eb37f6562c6db7e8b5eb20689d25b71d01edafa51c3bf265ece16 SHA512 e8d2d43622906510dc003c62c074336e19631c679b7c77f7afd527115744a0076c14cf179bf1d3929a15bd8af5e26d125e34cb286274ee047f8b4da19fb0859a
|
||||
DIST sqlglot-27.29.0.tar.gz 5503507 BLAKE2B f9c92b8f287ca4c99c792d005e62846afd669ba27b5d09042de06c8c3fa5e46b21abdf5134cc81ae3ae2cb13d0a5997c56ac07c14e5fb938544d5dbc08c70632 SHA512 5fc7a8a81b39a2dba007b501f1f5c2de9fa1e74b39d44e1bea706491db1ead0329aa2fbfb7c4997a50458137af70d259a227a8662ac26ba2904dde2b66922bb1
|
||||
DIST sqlglot-28.0.0.tar.gz 5520798 BLAKE2B 3dffa572e58380437e03b9cca2a7e0d3bdab70f4543cb7bbec37306143db2ea8abb2dd85771b2833ffd92172b4a962861060e9f8c64c58d53d5d0433bac1817c SHA512 6e39af720b56a5d0ee617d96f5dabc89b0638f04ca9a2d92138e6ca833b73e88016e6d94f19726540bcb55a60290d37a4fcd26f59589f46697a110177d48ae20
|
||||
|
||||
93
dev-python/sqlglot/sqlglot-28.0.0.ebuild
Normal file
93
dev-python/sqlglot/sqlglot-28.0.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