From: jgart via Guix-patches via <guix-patches@gnu.org>
To: 47459@debbugs.gnu.org
Cc: lle-bout@zaclys.net, rprior@protonmail.com, a.pierre@zaclys.net
Subject: [bug#47459] [PATCH] gnu: Add brython.
Date: Mon, 29 Mar 2021 04:23:07 +0000 [thread overview]
Message-ID: <6c81552237809c87c157684e550a69a7@dismail.de> (raw)
[-- Attachment #1: Type: text/plain, Size: 141 bytes --]
Hi Guix!
Here is brython. Thank you!
This was an effort of today's Guix Packaging Meetup.
best regards,
jgart
libremiami.org
[-- Attachment #2: 0002-gnu-Add-brython.patch --]
[-- Type: application/octet-stream, Size: 3288 bytes --]
From 519c8d5e5369744cadbe4bc7607b0c4c8f05128a Mon Sep 17 00:00:00 2001
From: LibreMiami <packaging-guix@libremiami.org>
Date: Sun, 28 Mar 2021 21:13:31 -0400
Subject: [PATCH 2/2] gnu: Add brython.
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
* gnu/packages/web.scm (brython): New variable.
Co-authored-by: Léo Le Bouter <lle-bout@zaclys.net>
Co-authored-by: jgart <jgart@dismail.de>
Co-authored-by: Ryan Prior <rprior@protonmail.com>
Co-authored-by: Andrea Pierré <a.pierre@zaclys.net>
---
gnu/packages/web.scm | 58 ++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 58 insertions(+)
diff --git a/gnu/packages/web.scm b/gnu/packages/web.scm
index ae41588037..2271592aec 100644
--- a/gnu/packages/web.scm
+++ b/gnu/packages/web.scm
@@ -8155,3 +8155,61 @@ provided by a TLS reverse proxy (e.g. tlstunnel, hitch or stunnel).")
;; "cpe:2.3:a:comelz:quark" package. The proper fix is for (guix cve)
;; to account for "vendor names".
(properties '((lint-hidden-cve . ("CVE-2019-15520")))))))
+
+(define-public brython
+ (package
+ (name "brython")
+ (version "3.9.1")
+ (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
+ "1rv9az92kl3y079ck0jfdp21p184qgyhqdiil3hk2fd2c5r3s8n2"))))
+ (build-system python-build-system)
+ (native-inputs
+ `(; 'install phase needs the python command
+ ("python" ,((package-input-rewriting
+ `((,python . ,python-3.9))
+ #:deep? #f) python-wrapper))))
+ (arguments
+ `(#:python ,python-3.9 ; required during build
+ #:tests? #f ; tests require npm packages
+ #:phases
+ (modify-phases %standard-phases
+ (replace 'build
+ (lambda* (#:key outputs #:allow-other-keys)
+ ;; write access is required to .js files for minifying
+ (for-each
+ (lambda (vv) (chmod vv #o644))
+ (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
+ ;; release tag contains an older python egg version
+ (substitute* (find-files "setup" "\\.py$")
+ (("3\\.9\\.0") "3.9.1"))
+
+ ;; 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)))
--
2.31.1
next reply other threads:[~2021-03-29 4:24 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-03-29 4:23 jgart via Guix-patches via [this message]
2021-04-01 12:26 ` [bug#47459] [PATCH] gnu: Add brython Ludovic Courtès
2021-07-05 19:48 ` [bug#47459] [PATCH] * gnu/packages/web.scm (brython): New variable jgart via Guix-patches via
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=6c81552237809c87c157684e550a69a7@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=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).