[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug#47459] [PATCH] * gnu/packages/web.scm (brython): New variable.
From: |
jgart |
Subject: |
[bug#47459] [PATCH] * gnu/packages/web.scm (brython): New variable. |
Date: |
Mon, 5 Jul 2021 15:48:14 -0400 |
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
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [bug#47459] [PATCH] * gnu/packages/web.scm (brython): New variable.,
jgart <=