unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: jgart via Guix-patches via <guix-patches@gnu.org>
To: 47459@debbugs.gnu.org
Cc: jgart <jgart@dismail.de>, "Léo Le Bouter" <lle-bout@zaclys.net>,
	"Ryan Prior" <rprior@protonmail.com>,
	"Andrea Pierré" <a.pierre@zaclys.net>,
	LibreMiami <packaging-guix@libremiami.org>
Subject: [bug#47459] [PATCH] * gnu/packages/web.scm (brython): New variable.
Date: Mon,  5 Jul 2021 15:48:14 -0400	[thread overview]
Message-ID: <20210705194813.19624-1-jgart@dismail.de> (raw)
In-Reply-To: <6c81552237809c87c157684e550a69a7@dismail.de>

From: LibreMiami <packaging-guix@libremiami.org>

Co-authored-by: Andrea Pierré <a.pierre@zaclys.net>
Co-authored-by: jgart <jgart@dismail.de>
Co-authored-by: Léo Le Bouter <lle-bout@zaclys.net>
Co-authored-by: Ryan Prior <rprior@protonmail.com>
---
 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")
-- 
2.31.1





  parent reply	other threads:[~2021-07-05 19:49 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-29  4:23 [bug#47459] [PATCH] gnu: Add brython jgart via Guix-patches via
2021-04-01 12:26 ` Ludovic Courtès
2021-07-05 19:48 ` jgart via Guix-patches via [this message]
2021-07-05 22:29 ` [bug#47459] brython bump to 3.9.5 and fixes for core-updates branch jgart via Guix-patches via
2022-06-22 19:23   ` [bug#47459] [PATCH] gnu: Add brython Maxim Cournoyer
2022-09-28 18:24     ` bug#47459: " Maxim Cournoyer
2022-09-28 20:36       ` [bug#47459] " Ricardo Wurmus
2022-09-28 20:41         ` Ricardo Wurmus
2022-09-29  1:28           ` Maxim Cournoyer
2022-09-28 20:38       ` jgart via Guix-patches via

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=20210705194813.19624-1-jgart@dismail.de \
    --to=guix-patches@gnu.org \
    --cc=47459@debbugs.gnu.org \
    --cc=a.pierre@zaclys.net \
    --cc=jgart@dismail.de \
    --cc=lle-bout@zaclys.net \
    --cc=packaging-guix@libremiami.org \
    --cc=rprior@protonmail.com \
    /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).