commit:     8470da68ef806962528da4276d4de4af427c230a
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Sat Jun 14 04:20:08 2025 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Sat Jun 14 04:20:08 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8470da68

dev-python/libcst: Bump to 1.8.2

Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>

 dev-python/libcst/Manifest            |   1 +
 dev-python/libcst/libcst-1.8.2.ebuild | 189 ++++++++++++++++++++++++++++++++++
 2 files changed, 190 insertions(+)

diff --git a/dev-python/libcst/Manifest b/dev-python/libcst/Manifest
index 82cf10fbc375..24505dc579ea 100644
--- a/dev-python/libcst/Manifest
+++ b/dev-python/libcst/Manifest
@@ -46,6 +46,7 @@ DIST lazy_static-1.4.0.crate 10443 BLAKE2B 
25b2e61bbac48f0dcbc79c81d7bf01f2403d8
 DIST libc-0.2.149.crate 715592 BLAKE2B 
21dd5d4f9351f3c75790077c7b025046db665f2d48d7a72cda7667bc60febf79d82708cf7d39a323a594397cd590bd3d2a2f85349b4473b90ea4da918382ed0a
 SHA512 
0def64d400d473d6eed30e985522d36801ee6472b15f90e74dc4592e0a8ffbaf30b731be280de52b30255cf60aeca8efe817b67049227dc7000c807e007d7289
 DIST libcst-1.7.0.tar.gz 776707 BLAKE2B 
c5499ce8de4ed41f71b43a577b6a92d3c197512e4c600728f4267ec456f45ca7184aada15c314b372b82f2cf1b70e0aa6e76e949383afa1e09166adda1bbecbf
 SHA512 
edd10d2883c99d58e026aff5e5929deb8cf6d2e3422d702c0b492f0ea369e2701243321b9fbe7d7217eb2f457ac09c15e2577c2cc5446dee10dfee09d558efde
 DIST libcst-1.8.1.tar.gz 779211 BLAKE2B 
fd202f0a4e2691924e167c7bb385c56fc29a4d82e3b8adc879509e5220d4c9df4df00813311044c419240cad7bb507e5022e756cc83a27a991b082609122b3eb
 SHA512 
7c6314db0df34ba180953236c3770e7a98c897889f881b851b907dd5b8a59eca78c07d1cd97987df9ac0f446461dd46c8c0e52a5c66b86e280588a4eb6d1ab80
+DIST libcst-1.8.2.tar.gz 881534 BLAKE2B 
e68e0af99c3db0e1280529bce2dacccea5c01a5d19635d195c13c128c8f485d8e4ac621de34f51a25daaa342aee58c5d0af238affb674a30465deabceda654ed
 SHA512 
dd501de64e13dcb6cbfa4ebe8c89513cf8b2d27fa97d34b02553c1462c3052bc65253cf55a1bce1124e87108bdc834f7e7f5bc1180217a678304efa1130e2a3e
 DIST linux-raw-sys-0.4.10.crate 1407767 BLAKE2B 
8bc633d99bc1ee1a6fdfa19501fd034a4475fa9ebe18a206e4254309d91aee7a91fc70faf9775efa5157a1b2fb7e5f827bde40a770b066643356113f2cf38b5d
 SHA512 
107f61add087bff55869798d5c71bc6ac9ecb27a603d8f9071b856189de8b7b0a7f9243fa1433700f52a0c3020eff5604dbf6e0653109d0dd277b98ab45fae21
 DIST log-0.4.17.crate 38028 BLAKE2B 
b46be3719fc0a53e50b1f342762e188587e9f1ceb692c72473ce2663edfb8253742d30024e68c1444780ab7fc0e2d5b0601b8ea7228dc3405a9342a57548e605
 SHA512 
2477d88db42b1d92c30708d88823212e236f613b3465e85eb425f83f8d16fadfaf0352f06c2999a1852102edd2f6ffb10ecb539d8a3b6c48f552a25622ccffa2
 DIST memchr-2.7.4.crate 96670 BLAKE2B 
