unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: Troy Figiel <troy@troyfigiel.com>
To: 68071@debbugs.gnu.org
Subject: [bug#68071] [PATCH] gnu: Add python-ast-decompiler.
Date: Thu, 28 Dec 2023 00:31:42 +0100	[thread overview]
Message-ID: <87r0j7cj3f.fsf@troyfigiel.com> (raw)

* gnu/packages/python-xyz.scm (python-ast-decompiler): New variable.

Change-Id: Id0f47c866e72c9f7053da47fdd7aea840a191e62
---
 gnu/packages/python-xyz.scm | 28 ++++++++++++++++++++++++++++
 1 file changed, 28 insertions(+)

diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index cab44be011..3ad1db7581 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -11021,6 +11021,34 @@ (define-public python-pure-eval
 abstract syntax tree (AST) nodes without side effects.")
     (license license:expat)))
 
+(define-public python-ast-decompiler
+  (package
+    (name "python-ast-decompiler")
+    (version "0.7.0")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (pypi-uri "ast_decompiler" version))
+       (sha256
+        (base32 "0dw3fck4ajilphqw4hdpa8pmqxg3jfk2xkmjnk3kx5pqwl3sbhzg"))
+       ;; We need to manually create an __init__.py file under the tests/
+       ;; directory, since it is not included in the distributed
+       ;; version. (See:
+       ;; https://github.com/JelleZijlstra/ast_decompiler/issues/52).
+       (modules '((guix build utils)))
+       (snippet '(call-with-output-file "tests/__init__.py"
+                   (const #t)))))
+    (build-system pyproject-build-system)
+    (native-inputs (list python-flit-core python-pytest))
+    (home-page "https://github.com/JelleZijlstra/ast_decompiler")
+    (synopsis
+     "Decompile an @acronym{AST, Abstract Syntax Tree} to Python code")
+    (description
+     "This library provides functionality to decompile @acronym{AST, Abstract
+Syntax Tree} objects, as generated by the standard library @code{ast} module,
+to Python code.")
+    (license license:asl2.0)))
+
 (define-public python-asttokens
   (package
     (name "python-asttokens")

base-commit: 5bd80ccd69047b1777749e24d4adf2c951b5d14b
-- 
2.40.1





             reply	other threads:[~2023-12-27 23:39 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-12-27 23:31 Troy Figiel [this message]
2023-12-28  9:25 ` bug#68071: [PATCH] gnu: Add python-ast-decompiler Mathieu Othacehe

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=87r0j7cj3f.fsf@troyfigiel.com \
    --to=troy@troyfigiel.com \
    --cc=68071@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).