[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
08/21: gnu: Add python-libcst.
From: |
guix-commits |
Subject: |
08/21: gnu: Add python-libcst. |
Date: |
Wed, 29 Jul 2020 18:58:52 -0400 (EDT) |
mbakke pushed a commit to branch master
in repository guix.
commit 2f60db668a8e22b7c535b67e3f6f06c270cd2a69
Author: Tanguy Le Carrour <tanguy@bioneland.org>
AuthorDate: Mon Jul 27 10:00:46 2020 +0200
gnu: Add python-libcst.
* gnu/packages/python-xyz.scm (python-libcst): New variable.
Signed-off-by: Marius Bakke <marius@gnu.org>
---
gnu/packages/python-xyz.scm | 57 +++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 57 insertions(+)
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 4f78f69..5429982 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -12341,6 +12341,63 @@ in Python. It allows you to declare the libraries
your project depends on and
it will manage (install/update) them for you.")
(license license:expat)))
+(define-public python-libcst
+ (package
+ (name "python-libcst")
+ (version "0.3.8")
+ (source (origin
+ (method url-fetch)
+ (uri (pypi-uri "libcst" version))
+ (sha256
+ (base32
+ "05zsc61gsd2pyb6wiyh58zczndxi6rm4d2jl94rpf5cv1fzw6ks8"))))
+ (build-system python-build-system)
+ (arguments
+ `(#:phases
+ (modify-phases %standard-phases
+ (add-after 'unpack 'remove-failing-tests
+ (lambda _
+ ;; Reported upstream:
<https://github.com/Instagram/LibCST/issues/346>.
+ (delete-file "libcst/tests/test_fuzz.py")
+ ;; Reported upstream:
<https://github.com/Instagram/LibCST/issues/347>.
+ (delete-file "libcst/tests/test_pyre_integration.py")
+ (delete-file "libcst/codemod/tests/test_codemod_cli.py")
+ (delete-file "libcst/metadata/tests/test_full_repo_manager.py")
+ (delete-file
"libcst/metadata/tests/test_type_inference_provider.py")
+ #t))
+ (add-before 'check 'generate-test-data
+ (lambda _
+ (setenv "PYTHONPATH" (string-append (getcwd) ":" (getenv
"PYTHONPATH")))
+ (invoke "python" "-m" "libcst.codegen.generate" "visitors")
+ (invoke "python" "-m" "libcst.codegen.generate" "return_types")))
+ (replace 'check
+ (lambda _
+ (invoke "python" "-m" "unittest")
+ #t)))))
+ (native-inputs
+ `(("python-black" ,python-black)
+ ("python-isort" ,python-isort)))
+ (propagated-inputs
+ `(("python-typing-extensions" ,python-typing-extensions)
+ ("python-typing-inspect" ,python-typing-inspect)
+ ("python-pyyaml" ,python-pyyaml)))
+ (home-page "https://github.com/Instagram/LibCST")
+ (synopsis "Concrete Syntax Tree (CST) parser and serializer library for
Python")
+ (description
+ "LibCST parses Python source code as a CST tree that keeps all
+formatting details (comments, whitespaces, parentheses, etc). It's useful
+for building automated refactoring (codemod) applications and linters.
+LibCST creates a compromise between an Abstract Syntax Tree (AST) and
+a traditional Concrete Syntax Tree (CST). By carefully reorganizing and
+naming node types and fields, LibCST creates a lossless CST that looks and
+feels like an AST.")
+ (license (list license:expat
+ ;; Some files unde libcst/_parser/ are under Python Software
+ ;; Foundation license (see LICENSE file for details)
+ license:psfl
+ ;; libcst/_add_slots.py
+ license:asl2.0))))
+
(define-public python-typing-inspect
(package
(name "python-typing-inspect")
- branch master updated (4146cf8 -> d343e0f), guix-commits, 2020/07/29
- 02/21: gnu: ungoogled-chromium: Update to 84.0.4147.105-0.cc3e311., guix-commits, 2020/07/29
- 03/21: gnu: clang: Only install cfi_blacklist.txt for versions >= 3.8., guix-commits, 2020/07/29
- 08/21: gnu: Add python-libcst.,
guix-commits <=
- 01/21: gnu: json-modern-cxx: Update to 3.9.0., guix-commits, 2020/07/29
- 04/21: gnu: Add nfs4-acl-tools., guix-commits, 2020/07/29
- 05/21: gnu: Add python-mypy-extensions., guix-commits, 2020/07/29
- 06/21: gnu: Add python-typing-inspect., guix-commits, 2020/07/29
- 07/21: gnu: Add python-hypothesis-5.23., guix-commits, 2020/07/29
- 09/21: gnu: Add python-lark-parser., guix-commits, 2020/07/29
- 10/21: gnu: Add python-hypothesmith., guix-commits, 2020/07/29
- 14/21: gnu: python-slugify: Update to 4.0.1., guix-commits, 2020/07/29
- 13/21: gnu: Add python-mypy., guix-commits, 2020/07/29
- 15/21: gnu: csvkit: Fix problem caused by the update of python-slugify., guix-commits, 2020/07/29