da38114beca670467c3e1fbf4e415af6f22d52e3223715d52e181babb89b872b46511563985bcc16d7ff4e82f812c6e83ad904b0fe2501b14445119dfa8240e6
 SHA512 
8d0e8b9c30208897d4b1b920f1bdcccd0c2b75d92a06abe4a1b2407938768abb6487d63de56c6a80419798fe69517210643dfaf11f5f5540185f0eccf220adb2

diff --git a/dev-python/libcst/libcst-1.8.2.ebuild 
b/dev-python/libcst/libcst-1.8.2.ebuild
new file mode 100644
index 000000000000..739137ff89f5
--- /dev/null
+++ b/dev-python/libcst/libcst-1.8.2.ebuild
@@ -0,0 +1,189 @@
+# Copyright 2024-2025 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+DISTUTILS_EXT=1
+DISTUTILS_USE_PEP517=setuptools
+PYTHON_COMPAT=( pypy3_11 python3_{11..13} )
+
+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]
+       [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]
+"
+
+inherit cargo distutils-r1 pypi
+
+DESCRIPTION="A concrete syntax tree with AST-like properties for Python"
+HOMEPAGE="
+       https://github.com/Instagram/LibCST/
+       https://pypi.org/project/libcst/
+"
+SRC_URI+="
+       ${CARGO_CRATE_URIS}
+"
+
+LICENSE="MIT Apache-2.0 PSF-2"
+# Dependent crate licenses
+LICENSE+=" Apache-2.0 Apache-2.0-with-LLVM-exceptions MIT Unicode-3.0"
+SLOT="0"
+KEYWORDS="~amd64 ~riscv"
+
+RDEPEND="
+       >=dev-python/pyyaml-5.2[${PYTHON_USEDEP}]
+"
+BDEPEND="
+       dev-python/setuptools-rust[${PYTHON_USEDEP}]
+       dev-python/setuptools-scm[${PYTHON_USEDEP}]
+       test? (
+               dev-python/black[${PYTHON_USEDEP}]
+       )
+"
+
+EPYTEST_XDIST=1
+distutils_enable_tests pytest
+
+QA_FLAGS_IGNORED="usr/lib/py.*/site-packages/libcst/native.*"
+
+src_prepare() {
+       distutils-r1_src_prepare
+
+       # do not require the freethreading fork for regular 3.13
+       sed -i -e '/pyyaml-ft/d' pyproject.toml || die
+}
+
+python_test() {
+       local EPYTEST_DESELECT=(
+               # TODO
+               
libcst/codemod/tests/test_codemod_cli.py::TestCodemodCLI::test_codemod_formatter_error_input
+       )
+       local EPYTEST_IGNORE=(
+               # fuzzing, require hypothesmith
+               libcst/tests/test_fuzz.py
+               # require pyre-check
+               libcst/metadata/tests/test_type_inference_provider.py
+               # requires `python -m libcst.codegen.generate` which has extra
+               # deps and needs patching to work in our venv
+               # TODO: figure out if we don't need that for revdeps anyway
+               libcst/codegen/tests/test_codegen_clean.py
+       )
+
+       case ${EPYTHON} in
+               pypy3*)
+                       EPYTEST_DESELECT+=(
+                               # 
https://github.com/Instagram/LibCST/issues/1278
+                               
libcst/codemod/commands/tests/test_rename_typing_generic_aliases.py::TestRenameCommand::test_rename_typing_generic_alias
+                       )
+                       ;;
+       esac
+
+       local -x PYTEST_DISABLE_PLUGIN_AUTOLOAD=1
+       cd "${BUILD_DIR}/install$(python_get_sitedir)" || die
+       # fixtures
+       ln -s "${S}/native" . || die
+
+       nonfatal epytest
+       local ret=${?}
+
+       rm native || die
+
+       [[ ${ret} -ne 0 ]] && die "Tests failed on ${EPYTHON}"
+}
+
+python_test_all() {
+       cd native || die
+       cargo_src_test
+}

Reply via email to