From patchwork Wed Dec 27 23:31:42 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Troy Figiel X-Patchwork-Id: 58120 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 27F7C27BBEA; Wed, 27 Dec 2023 23:39:17 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,SPF_HELO_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 877E727BBE9 for ; Wed, 27 Dec 2023 23:39:16 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rIdUO-0005G9-Cb; Wed, 27 Dec 2023 18:39:04 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rIdUN-0005Fw-ML for guix-patches@gnu.org; Wed, 27 Dec 2023 18:39:03 -0500 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rIdUN-00022q-EN for guix-patches@gnu.org; Wed, 27 Dec 2023 18:39:03 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rIdUL-0003Mq-Sg for guix-patches@gnu.org; Wed, 27 Dec 2023 18:39:01 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#68071] [PATCH] gnu: Add python-ast-decompiler. Resent-From: Troy Figiel Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 27 Dec 2023 23:39:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 68071 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 68071@debbugs.gnu.org X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.170372030312869 (code B ref -1); Wed, 27 Dec 2023 23:39:01 +0000 Received: (at submit) by debbugs.gnu.org; 27 Dec 2023 23:38:23 +0000 Received: from localhost ([127.0.0.1]:38070 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rIdTi-0003LU-M2 for submit@debbugs.gnu.org; Wed, 27 Dec 2023 18:38:22 -0500 Received: from lists.gnu.org ([2001:470:142::17]:35488) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rIdTg-0003LC-4z for submit@debbugs.gnu.org; Wed, 27 Dec 2023 18:38:21 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rIdTb-0004zQ-JN for guix-patches@gnu.org; Wed, 27 Dec 2023 18:38:15 -0500 Received: from mout-p-103.mailbox.org ([80.241.56.161]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_CHACHA20_POLY1305:256) (Exim 4.90_1) (envelope-from ) id 1rIdTQ-0001m5-6H for guix-patches@gnu.org; Wed, 27 Dec 2023 18:38:15 -0500 Received: from smtp1.mailbox.org (smtp1.mailbox.org [IPv6:2001:67c:2050:b231:465::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-p-103.mailbox.org (Postfix) with ESMTPS id 4T0p3W2Xr4z9sWv for ; Thu, 28 Dec 2023 00:37:59 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=troyfigiel.com; s=MBO0001; t=1703720279; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type; bh=FwqZi5DsZ4k0tGqLDQzGomNznnJKDYBrpPj1OMUGRUc=; b=bGZZi1/YL7kx1RgkbzV0v/9gmJzTf7dTEOpd8sCsUvHZxhQiAECK5K/rJIi72/L0qv/iXd aAgawjXxBRLLNtbb4O7MjXmZvQTCeWlCZQM6R+AQoVkjRcB5JAQayM+Z7pJbfPuYw/UdC6 gKHE1jsnGeS/AizmILAxNeA0lQk1KXiKDOQmFjxNQI56RiRusNMfBWxIvqs3ySR5X0MrPO iQI7lwJlW7GrM1xw1vLJ4luf3Y2shLPvvvznqG3KR7U0KxfyOcOlPIqVzPiFx3P5r/Ou8H mohPiC2yqhcDosT/Ea8CBOXZaVZZdGwzl8lQRDcAwY0IdlTnMx+2BAgkP2IPKA== From: Troy Figiel Date: Thu, 28 Dec 2023 00:31:42 +0100 Message-ID: <87r0j7cj3f.fsf@troyfigiel.com> MIME-Version: 1.0 X-Rspamd-Queue-Id: 4T0p3W2Xr4z9sWv Received-SPF: pass client-ip=80.241.56.161; envelope-from=troy@troyfigiel.com; helo=mout-p-103.mailbox.org X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches * gnu/packages/python-xyz.scm (python-ast-decompiler): New variable. Change-Id: Id0f47c866e72c9f7053da47fdd7aea840a191e62 --- gnu/packages/python-xyz.scm | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) base-commit: 5bd80ccd69047b1777749e24d4adf2c951b5d14b 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")