From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 4052C158041 for ; Tue, 20 Feb 2024 06:13:39 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id C972B2BC01A; Tue, 20 Feb 2024 06:13:37 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 982F12BC01A for ; Tue, 20 Feb 2024 06:13:37 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id DE74434318C for ; Tue, 20 Feb 2024 06:13:36 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 27A9914D6 for ; Tue, 20 Feb 2024 06:13:34 +0000 (UTC) From: "Michał Górny" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Michał Górny" Message-ID: <1708409607.2ff6ff1bd299f6661885e2fd58b1f5dfd0a237be.mgorny@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: dev-python/sqlglot/ X-VCS-Repository: repo/gentoo X-VCS-Files: dev-python/sqlglot/Manifest dev-python/sqlglot/sqlglot-21.1.2.ebuild X-VCS-Directories: dev-python/sqlglot/ X-VCS-Committer: mgorny X-VCS-Committer-Name: Michał Górny X-VCS-Revision: 2ff6ff1bd299f6661885e2fd58b1f5dfd0a237be X-VCS-Branch: master Date: Tue, 20 Feb 2024 06:13:34 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 75345299-4ff3-4ff1-bf07-28ce7455fca8 X-Archives-Hash: 859dc5e9b984f73566b58584409a2c0b commit: 2ff6ff1bd299f6661885e2fd58b1f5dfd0a237be Author: Michał Górny gentoo org> AuthorDate: Tue Feb 20 05:58:08 2024 +0000 Commit: Michał Górny gentoo org> CommitDate: Tue Feb 20 06:13:27 2024 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2ff6ff1b dev-python/sqlglot: Bump to 21.1.2 Signed-off-by: Michał Górny gentoo.org> dev-python/sqlglot/Manifest | 1 + dev-python/sqlglot/sqlglot-21.1.2.ebuild | 121 +++++++++++++++++++++++++++++++ 2 files changed, 122 insertions(+) diff --git a/dev-python/sqlglot/Manifest b/dev-python/sqlglot/Manifest index 30c4266f5bc8..3dbdf3bec6f3 100644 --- a/dev-python/sqlglot/Manifest +++ b/dev-python/sqlglot/Manifest @@ -29,6 +29,7 @@ DIST sqlglot-21.0.1.tar.gz 9494272 BLAKE2B de522ca78eeeb84b849a70ff8fed63a1841c9 DIST sqlglot-21.0.2.tar.gz 9504238 BLAKE2B 3b3f268ca46bcb0596454bab95abf6b5d61a018944eab1a45d3dec276058bfac30767a57aa687596956ac9c3f17d861b7368e0a2409df0b49b20cb0c6ff80f09 SHA512 7d8d43827de9a537c9f07e28895c42d003b8e4afbc40e5405dc01717f329a2c57b7bb2e7d079b32b83b5cc532488e35fb6297f14c9ff5d90f7a40c565e32654f DIST sqlglot-21.1.0.tar.gz 9507449 BLAKE2B afe9db7f50e3367a9ce91b6acf82004ffd6b3c661485b876873ad52656629c88e092cd82c4cd6adbda1a4747b0988f7bfcd21f4db9fcca6a3b152d0870f17b28 SHA512 395c84a2cc5af7f19d649fd422782483fbfaa06716bc8352cbef6a393d3f029c4f11076097eccbfc0918cc6bff2c6a7c43227546c2a3ce4af2e79eb7287107f0 DIST sqlglot-21.1.1.tar.gz 9524438 BLAKE2B eeb815879c968bb2cafcbd2cb44466c654f9aa25cf071b6c77586c756d8ff8514ef28d39c8ca47c015034e79958646efcd18d744a3852cd19331fcafe9b17aeb SHA512 ff9c58351cd3cdd7b8cd62b6bd4b5a1822867db2465a0cd40e444c061c640de8c4cad83ec36abc7a5e57a77ee9428532f7420923c59a3a3fa2ad522fe5d6f257 +DIST sqlglot-21.1.2.tar.gz 17531031 BLAKE2B 24fa7a13ae5cd1260cea297fdaf0276bbbaba50627d5e6a471e23ca832cf1cbb9f0e687eb29708579ad6887262a92ee5b54f85fe361d30dc2d04a40222487e68 SHA512 f61d7732fb577aa16f928652fc5633b1e4fcb98e6f061d5d24054b5693087be2fbca525e4af4541614ece992d13066c367abe05e1fede8daba936617fb66866c DIST syn-2.0.41.crate 246016 BLAKE2B 9d389f2e2a0acb4c84c309456e8ffcc88c5d4d541535ed136832d7a6054dde45a598bb68e8a6f3062ca2a96e1ceae947d54b3aec9bad65b0c51d6733aa6c80db SHA512 6bbaf69ca783025dfb81ac3612ac60bfbed31b2d87792909b35c12892dadebdaff2ddf9463105e536b671dce5870610ab90fe29471284bbd3014dca8d6993f1a DIST target-lexicon-0.12.12.crate 25156 BLAKE2B f3803596c75f6c89438592a1176c3748fc2c0524d7d50a20056de1cd26d40c572b05bafcdf6dd702752864bea37c8b4f28f96dadc12a5b3bb1d279b25e489f85 SHA512 6147295c43ba1b7b087a3c5ab51534b2985e4e77e5e15687978cfb9d07e21c4fd9bc7191576d6cabd268d08a44dc733c4a957e59dba8b948c2055d8bb433aeca DIST unicode-ident-1.0.12.crate 42168 BLAKE2B 4cede03c08758ccd6bf53a0d0057d7542dfdd0c93d342e89f3b90460be85518a9fd24958d8b1da2b5a09b5ddbee8a4263982194158e171c2bba3e394d88d6dac SHA512 bc1824e1e4452a40732fc69874d7e1a66f7803717a314790dcf48867eba34bc9441331ef031e386912e52c385645c25b6ed39d4f149973b5b97371b1b96b1920 diff --git a/dev-python/sqlglot/sqlglot-21.1.2.ebuild b/dev-python/sqlglot/sqlglot-21.1.2.ebuild new file mode 100644 index 000000000000..058fa81df816 --- /dev/null +++ b/dev-python/sqlglot/sqlglot-21.1.2.ebuild @@ -0,0 +1,121 @@ +# Copyright 2023-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +DISTUTILS_EXT=1 +DISTUTILS_USE_PEP517=setuptools +PYTHON_COMPAT=( python3_{10..12} ) + +CARGO_OPTIONAL=1 +CRATES=" + autocfg@1.1.0 + bitflags@1.3.2 + cfg-if@1.0.0 + heck@0.4.1 + indoc@2.0.4 + libc@0.2.150 + lock_api@0.4.11 + memoffset@0.9.0 + once_cell@1.19.0 + parking_lot@0.12.1 + parking_lot_core@0.9.9 + proc-macro2@1.0.70 + pyo3-build-config@0.20.0 + pyo3-ffi@0.20.0 + pyo3-macros-backend@0.20.0 + pyo3-macros@0.20.0 + pyo3@0.20.0 + quote@1.0.33 + redox_syscall@0.4.1 + scopeguard@1.2.0 + smallvec@1.11.2 + syn@2.0.41 + target-lexicon@0.12.12 + unicode-ident@1.0.12 + unindent@0.2.3 + windows-targets@0.48.5 + windows_aarch64_gnullvm@0.48.5 + windows_aarch64_msvc@0.48.5 + windows_i686_gnu@0.48.5 + windows_i686_msvc@0.48.5 + windows_x86_64_gnu@0.48.5 + windows_x86_64_gnullvm@0.48.5 + windows_x86_64_msvc@0.48.5 +" + +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? ( + ${CARGO_CRATE_URIS} + ) +" + +LICENSE="MIT" +LICENSE+=" native-extensions? (" +# Dependent crate licenses +LICENSE+=" 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}] + ) +" + +distutils_enable_tests pytest + +QA_FLAGS_IGNORED="usr/lib.*/py.*/site-packages/sqlglotrs/sqlglotrs.*.so" + +src_unpack() { + cargo_src_unpack +} + +src_prepare() { + # remove fragile timing check + sed -i -e '/assertLessEqual(time\.time/d' tests/test_parser.py || die + distutils-r1_src_prepare +} + +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 +}