about summary refs log tree commit diff
path: root/gn/packages/python.scm
diff options
context:
space:
mode:
Diffstat (limited to 'gn/packages/python.scm')
-rw-r--r--gn/packages/python.scm81
1 files changed, 75 insertions, 6 deletions
diff --git a/gn/packages/python.scm b/gn/packages/python.scm
index e7cfdd7..54d45a4 100644
--- a/gn/packages/python.scm
+++ b/gn/packages/python.scm
@@ -3,11 +3,13 @@
   #:use-module (gnu packages)
   #:use-module (gnu packages check)
   #:use-module (gnu packages compression)
+  #:use-module (gnu packages cran)
   #:use-module (gnu packages databases)
   #:use-module (gnu packages fontutils)
   #:use-module (gnu packages ghostscript)
   #:use-module (gnu packages icu4c)
   #:use-module (gnu packages image)
+  #:use-module (gnu packages jupyter)
   #:use-module (gnu packages libffi)
   #:use-module (gnu packages linux)
   #:use-module (gnu packages maths)
@@ -22,7 +24,9 @@
   #:use-module (gnu packages python-crypto)
   #:use-module (gnu packages python-science)
   #:use-module (gnu packages python-web)
-  #:use-module ((gnu packages python-xyz) #:hide (python2-six))
+  #:use-module (gnu packages jupyter)
+  #:use-module (gnu packages cran)
+  #:use-module (gnu packages python-xyz)
   #:use-module (gnu packages rdf)
   #:use-module (gnu packages readline)
   #:use-module (gnu packages serialization)
@@ -38,7 +42,8 @@
   #:use-module (guix utils)
   #:use-module (guix build-system pyproject)
   #:use-module (guix build-system python)
-  #:use-module (srfi srfi-1))
+  #:use-module (srfi srfi-1)
+  #:use-module (gn packages check))
 
 (define-public python-rpy2-2.9
   (package
@@ -1703,19 +1708,26 @@ window to get to RStudio for example.")
 (define-public python-flask-debugtoolbar
   (package
     (name "python-flask-debugtoolbar")
-    (version "0.11.0")
+    (version "0.16.0")
     (source
      (origin
        (method url-fetch)
-       (uri (pypi-uri "Flask-DebugToolbar" version))
+       (uri (string-append
+	     "https://github.com/pallets-eco/flask-debugtoolbar/archive/refs/tags/"
+	     version
+	     ".tar.gz"))
        (sha256
         (base32
-         "1d5asdnk8bmh6m46pzg3i7677cjgdm9mlm3wcpk19q7dak9pjkiw"))))
-    (build-system python-build-system)
+         "1qk8kga6gjlwc0c0hr1i500rhm1qfa4gqq3djy40j95fiz1idkgy"))))
+    (build-system pyproject-build-system)
+    (native-inputs
+     `(("python-pytest" ,python-pytest)))
     (propagated-inputs
      `(("python-blinker" ,python-blinker)
        ("python-flask" ,python-flask)
+       ("python-flit-core" ,python-flit-core)
        ("python-itsdangerous" ,python-itsdangerous)
+       ("python-flask-sqlalchemy" ,python-flask-sqlalchemy)
        ("python-werkzeug" ,python-werkzeug)))
     (home-page
      "https://flask-debugtoolbar.readthedocs.io/")
@@ -1955,3 +1967,60 @@ and messages in larger desktop or server-based applications.")
 implementation of the built-in float which supports formatted output with
 SI (decimal) and IEC (binary) prefixes.")
     (license license:mpl2.0)))
+
+
+(define-public python-pillow-9
+  (package
+    (name "python-pillow-9")
+    (version "9.2.0")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (pypi-uri "Pillow" version))
+       (sha256
+        (base32 "011wgm1mssjchpva9wsi2a07im9czyjvik137xlp5f0g7vykdrkm"))
+       (modules '((guix build utils)))
+       (snippet '(begin
+                   (delete-file-recursively "src/thirdparty")))
+       (patches (search-patches "python-pillow-CVE-2022-45199.patch"
+                                ;; Included in 10.1.0.
+                                "python-pillow-use-zlib-1.3.patch"))))
+    (build-system python-build-system)
+    (native-inputs (list python-pytest))
+    (inputs (list freetype
+                  lcms
+                  libjpeg-turbo
+                  libtiff
+                  libwebp
+                  openjpeg
+                  zlib))
+    (propagated-inputs (list python-olefile))
+    (arguments
+     `(#:tests? #f
+       #:phases (modify-phases %standard-phases
+                  (add-after 'unpack 'patch-ldconfig
+                    (lambda _
+                      (substitute* "setup.py"
+                        (("\\['/sbin/ldconfig', '-p'\\]")
+                         "['true']"))))
+                  (replace 'check
+                    (lambda* (#:key outputs inputs tests? #:allow-other-keys)
+                      (when tests?
+                        (setenv "HOME"
+                                (getcwd))
+                        (add-installed-pythonpath inputs outputs)
+                        (invoke "python" "selftest.py" "--installed")
+                        (invoke "python" "-m" "pytest" "-vv")))))))
+    (home-page "https://python-pillow.org")
+    (synopsis "Fork of the Python Imaging Library")
+    (description
+     "The Python Imaging Library adds image processing capabilities to your
+Python interpreter.  This library provides extensive file format support, an
+efficient internal representation, and fairly powerful image processing
+capabilities.  The core image library is designed for fast access to data
+stored in a few basic pixel formats.  It should provide a solid foundation for
+a general image processing tool.")
+    (properties `((cpe-name . "pillow")))
+    (license (license:x11-style
+              "http://www.pythonware.com/products/pil/license.htm"
+              "The PIL Software License"))))