unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: Tanguy Le Carrour <tanguy@bioneland.org>
To: 42465@debbugs.gnu.org
Cc: Tanguy Le Carrour <tanguy@bioneland.org>
Subject: [bug#42465] [PATCH 05/10] gnu: Add python-libcst.
Date: Tue, 21 Jul 2020 13:56:28 +0200	[thread overview]
Message-ID: <20200721115633.6088-5-tanguy@bioneland.org> (raw)
In-Reply-To: <20200721115633.6088-1-tanguy@bioneland.org>

* gnu/packages/python-xyz.scm (python-libcst): New variable.
---
 gnu/packages/python-xyz.scm | 55 +++++++++++++++++++++++++++++++++++++
 1 file changed, 55 insertions(+)

diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 2293a16ecc..6b462a42f0 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -12274,6 +12274,61 @@ 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.7")
+    (source (origin
+              (method url-fetch)
+              (uri (pypi-uri "libcst" version))
+              (sha256
+               (base32
+                "1wfd5m9jhk5x2qpz29pjhm9ypp5h3nlbk6xv4vzn4f45xdf5bv9x"))))
+    (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))
+         (replace 'check
+           (lambda _
+             (setenv "PYTHONPATH" (string-append (getcwd) ":" (getenv "PYTHONPATH")))
+             (invoke "python" "-m" "libcst.codegen.generate" "visitors")
+             (invoke "python" "-m" "libcst.codegen.generate" "return_types")
+             (invoke "python" "-m" "unittest")
+             #t)))))
+    (native-inputs
+     `(("python-black" ,python-black)
+       ("python-hypothesis" ,python-hypothesis)
+       ("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 "A Concrete Syntax Tree (CST) parser and serializer library for Python")
+    (description
+     "LibCST parses Python 3.0, 3.1, 3.3, 3.5, 3.6, 3.7 or 3.8 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, we've created
+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")
-- 
2.27.0





  parent reply	other threads:[~2020-07-21 11:58 UTC|newest]

Thread overview: 43+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-21 11:55 [bug#42465] [PATCH 00/10] gnu: Add python-mypy Tanguy Le Carrour
2020-07-21 11:56 ` [bug#42465] [PATCH 01/10] gnu: python-typing-extension: Update to 3.7.4.2 Tanguy Le Carrour
2020-07-21 11:56   ` [bug#42465] [PATCH 02/10] gnu: python-hypothesis: Update to 5.20.0 Tanguy Le Carrour
2020-07-25 15:52     ` Marius Bakke
2020-07-21 11:56   ` [bug#42465] [PATCH 03/10] gnu: Add python-mypy-extensions Tanguy Le Carrour
2020-07-25 15:55     ` Marius Bakke
2020-07-21 11:56   ` [bug#42465] [PATCH 04/10] gnu: Add python-typing-inspect Tanguy Le Carrour
2020-07-25 15:58     ` Marius Bakke
2020-07-21 11:56   ` Tanguy Le Carrour [this message]
2020-07-25 16:03     ` [bug#42465] [PATCH 05/10] gnu: Add python-libcst Marius Bakke
2020-07-21 11:56   ` [bug#42465] [PATCH 06/10] gnu: Add python-lark-parser Tanguy Le Carrour
2020-07-25 16:05     ` Marius Bakke
2020-07-21 11:56   ` [bug#42465] [PATCH 07/10] gnu: Add python-hypothesmith Tanguy Le Carrour
2020-07-25 16:09     ` Marius Bakke
2020-07-21 11:56   ` [bug#42465] [PATCH 08/10] gnu: Add python-flake8-bugbear Tanguy Le Carrour
2020-07-25 16:13     ` Marius Bakke
2020-07-21 11:56   ` [bug#42465] [PATCH 09/10] gnu: Add python-flake8-pyi Tanguy Le Carrour
2020-07-25 16:15     ` Marius Bakke
2020-07-21 11:56   ` [bug#42465] [PATCH 10/10] gnu: Add python-mypy Tanguy Le Carrour
2020-07-25 16:18     ` Marius Bakke
2020-07-27  7:57       ` Tanguy Le Carrour
2020-07-29 22:20         ` bug#42465: " Marius Bakke
2020-07-30  6:36           ` [bug#42465] " Tanguy Le Carrour
2020-07-25 15:47   ` [bug#42465] [PATCH 01/10] gnu: python-typing-extension: Update to 3.7.4.2 Marius Bakke
2020-07-22 12:09 ` [bug#42465] [PATCH v2 " Tanguy Le Carrour
2020-07-22 12:09   ` [bug#42465] [PATCH v2 02/10] gnu: python-hypothesis: Update to 5.20.0 Tanguy Le Carrour
2020-07-22 12:09   ` [bug#42465] [PATCH v2 03/10] gnu: Add python-mypy-extensions Tanguy Le Carrour
2020-07-22 12:09   ` [bug#42465] [PATCH v2 04/10] gnu: Add python-typing-inspect Tanguy Le Carrour
2020-07-22 12:09   ` [bug#42465] [PATCH v2 05/10] gnu: Add python-libcst Tanguy Le Carrour
2020-07-22 12:09   ` [bug#42465] [PATCH v2 06/10] gnu: Add python-lark-parser Tanguy Le Carrour
2020-07-22 12:09   ` [bug#42465] [PATCH v2 07/10] gnu: Add python-hypothesmith Tanguy Le Carrour
2020-07-22 12:09   ` [bug#42465] [PATCH v2 08/10] gnu: Add python-flake8-bugbear Tanguy Le Carrour
2020-07-22 12:09   ` [bug#42465] [PATCH v2 09/10] gnu: Add python-flake8-pyi Tanguy Le Carrour
2020-07-22 12:09   ` [bug#42465] [PATCH v2 10/10] gnu: Add python-mypy Tanguy Le Carrour
2020-07-27  8:00 ` [bug#42465] [PATCH v3 1/9] gnu: Add python-mypy-extensions Tanguy Le Carrour
2020-07-27  8:00   ` [bug#42465] [PATCH v3 2/9] gnu: Add python-typing-inspect Tanguy Le Carrour
2020-07-27  8:00   ` [bug#42465] [PATCH v3 3/9] gnu: Add python-hypothesis-5.23 Tanguy Le Carrour
2020-07-27  8:00   ` [bug#42465] [PATCH v3 4/9] gnu: Add python-libcst Tanguy Le Carrour
2020-07-27  8:00   ` [bug#42465] [PATCH v3 5/9] gnu: Add python-lark-parser Tanguy Le Carrour
2020-07-27  8:00   ` [bug#42465] [PATCH v3 6/9] gnu: Add python-hypothesmith Tanguy Le Carrour
2020-07-27  8:00   ` [bug#42465] [PATCH v3 7/9] gnu: Add python-flake8-bugbear Tanguy Le Carrour
2020-07-27  8:00   ` [bug#42465] [PATCH v3 8/9] gnu: Add python-flake8-pyi Tanguy Le Carrour
2020-07-27  8:00   ` [bug#42465] [PATCH v3 9/9] gnu: Add python-mypy Tanguy Le Carrour

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200721115633.6088-5-tanguy@bioneland.org \
    --to=tanguy@bioneland.org \
    --cc=42465@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).