From 780d6b3a905ab5e7e8f98c7e6e5c91d7588ad09d Mon Sep 17 00:00:00 2001 From: Zsolt Dollenstein Date: Thu, 4 Apr 2024 08:14:12 +0100 Subject: [PATCH] packages/libcst: add new recipe & test (#4665) This PR adds a recipe and an associated test for the libcst package. --- docs/project/changelog.md | 2 +- packages/libcst/meta.yaml | 28 ++++++++++++++++++++++++++++ packages/libcst/test_libcst.py | 8 ++++++++ 3 files changed, 37 insertions(+), 1 deletion(-) create mode 100644 packages/libcst/meta.yaml create mode 100644 packages/libcst/test_libcst.py diff --git a/docs/project/changelog.md b/docs/project/changelog.md index a9a4966bb..b606469ad 100644 --- a/docs/project/changelog.md +++ b/docs/project/changelog.md @@ -88,7 +88,7 @@ myst: `pyxirr` {pr}`4513`, `ipython`, `asttokens`, `executing`, `prompt_toolkit`, `pure_eval`, `stack_data`, `traitlets`, `wcwidth` {pr}`4452`, `altair` {pr}`4580`, `cvxpy` {pr}`4587`, `clarabel` {pr}`4587`, `matplotlib-inline` {pr}`4626`, - `pygame-ce` {pr}`4602` + `pygame-ce` {pr}`4602`, `libcst` {pr}`4665` ## Version 0.25.1 diff --git a/packages/libcst/meta.yaml b/packages/libcst/meta.yaml new file mode 100644 index 000000000..46b85771c --- /dev/null +++ b/packages/libcst/meta.yaml @@ -0,0 +1,28 @@ +package: + name: libcst + version: 1.3.1 + top-level: + - libcst +source: + url: https://files.pythonhosted.org/packages/f5/7e/11e25b1fc11bcad6b3f3a90fe515406387fe02e6b1ad36dea00ec125ca98/libcst-1.3.1.tar.gz + sha256: 03b1df1ae02456f1d465fcd5ead1d0d454bb483caefd8c8e6bde515ffdb53d1b +about: + home: "" + PyPI: https://pypi.org/project/libcst + summary: + A concrete syntax tree with AST-like properties for Python 3.0 through + 3.12 programs. + license: + "All contributions towards LibCST are MIT licensed. Some Python files + have been derived from the standard library and are therefore PSF licensed. Modifications + on these files are dual licensed (both MIT and PSF). Some Python files have been + taken from dataclasses and are therefore Apache licensed. Modifications on these + files are licensed under Apache 2.0 license." +extra: + recipe-maintainers: + - zsol +requirements: + run: + - pyyaml + executable: + - rustup diff --git a/packages/libcst/test_libcst.py b/packages/libcst/test_libcst.py new file mode 100644 index 000000000..89342b7ba --- /dev/null +++ b/packages/libcst/test_libcst.py @@ -0,0 +1,8 @@ +from pytest_pyodide import run_in_pyodide + + +@run_in_pyodide(packages=["libcst"]) +def test_libcst(selenium): + import libcst + + libcst.parse_module("def f[T](foo): ...")