From patchwork Mon Jul 5 19:48:14 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: jgart X-Patchwork-Id: 31183 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 D26A527BC81; Mon, 5 Jul 2021 20:49:11 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI,SPF_HELO_PASS,T_DKIM_INVALID,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.2 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 89FA827BC78 for ; Mon, 5 Jul 2021 20:49:11 +0100 (BST) Received: from localhost ([::1]:57848 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m0Uac-0005nq-Kx for patchwork@mira.cbaines.net; Mon, 05 Jul 2021 15:49:10 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:33826) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m0UaV-0005hg-0K for guix-patches@gnu.org; Mon, 05 Jul 2021 15:49:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:35172) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1m0UaU-0005ph-Pf for guix-patches@gnu.org; Mon, 05 Jul 2021 15:49:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1m0UaU-0004fr-O0 for guix-patches@gnu.org; Mon, 05 Jul 2021 15:49:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#47459] [PATCH] * gnu/packages/web.scm (brython): New variable. References: <6c81552237809c87c157684e550a69a7@dismail.de> In-Reply-To: <6c81552237809c87c157684e550a69a7@dismail.de> Resent-From: jgart Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 05 Jul 2021 19:49:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 47459 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 47459@debbugs.gnu.org Cc: jgart , =?utf-8?q?L=C3=A9o?= Le Bouter , Ryan Prior , Andrea =?utf-8?q?Pierr=C3=A9?= , LibreMiami Received: via spool by 47459-submit@debbugs.gnu.org id=B47459.162551454217953 (code B ref 47459); Mon, 05 Jul 2021 19:49:02 +0000 Received: (at 47459) by debbugs.gnu.org; 5 Jul 2021 19:49:02 +0000 Received: from localhost ([127.0.0.1]:46714 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m0UaN-0004fC-S3 for submit@debbugs.gnu.org; Mon, 05 Jul 2021 15:49:01 -0400 Received: from mx1.dismail.de ([78.46.223.134]:20899) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m0UaM-0004ey-KT for 47459@debbugs.gnu.org; Mon, 05 Jul 2021 15:48:55 -0400 Received: from mx1.dismail.de (localhost [127.0.0.1]) by mx1.dismail.de (OpenSMTPD) with ESMTP id 801516be; Mon, 5 Jul 2021 21:48:47 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed; d=dismail.de; h=from:to:cc :subject:date:message-id:mime-version:content-type :content-transfer-encoding; s=20190914; bh=Hql+tJx1xEsX5cN6uPeB9 bmjcK/cmAfDyHSUE2SIJrc=; b=KVKpzirE7Q5sjziWt4WaZ/kxkc0WxgQlry5PE 2eHLTWGE1GpsacjWgMdzjeziLw51WsOBCCL5q3HV2GlCV9QPtv6383QKUTOSKJqT zJsdcv7wvgpEwYGU9GxSPtgtv4pMzL0ZT5iw9nTQs77VRpDrofYxq1IXW2g4SljH rbBfcCprG97vvEATpw9OFxFmYRuZAuCBXaHk3FDYCf6HYDOC8X3Zf7Mv8umi4Xzr AH6qyaqj21Lj0pBx3wsE+G2xFljfR5Uuwszx92fiMvzMJiN0p1Yn01GnmqZ7efKs Bk5Ne7vVhqOjjg3RYt5kxXo4OafNM3GkFK94ZzT77j1JAl5/g== Received: from smtp1.dismail.de ( [10.240.26.11]) by mx1.dismail.de (OpenSMTPD) with ESMTP id 73e61ff4; Mon, 5 Jul 2021 21:48:46 +0200 (CEST) Received: from smtp1.dismail.de (localhost [127.0.0.1]) by smtp1.dismail.de (OpenSMTPD) with ESMTP id 3747961d; Mon, 5 Jul 2021 21:48:46 +0200 (CEST) Received: by dismail.de (OpenSMTPD) with ESMTPSA id 2905ede2 (TLSv1.3:AEAD-AES256-GCM-SHA384:256:NO); Mon, 5 Jul 2021 21:48:46 +0200 (CEST) Date: Mon, 5 Jul 2021 15:48:14 -0400 Message-Id: <20210705194813.19624-1-jgart@dismail.de> X-Mailer: git-send-email 2.31.1 MIME-Version: 1.0 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" Reply-to: jgart X-ACL-Warn: , jgart via Guix-patches X-Patchwork-Original-From: jgart via Guix-patches via From: jgart X-getmail-retrieved-from-mailbox: Patches From: LibreMiami Co-authored-by: Andrea Pierré Co-authored-by: jgart Co-authored-by: Léo Le Bouter Co-authored-by: Ryan Prior --- gnu/packages/python-web.scm | 48 +++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) diff --git a/gnu/packages/python-web.scm b/gnu/packages/python-web.scm index e4d1326fb8..9b692c2ade 100644 --- a/gnu/packages/python-web.scm +++ b/gnu/packages/python-web.scm @@ -329,6 +329,54 @@ communicate with each other, and positioned as an asynchronous successor to WSGI. This package includes libraries for implementing ASGI servers.") (license license:bsd-3))) +(define-public brython + (package + (name "brython") + (version "3.9.5") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/brython-dev/brython") + (commit version))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "0ikxhvgy1zdg8zrdx2bajp1v7r9dhk6v9jan20i05ahvm9s8gfd6")))) + (build-system python-build-system) + (native-inputs + `(("python" ,python))) + (arguments + `(#:tests? #f ; tests require npm packages + #:phases + (modify-phases %standard-phases + (replace 'build + (lambda* (#:key outputs #:allow-other-keys) + ;; Write access is required for minifying javascript files. + (for-each make-file-writable + (find-files "." "\\.js$")) + + ;; Patch build scripts to reference source directory properly. + (substitute* (find-files "scripts" "\\.py$") + (("os\\.path\\.dirname\\(os\\.getcwd\\(\\)\\)") + (string-append "\"" (getcwd) "\""))) + + (invoke "python3" "scripts/make_dist.py") + #t)) + (replace 'install + (lambda args + ;; setup.py is within 'setup' subdirectory + (with-directory-excursion "setup" + (invoke "python3" "setup.py" "sdist") + (apply (assoc-ref %standard-phases 'install) args)) + #t))))) + (home-page "http://brython.info") + (synopsis "Run python code in a web browser") + (description +"@code{Brython} is a compliant implementation of Python 3 that allows +writing end-user applications in Python that run in the browser.") + (license license:bsd-3))) + (define-public python-css-html-js-minify (package (name "python-css-html-js-minify")