gnu: Replace uses of 'libjpeg' with 'libjpeg-turbo'.
[jackhill/guix/guix.git] / gnu / packages / python-xyz.scm
index 6bb2a5a..4dfe6ee 100644 (file)
@@ -68,6 +68,7 @@
 ;;; Copyright © 2019 Wiktor Żelazny <wzelazny@vurv.cz>
 ;;; Copyright © 2019 Tanguy Le Carrour <tanguy@bioneland.org>
 ;;; Copyright © 2019 Mădălin Ionel Patrașcu <madalinionel.patrascu@mdc-berlin.de>
+;;; Copyright © 2020 Riku Viitanen <riku.viitanen@protonmail.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
   #:use-module (gnu packages icu4c)
   #:use-module (gnu packages image)
   #:use-module (gnu packages imagemagick)
+  #:use-module (gnu packages kerberos)
   #:use-module (gnu packages libevent)
   #:use-module (gnu packages libffi)
   #:use-module (gnu packages linux)
@@ -439,7 +441,7 @@ Expressions are constructed from parsed strings or directly in Python.")
    (propagated-inputs `(("numpy" ,python-numpy)))
    (inputs
     `(("hdf4" ,hdf4)
-      ("libjpeg" ,libjpeg)
+      ("libjpeg" ,libjpeg-turbo)
       ("zlib" ,zlib)))
    (arguments
     `(#:phases
@@ -2583,6 +2585,30 @@ important tasks for becoming a daemon process:
     ;; Only setup.py is gpl3+, everything else is apache 2.0 licensed.
     (license (list license:asl2.0 license:gpl3+))))
 
+(define-public python-anytree
+  (package
+    (name "python-anytree")
+    (version "2.8.0")
+    (source (origin
+              (method url-fetch)
+              (uri (pypi-uri "anytree" version))
+              (sha256
+               (base32
+                "1aycpc387wqz7h9w2p53qxn43qsh3m6by6ak4kkc66x9aprr63rz"))))
+    (build-system python-build-system)
+    (propagated-inputs
+     `(("python-six" ,python-six)))
+    (native-inputs
+     `(;; For tests.
+       ("graphviz" ,graphviz)           ;for 'dot'
+       ("python-nose" ,python-nose)))
+    (home-page "https://github.com/c0fec0de/anytree")
+    (synopsis "Lightweight tree data library")
+    (description
+     "@code{anytree} is a simple, lightweight, and extensible tree data
+structure for Python.")
+    (license license:asl2.0)))
+
 (define-public python-docutils
   (package
     (name "python-docutils")
@@ -2613,14 +2639,14 @@ reStructuredText.")
 (define-public python-pygments
   (package
     (name "python-pygments")
-    (version "2.4.2")
+    (version "2.5.2")
     (source
      (origin
        (method url-fetch)
        (uri (pypi-uri "Pygments" version))
        (sha256
         (base32
-         "15v2sqm5g12bqa0c7wikfh9ck2nl97ayizy1hpqhmws5gqalq748"))))
+         "1zmhnswy0wxfn0xprs9aqsvx2c3kmzfn2wx14q8cv3vpkxdamj4q"))))
     (build-system python-build-system)
     (arguments
      ;; FIXME: Tests require sphinx, which depends on this.
@@ -3052,14 +3078,14 @@ Server (PLS).")
 (define-public python-language-server
   (package
     (name "python-language-server")
-    (version "0.31.4")
+    (version "0.31.6")
     (source
      (origin
        (method url-fetch)
        (uri (pypi-uri "python-language-server" version))
        (sha256
         (base32
-         "1nrs56jpx7dvghaas0kc5k9lxas5vr3awj3k87p4akki43nsblb8"))))
+         "0cqrffd5272p2hifa35rf1h1g6dss741jmjkwa43jninifmbz0df"))))
     (build-system python-build-system)
     (propagated-inputs
      `(("python-pluggy" ,python-pluggy)
@@ -4434,7 +4460,7 @@ the OleFileIO module from PIL, the Python Image Library.")
     (inputs
      `(("freetype" ,freetype)
        ("lcms"     ,lcms)
-       ("libjpeg"  ,libjpeg)
+       ("libjpeg"  ,libjpeg-turbo)
        ("libtiff"  ,libtiff)
        ("libwebp"  ,libwebp)
        ("openjpeg" ,openjpeg)
@@ -6802,13 +6828,13 @@ add functionality and customization to your projects with their own plugins.")
 (define-public python-fonttools
   (package
     (name "python-fonttools")
-    (version "3.38.0")
+    (version "4.2.2")
     (source (origin
               (method url-fetch)
               (uri (pypi-uri "fonttools" version ".zip"))
               (sha256
                (base32
-                "12ripk3s7skgxr1bs9r8n13r94ym3s8iir7ivfixls9fa4dabmlh"))))
+                "012qqspnwdl4vy8qgzzpfglkk5dgzxiw0fak2jq74ngygvz3vfv6"))))
     (build-system python-build-system)
     (native-inputs
      `(("unzip" ,unzip)
@@ -6824,8 +6850,18 @@ also contains a tool called “TTX” which converts TrueType/OpenType fonts to
 from an XML-based format.")
     (license license:expat)))
 
+;; Fonttools 4.x dropped support for Python 2, so stick with 3.x here.
 (define-public python2-fonttools
-  (package-with-python2 python-fonttools))
+  (let ((base (package-with-python2 (strip-python2-variant python-fonttools))))
+    (package/inherit
+     base
+     (version "3.44.0")
+     (source (origin
+               (method url-fetch)
+               (uri (pypi-uri "fonttools" version ".zip"))
+               (sha256
+                (base32
+                 "0v6399g755f2hn1ry62i5b6gdinf2fpx2966v3bxh6bjw1accb5p")))))))
 
 (define-public python-ly
   (package
@@ -9985,14 +10021,14 @@ are synchronized with data exchanges on \"channels\".")
 (define-public python-objgraph
   (package
     (name "python-objgraph")
-    (version "3.4.0")
+    (version "3.4.1")
     (source
      (origin
        (method url-fetch)
        (uri (pypi-uri "objgraph" version))
        (sha256
         (base32
-         "184m09am5gpbqfaiy7l0hwh476mczbrly1dffs0rw2p1d1i2q32a"))))
+         "19qmqsh984zq1rzzjy4vqnmviaqnymcyl8h7z99pnicbgwnm2adz"))))
     (build-system python-build-system)
     (propagated-inputs
      `(("python-graphviz" ,python-graphviz)))
@@ -10006,6 +10042,9 @@ are synchronized with data exchanges on \"channels\".")
 graphviz.")
     (license license:expat)))
 
+(define-public python2-objgraph
+  (package-with-python2 python-objgraph))
+
 (define-public python-gevent
   (package
     (name "python-gevent")
@@ -13055,6 +13094,8 @@ several utilities, as well as an API for building localization tools.")
       (origin
         (method url-fetch)
         (uri (pypi-uri "packaging" version))
+        ;; XXX: The URL in the patch file is wrong, it should be
+        ;; <https://github.com/pypa/packaging/pull/256>.
         (patches (search-patches "python-packaging-test-arch.patch"))
         (sha256
          (base32
@@ -17114,3 +17155,174 @@ memoization.")
     (description "This package is a parser for Coffeescript Object
 Notation (CSON).")
     (license license:expat)))
+
+(define-public python-asynctest
+  (package
+    (name "python-asynctest")
+    (version "0.13.0")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (pypi-uri "asynctest" version))
+       (sha256
+        (base32
+         "1b3zsy7p84gag6q8ai2ylyrhx213qdk2h2zb6im3xn0m5n264y62"))))
+    (build-system python-build-system)
+    (arguments
+     '(#:phases
+       (modify-phases %standard-phases
+         (replace 'check
+           (lambda _
+             (invoke "python" "-X" "dev" "-m" "unittest" "-v" "test")))
+         (add-after 'unpack 'disable-tests
+           (lambda* _
+             (substitute* "test/test_selector.py"
+               ;; XXX: This test fails for unknown reason inside the build
+               ;; environment.
+               (("def test_events_watched_outside_test_are_ignored")
+                "@unittest.skip('disabled by guix')
+    def test_events_watched_outside_test_are_ignored")))))))
+    (home-page "https://github.com/Martiusweb/asynctest")
+    (synopsis "Extension of unittest for testing asyncio libraries")
+    (description
+     "The package asynctest is built on top of the standard unittest module
+and cuts down boilerplate code when testing libraries for asyncio.")
+    (license license:asl2.0)))
+
+(define-public python-aionotify
+  (package
+    (name "python-aionotify")
+    (version "0.2.0")
+    (source
+     (origin
+       ;; Source tarball on PyPi lacks tests
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/rbarrois/aionotify")
+             (commit (string-append "v" version))))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32 "1sk9i8czxgsbrswsf1nlb4c82vgnlzi8zrvrxdip92w2z8hqh43y"))))
+    (build-system python-build-system)
+    (native-inputs `(("python-asynctest" ,python-asynctest)))
+    (home-page "https://github.com/rbarrois/aionotify")
+    (synopsis "Asyncio-powered inotify library")
+    (description
+     "@code{aionotify} is a simple, asyncio-based inotify library.")
+    (license license:bsd-3)))
+
+(define-public python-forbiddenfruit
+  (package
+    (name "python-forbiddenfruit")
+    (version "0.1.3")
+    (source
+     (origin
+       ;; Source tarball on PyPi lacks Makefile that builds and runs tests
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/clarete/forbiddenfruit")
+             (commit version)))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32 "1fp2xvdqpi910j9r3q68x38phpxbm700gjdi2m2j5gs91xdnyyh2"))))
+    (build-system python-build-system)
+    (arguments
+     '(#:phases
+       (modify-phases %standard-phases
+         (replace 'check
+           (lambda _
+             (invoke "make" "SKIP_DEPS=1"))))))
+    (native-inputs
+     `(("python-nose" ,python-nose)
+       ("python-coverage" ,python-coverage)))
+    (home-page "https://github.com/clarete/forbiddenfruit")
+    (synopsis "Patch python built-in objects")
+    (description "This project allows Python code to extend built-in types.")
+    (license (list license:gpl3+ license:expat))))
+
+(define-public python-shouldbe
+  (package
+    (name "python-shouldbe")
+    (version "0.1.2")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (pypi-uri "shouldbe" version))
+       (sha256
+        (base32
+         "16zbvjxf71dl4yfbgcr6idyim3mdrfvix1dv8b95p0s9z07372pj"))))
+    (build-system python-build-system)
+    (propagated-inputs
+      `(("python-forbiddenfruit" ,python-forbiddenfruit)))
+    (native-inputs
+     `(("python-nose" ,python-nose)))
+    (home-page "https://github.com/directxman12/should_be")
+    (synopsis "Python Assertion Helpers inspired by Shouldly")
+    (description
+     "Python Assertion Helpers inspired by Shouldly.")
+    (license license:isc)))
+
+(define-public python-k5test
+  (package
+    (name "python-k5test")
+    (version "0.9.2")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (pypi-uri "k5test" version))
+       (sha256
+        (base32
+         "1lqp3jgfngyhaxjgj3n230hn90wsylwilh120yjf62h7b1s02mh8"))))
+    (build-system python-build-system)
+    (propagated-inputs
+     `(("python-six" ,python-six)
+       ;; `which`, `kadmin.local` binaries called inside library
+       ("which" ,which)
+       ("mit-krb5" ,mit-krb5)))
+    (native-inputs `(("mit-krb5" ,mit-krb5)))
+    (arguments
+     '(#:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'patch-paths
+           (lambda* _
+             (substitute* "k5test/realm.py"
+               (("'kadmin_local'") "'kadmin.local'")))))))
+    (home-page "https://github.com/pythongssapi/k5test")
+    (synopsis "Library for setting up self-contained Kerberos 5 environments")
+    (description
+     "@code{k5test} is a library for setting up self-contained Kerberos 5
+environments, and running Python unit tests inside those environments.  It is
+based on the file of the same name found alongside the MIT Kerberos 5 unit
+tests.")
+    (license license:isc)))
+
+(define-public python-gssapi
+  (package
+    (name "python-gssapi")
+    (version "1.6.1")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (pypi-uri "gssapi" version))
+       (sha256
+        (base32
+         "1gymg4asvwrz7y13qpwp2s5g8qwq179d72gkj09q6bfcgs82l5wr"))))
+    (build-system python-build-system)
+    (propagated-inputs
+     `(("python-decorator" ,python-decorator)
+       ("python-six" ,python-six)))
+    (inputs
+     `(("mit-krb5" ,mit-krb5)))
+    ;; for tests
+    (native-inputs
+     `(("python-shouldbe" ,python-shouldbe)
+       ("python-parameterized" ,python-parameterized)
+       ("python-k5test" ,python-k5test)
+       ("python-nose" ,python-nose)))
+    (home-page "https://github.com/pythongssapi/python-gssapi")
+    (synopsis "Python GSSAPI Wrapper")
+    (description
+     "Python-GSSAPI provides both low-level and high level wrappers around the
+GSSAPI C libraries.  While it focuses on the Kerberos mechanism, it should
+also be useable with other GSSAPI mechanisms.")
+    (license license:isc)))