diff options
Diffstat (limited to 'gnu/packages/python-xyz.scm')
-rw-r--r-- | gnu/packages/python-xyz.scm | 532 |
1 files changed, 468 insertions, 64 deletions
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm index 5a4220541e..3fbb7b3366 100644 --- a/gnu/packages/python-xyz.scm +++ b/gnu/packages/python-xyz.scm @@ -88,7 +88,7 @@ ;;; Copyright © 2020 Malte Frank Gerdes <malte.f.gerdes@gmail.com> ;;; Copyright © 2020 Joseph LaFreniere <joseph@lafreniere.xyz> ;;; Copyright © 2020 Tim Gesthuizen <tim.gesthuizen@yahoo.de> -;;; Copyright © 2020 Bonface Munyoki Kilyungi <bonfacemunyoki@gmail.com> +;;; Copyright © 2020, 2021 Bonface Munyoki Kilyungi <me@bonfacemunyoki.com> ;;; Copyright © 2020 Ekaitz Zarraga <ekaitz@elenq.tech> ;;; Copyright © 2020 Diego N. Barbato <dnbarbato@posteo.de> ;;; Copyright © 2020 Leo Prikler <leo.prikler@student.tugraz.at> @@ -5936,13 +5936,13 @@ the OleFileIO module from PIL, the Python Image Library.") (define-public python-pikepdf (package (name "python-pikepdf") - (version "2.10.0") + (version "2.11.4") (source (origin (method url-fetch) (uri (pypi-uri "pikepdf" version)) (sha256 - (base32 "09wfj1hjvj3r9gv7ywrqd7h3d0bz64bvils8sm3ghj90jhalb03s")))) + (base32 "0kd5ydnsmlikkg69r255wvq4vy7plh7dx077s2saly5s5vdcqlkk")))) (build-system python-build-system) (arguments `(#:tests? #false)) ;require python-xmp-toolkit @@ -6082,17 +6082,99 @@ a general image processing tool.") (description "This package is a fork of Pillow which adds support for SIMD parallelism."))) +(define-public python-imagecodecs + (package + (name "python-imagecodecs") + (version "2021.3.31") + (source + (origin + (method url-fetch) + (uri (pypi-uri "imagecodecs" version)) + (sha256 + (base32 + "0q7pslb6wd56vbcq2mdxwsiha32mxjr7mgqqfbq5w42q601p9pi0")) + (modules '((guix build utils))) + (snippet + '(begin + ;; Unbundle 3rd party modules. + (delete-file-recursively "3rdparty") + ;; Delete pre-generated Cython files. + (for-each delete-file (find-files "imagecodecs" "_.*\\.c$")) + #t)))) + (build-system python-build-system) + (arguments + `(#:tests? #f ; Tests are disabled, because dependencies are missing. + #:phases + (modify-phases %standard-phases + (add-after 'unpack 'create-configuration + (lambda* (#:key inputs #:allow-other-keys) + ;; By default everything is enabled. We can selectively disable + ;; extensions (and thus dependencies) by deleting them from the + ;; EXTENSIONS dictionary. This is upstream’s preferred way. + (call-with-output-file "imagecodecs_distributor_setup.py" + (lambda (port) + (format port "\ +def customize_build(EXTENSIONS, OPTIONS): + del EXTENSIONS['aec'] + del EXTENSIONS['avif'] + del EXTENSIONS['bitshuffle'] + del EXTENSIONS['deflate'] + del EXTENSIONS['jpeg2k'] + del EXTENSIONS['jpeg12'] + del EXTENSIONS['jpegls'] + del EXTENSIONS['jpegxl'] + del EXTENSIONS['jpegxr'] + del EXTENSIONS['lerc'] + del EXTENSIONS['ljpeg'] + del EXTENSIONS['lzf'] + del EXTENSIONS['zfp'] + del EXTENSIONS['zopfli'] + OPTIONS['cythonize'] +"))) + #t))))) + (inputs + `(("c-blosc" ,c-blosc) + ("giflib" ,giflib) + ("google-brotli" ,google-brotli) + ("libjpeg-turbo" ,libjpeg-turbo) + ("libpng" ,libpng) + ("libtiff" ,libtiff) + ("libwebp" ,libwebp) + ("lz4" ,lz4) + ("snappy" ,snappy) + ("xz" ,xz) + ("zlib" ,zlib) + ("zstd" ,zstd "lib"))) + (propagated-inputs + `(("python-numpy" ,python-numpy))) + (native-inputs + ;; For building. + `(("python-cython" ,python-cython) + ;; For testing. Incomplete. + ;("python-numcodecs" ,python-numcodecs) + ;("python-zarr" ,python-zarr) + ;("python-pytest" ,python-pytest) + )) + (home-page "https://www.lfd.uci.edu/~gohlke/") + (synopsis + "Image transformation, compression, and decompression codecs") + (description + "Imagecodecs is a Python library that provides block-oriented, in-memory +buffer transformation, compression, and decompression functions for use in the +tifffile, czifile, and other scientific image input/output modules.") + (license license:bsd-3))) + (define-public python-roifile (package (name "python-roifile") - (version "2020.5.28") + (version "2020.11.28") (source (origin (method url-fetch) (uri (pypi-uri "roifile" version)) (sha256 (base32 - "1vwbwfsw745gyqymff6dllc5zqjsgqmxaw245sw4an6yw9rcbzc0")))) + "04argnc7qccybkrj9ww18bf81ghsghhh93hnqy3p111rcdlyn66p")))) (build-system python-build-system) (arguments `(#:tests? #f)) ; there are none (propagated-inputs @@ -6107,21 +6189,20 @@ regions of interest, geometric shapes, paths, text, etc for image overlays.") (define-public python-tifffile (package (name "python-tifffile") - (version "2020.6.3") + (version "2021.4.8") (source (origin (method url-fetch) (uri (pypi-uri "tifffile" version)) (sha256 (base32 - "0xv3ynkbrsibqvx7250075idb7wm3canjd6lx2nzf3cbp6l07577")))) + "16r0hw7shka1bqf28bv198lj2jhf2r9gy3s5zv4nf5cfsfm8pajm")))) (build-system python-build-system) ;; Tests require lfdfiles, which depends on tifffile (arguments `(#:tests? #f)) (propagated-inputs `(("python-numpy" ,python-numpy) - ;;("python-lfdfiles" ,python-lfdfiles) - ("python-roifile" ,python-roifile))) + ("python-imagecodecs" ,python-imagecodecs))) (home-page "https://www.lfd.uci.edu/~gohlke/") (synopsis "Read and write TIFF(r) files") (description "This package lets you read image and metadata from many @@ -6133,19 +6214,28 @@ numpy arrays to TIFF, BigTIFF, and ImageJ hyperstack compatible files.") (define-public python-lfdfiles (package (name "python-lfdfiles") - (version "2020.1.1") + (version "2021.2.22") (source (origin (method url-fetch) (uri (pypi-uri "lfdfiles" version)) (sha256 (base32 - "1n9bkfn4vxl0lbhzd0m35lq86ayx5fwcj3ghpfl2vbjbsnfp3h47")))) + "12fxm4v805dgjrih7x6jnl1wd7y7jw1rkhjs3d4am8s6qk1cbar2")) + (modules '((guix build utils))) + (snippet + '(begin + ;; Delete pre-generated Cython files. + (for-each delete-file (find-files "lfdfiles" "_.*\\.c$")) + #t)))) (build-system python-build-system) + (arguments + `(#:tests? #f)) ; No tests exist, despite a test dependency on pytest. (propagated-inputs `(("python-click" ,python-click) ("python-numpy" ,python-numpy) ("python-tifffile" ,python-tifffile))) + (native-inputs `(("python-cython" ,python-cython))) (home-page "https://www.lfd.uci.edu/~gohlke/") (synopsis "Work with LFD data files") (description @@ -6241,7 +6331,7 @@ a front-end for C compilers or analysis tools.") (define-public python-xlsxwriter (package (name "python-xlsxwriter") - (version "1.3.7") + (version "1.3.9") (source (origin ;; There are no tests in the PyPI tarball. @@ -6251,7 +6341,7 @@ a front-end for C compilers or analysis tools.") (commit (string-append "RELEASE_" version)))) (file-name (git-file-name name version)) (sha256 - (base32 "1qg40r2mwrqfmhaxnary1cfgi0dwwazp5qga7c9p2cdji2v0x5rm")))) + (base32 "04idf331rp0iyhlnh7268jmim8ydw4jjb81hr5rh548sqnq4bhpl")))) (build-system python-build-system) (home-page "https://github.com/jmcnamara/XlsxWriter") (synopsis "Python module for creating Excel XLSX files") @@ -7259,7 +7349,8 @@ cluster down and deletes the throwaway profile.") (replace 'check (lambda _ (invoke "pytest" "-vv" "traitlets")))))) (propagated-inputs `(("python-ipython-genutils" ,python-ipython-genutils) - ("python-decorator" ,python-decorator))) + ("python-decorator" ,python-decorator) + ("python-six" ,python-six))) (native-inputs `(("python-pytest" ,python-pytest))) (properties `((python2-variant . ,(delay python2-traitlets)))) @@ -7293,10 +7384,41 @@ without using the configuration machinery.") (base32 "1d12j5hkff0xiax87pnhmzbsph3jqqzhz16h8xld7z2y4armq0kr")))) (build-system python-build-system) - ;; FIXME: not sure how to run the tests - (arguments `(#:tests? #f)) + (arguments + `(#:phases + (modify-phases %standard-phases + (replace 'check + (lambda* (#:key inputs outputs tests? #:allow-other-keys) + (when tests? + ; Some tests write to $HOME. + (setenv "HOME" "/tmp") + ; Some tests load the installed package. + (add-installed-pythonpath inputs outputs) + (invoke "pytest" "-vv")))) + (add-after 'unpack 'patch-testsuite + (lambda _ + ;; test_not_on_path() and test_path_priority() try to run a test + ;; that loads jupyter_core, so we need PYTHONPATH + (substitute* "jupyter_core/tests/test_command.py" + (("env = \\{'PATH': ''\\}") + "env = {'PATH': '', 'PYTHONPATH': os.environ['PYTHONPATH']}") + (("env = \\{'PATH': str\\(b\\)\\}") + "env = {'PATH': str(b), 'PYTHONPATH': os.environ['PYTHONPATH']}")) + #t))))) (propagated-inputs `(("python-traitlets" ,python-traitlets))) + (native-inputs + `(("python-six" ,python-six) + ("python-pytest" ,python-pytest))) + ;; This package provides the `jupyter` binary and thus also exports the + ;; search paths. + (native-search-paths + (list (search-path-specification + (variable "JUPYTER_CONFIG_DIR") + (files '("etc/jupyter"))) + (search-path-specification + (variable "JUPYTER_PATH") + (files '("share/jupyter"))))) (home-page "https://jupyter.org/") (synopsis "Jupyter base package") (description @@ -7315,19 +7437,22 @@ without using the configuration machinery.") (base32 "10p7fcgvv9hvz9zical9wk68ks5ssak2ykbzx65wm1k1hk8a3g64")))) (build-system python-build-system) - ;; Tests fail because of missing native python kernel which I assume is - ;; provided by the ipython package, which we cannot use because it would - ;; cause a dependency cycle. (arguments - `(#:tests? #f - #:phases (modify-phases %standard-phases - (add-after 'unpack 'set-tool-file-names - (lambda* (#:key inputs #:allow-other-keys) - (let ((iproute (assoc-ref inputs "iproute"))) - (substitute* "jupyter_client/localinterfaces.py" - (("'ip'") - (string-append "'" iproute "/sbin/ip'"))) - #t)))))) + `(#:phases + (modify-phases %standard-phases + (add-after 'unpack 'set-tool-file-names + (lambda* (#:key inputs #:allow-other-keys) + (let ((iproute (assoc-ref inputs "iproute"))) + (substitute* "jupyter_client/localinterfaces.py" + (("'ip'") + (string-append "'" iproute "/sbin/ip'"))) + #t))) + (replace 'check + (lambda* (#:key tests? #:allow-other-keys) + (when tests? + ;; Some tests try to write to $HOME. + (setenv "HOME" "/tmp") + (invoke "pytest" "-vv"))))))) (inputs `(("iproute" ,iproute))) (propagated-inputs @@ -7337,7 +7462,14 @@ without using the configuration machinery.") ("python-tornado" ,python-tornado-6) ("python-traitlets" ,python-traitlets))) (native-inputs - `(("python-pytest" ,python-pytest))) + `(("python-pytest" ,python-pytest) + ("python-pytest-asyncio" ,python-pytest-asyncio) + ("python-pytest-timeout" ,python-pytest-timeout) + ("python-async-generator" ,python-async-generator) + ("python-mock" ,python-mock) + ("python-msgpack" ,python-msgpack) + ("python-ipython" ,python-ipython) + ("python-ipykernel" ,python-ipykernel-bootstrap))) (home-page "https://jupyter.org/") (synopsis "Jupyter protocol implementation and client libraries") (description @@ -7347,6 +7479,20 @@ for working with kernels, and the @code{jupyter kernelspec} entrypoint for installing @code{kernelspec}s for use with Jupyter frontends.") (license license:bsd-3))) +;; Bootstrap variant of jupyter-client, which breaks the loop between ipykernel +;; and jupyter-client by removing the former from its native-inputs and +;; disabling tests. +(define-public python-jupyter-client-bootstrap + (let ((base python-jupyter-client)) + (hidden-package + (package + (inherit base) + (name "python-jupyter-client-bootstrap") + (arguments + `(#:tests? #f + ,@(package-arguments base))) + (native-inputs `()))))) + (define-public python2-jupyter-client (package-with-python2 python-jupyter-client)) @@ -7381,6 +7527,8 @@ installing @code{kernelspec}s for use with Jupyter frontends.") #t)))))) (propagated-inputs `(("python-ipython" ,python-ipython) + ("python-tornado" ,python-tornado-6) + ("python-traitlets" ,python-traitlets) ;; imported at runtime during connect ("python-jupyter-client" ,python-jupyter-client))) (native-inputs @@ -7393,6 +7541,19 @@ installing @code{kernelspec}s for use with Jupyter frontends.") "This package provides the IPython kernel for Jupyter.") (license license:bsd-3))) +;; Bootstrap variant of ipykernel, which uses the bootstrap jupyter-client to +;; break the cycle between ipykernel and jupyter-client. +(define-public python-ipykernel-bootstrap + (let ((parent python-ipykernel)) + (hidden-package + (package + (inherit parent) + (name "python-ipykernel-bootstrap") + (propagated-inputs + `(("python-jupyter-client" ,python-jupyter-client-bootstrap) + ,@(fold alist-delete (package-propagated-inputs parent) + '("python-jupyter-client")))))))) + (define-public python-pari-jupyter (package (name "python-pari-jupyter") @@ -8825,7 +8986,7 @@ These should be used in preference to using a backslash for line continuation. correct string literal concatenation. It looks for style problems like implicitly concatenated string literals on -the same line (which can be introduced by the code formating tool Black), or +the same line (which can be introduced by the code formatting tool Black), or unnecessary plus operators for explicit string literal concatenation.") (license license:expat))) @@ -10225,25 +10386,103 @@ Debian-related files, such as: ;; Modules are either GPLv2+ or GPLv3+. (license license:gpl3+))) +(define-public python-json-spec + (package + (name "python-json-spec") + (version "0.10.1") + (source + (origin + (method url-fetch) + (uri (pypi-uri "json-spec" version)) + (sha256 + (base32 + "06dpbsq61ja9r89wpa2pzdii47qh3xri9ajdrgn1awfl102znchb")))) + (build-system python-build-system) + (propagated-inputs + `(("python-pathlib" ,python-pathlib) + ("python-six" ,python-six))) + (native-inputs + `(("python-pytest" ,python-pytest))) + (home-page "http://py.errorist.io/json-spec") + (synopsis + "JSON Schema, JSON Pointer and JSON Reference for Python") + (description + "This Python library implements several JSON specs, like JSON Schema, +JSON Reference and JSON Pointer.") + (license license:bsd-3))) + +(define-public python-fastjsonschema + (package + (name "python-fastjsonschema") + (version "2.15.0") + (source + (origin + (method url-fetch) + (uri (pypi-uri "fastjsonschema" version)) + (sha256 + (base32 + "0xknp399gpdjf08lrq2yvv66s7nsc51fgbm6vph7vyyg1ckbmv71")))) + (build-system python-build-system) + (arguments + `(#:tests? #f ; Fail with a strange backtrace ending in importlib. + #:phases + (modify-phases %standard-phases + (replace 'check + (lambda* (#:key inputs outputs tests? #:allow-other-keys) + (when tests? + (invoke "pytest" "-vv" "-m" "not benchmark"))))))) + (native-inputs + `(("python-colorama" ,python-colorama) + ("python-json-spec" ,python-json-spec) + ("python-jsonschema" ,python-jsonschema) + ("python-pylint" ,python-pylint) + ("python-pytest" ,python-pytest-6) + ("python-pytest-benchmark" + ,python-pytest-benchmark) + ("python-pytest-cache" ,python-pytest-cache) + ("python-validictory" ,python-validictory))) + (home-page + "https://github.com/horejsek/python-fastjsonschema") + (synopsis + "Fast Python implementation of JSON schema") + (description + "This library implements validation of JSON documents by JSON schema for +drafts 04, 06 and 07.") + (license license:bsd-3))) + (define-public python-nbformat (package (name "python-nbformat") (version "5.1.3") - (source - (origin - (method url-fetch) - (uri (pypi-uri "nbformat" version)) - (sha256 - (base32 - "1j6idwsw59cslsssvlkg2bkfpvd6ri7kghbp14jwcw87sy57h5mm")))) + ;; The PyPi release tarball lacks some test cases and test data. + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/jupyter/nbformat.git") + (commit version))) + (sha256 + (base32 + "033v16cfmxzh3jn5phnil4p3silr49iwh9wiigzhv0crc6sanvwz")) + (file-name (git-file-name name version)))) (build-system python-build-system) + (arguments + `(#:phases + (modify-phases %standard-phases + (replace 'check + (lambda* (#:key inputs outputs tests? #:allow-other-keys) + (when tests? + (invoke "pytest" "-vv"))))))) (propagated-inputs `(("python-ipython-genutils" ,python-ipython-genutils) ("python-jsonschema" ,python-jsonschema) ("python-jupyter-core" ,python-jupyter-core) ("python-traitlets" ,python-traitlets))) (native-inputs - `(("python-pytest" ,python-pytest))) + `(("python-pytest" ,python-pytest) + ("python-fastjsonschema" ,python-fastjsonschema) ; This is only active + ; when setting NBFORMAT_VALIDATOR="fastjsonschema", so include it for + ; testing only. + ("python-testpath" ,python-testpath))) (home-page "https://jupyter.org") (synopsis "Jupyter Notebook format") (description "This package provides the reference implementation of the @@ -10426,32 +10665,64 @@ time.") (arguments `(#:phases (modify-phases %standard-phases + (add-after 'unpack 'fix-paths-and-tests + (lambda* (#:key inputs outputs #:allow-other-keys) + (let* ((pandoc (string-append (assoc-ref inputs "pandoc") "/bin/pandoc")) + (texlive-root (string-append (assoc-ref inputs "texlive"))) + (xelatex (string-append texlive-root "/bin/xelatex")) + (bibtex (string-append texlive-root "/bin/bibtex"))) + ;; Use pandoc binary from input. + (substitute* "nbconvert/utils/pandoc.py" + (("'pandoc'") (string-append "'" pandoc "'"))) + ;; Same for LaTeX. + (substitute* "nbconvert/exporters/pdf.py" + (("\"xelatex\"") (string-append "\"" xelatex "\"")) + (("\"bibtex\"") (string-append "\"" bibtex "\""))) + ;; Make sure tests are not skipped. + (substitute* (find-files "." "test_.+\\.py$") + (("@onlyif_cmds_exist\\(('(pandoc|xelatex)'(, )?)+\\)") "")) + ;; Pandoc is never missing, disable test. + (substitute* "nbconvert/utils/tests/test_pandoc.py" + (("import os" all) (string-append all "\nimport pytest")) + (("(.+)(def test_pandoc_available)" all indent def) + (string-append indent "@pytest.mark.skip('disabled by guix')\n" + indent def))) + ; Not installing pyppeteer, delete test. + (delete-file "nbconvert/exporters/tests/test_webpdf.py") + (substitute* "nbconvert/tests/test_nbconvertapp.py" + (("(.+)(def test_webpdf_with_chromium)" all indent def) + (string-append indent "@pytest.mark.skip('disabled by guix')\n" + indent def))) + #t))) (replace 'check (lambda* (#:key tests? inputs outputs #:allow-other-keys) (when tests? + ;; Some tests invoke the installed nbconvert binary. (add-installed-pythonpath inputs outputs) - - ;; This seems to require Chromium. - (delete-file "nbconvert/exporters/tests/test_webpdf.py") - - ;; This depends on the python3 kernel, which is provided by a - ;; package that depends on nbconvert. - (delete-file "nbconvert/preprocessors/tests/test_execute.py") - - ;; Most of these tests fail because nbconvert fails to execute - ;; itself. - (delete-file "nbconvert/tests/test_nbconvertapp.py") - - ;; One test here fails with an unclear error. It looks like - ;; "%%pylabprint" is supposed to be expanded to some other - ;; code, but isn't. - (delete-file "nbconvert/filters/tests/test_strings.py") - + ;; Tries to write to this path. + (unsetenv "JUPYTER_CONFIG_DIR") + ;; Tests depend on templates installed to output. + (setenv "JUPYTER_PATH" + (string-append + (assoc-ref outputs "out") + "/share/jupyter:" + (getenv "JUPYTER_PATH"))) ;; Some tests need HOME (setenv "HOME" "/tmp") - (invoke "pytest"))))))) + (invoke "pytest" "-vv"))))))) + (inputs + `(("pandoc" ,pandoc) + ; XXX: Disabled, needs substitute*. + ;("inkscape" ,inkscape) + ("texlive" ,texlive))) (native-inputs - `(("python-pytest" ,python-pytest))) + `(("python-ipykernel" ,python-ipykernel) + ; XXX: Disabled, not in guix. + ;("python-pyppeteer" ,python-pyppeteer) + ("python-pytest" ,python-pytest) + ("python-pytest-cov" ,python-pytest-cov) + ("python-pytest-dependency" + ,python-pytest-dependency))) (propagated-inputs `(("python-bleach" ,python-bleach) ("python-defusedxml" ,python-defusedxml) @@ -10465,7 +10736,9 @@ time.") ("python-pygments" ,python-pygments) ("python-jupyterlab-pygments" ,python-jupyterlab-pygments) ("python-testpath" ,python-testpath) - ("python-traitlets" ,python-traitlets))) + ("python-traitlets" ,python-traitlets) + ;; Required, even if [serve] is not used. + ("python-tornado" ,python-tornado-6))) (home-page "https://jupyter.org") (synopsis "Converting Jupyter Notebooks") (description "The @code{nbconvert} tool, @{jupyter nbconvert}, converts @@ -10534,6 +10807,9 @@ convert an @code{.ipynb} notebook file into various static formats including: (delete-file-recursively "notebook/tests/selenium") (when tests? (add-installed-pythonpath inputs outputs) + ;; Some tests do not expect all files to be installed in the + ;; same directory, but JUPYTER_PATH contains multiple entries. + (unsetenv "JUPYTER_PATH") ;; Some tests need HOME (setenv "HOME" "/tmp") (with-directory-excursion "/tmp" @@ -10788,10 +11064,6 @@ popular online obfuscators.") ("python-nbconvert" ,python-nbconvert) ("python-notebook" ,python-notebook) ("python-qtconsole" ,python-qtconsole))) - (native-search-paths - (list (search-path-specification - (variable "JUPYTER_PATH") - (files '("share/jupyter"))))) (home-page "https://jupyter.org") (synopsis "Web application for interactive documents") (description @@ -11368,6 +11640,25 @@ its Lisp code into the Python Abstract Syntax Tree, you have the whole world of Python at your fingertips, in Lisp form.") (license license:expat))) +(define-public python-hissp + (package + (name "python-hissp") + (version "0.2.0") + (source + (origin + (method url-fetch) + (uri (pypi-uri "hissp" version)) + (sha256 + (base32 + "0yns7f0q699zn2ziagyas2nkndl7mp1hhssv9x9mpl7jxj2p5myw")))) + (build-system python-build-system) + (home-page "https://github.com/gilch/hissp") + (synopsis "It's Python with a Lissp") + (description "Hissp is a modular Lisp implementation that compiles to a +functional subset of Python—Syntactic macro metaprogramming with full access +to the Python ecosystem.") + (license license:asl2.0))) + (define-public python2-functools32 (package (name "python2-functools32") @@ -12464,6 +12755,119 @@ ISO 8859, etc.).") (define-public python2-translitcodec (package-with-python2 python-translitcodec)) +(define-public python-anyqt + (package + (name "python-anyqt") + (version "0.0.11") + (source + (origin + (method url-fetch) + (uri (pypi-uri "AnyQt" version)) + (sha256 + (base32 "0gl2czirzjvhbq963i2awxp8kwbc1grh67lpcwfipyn9w3kdwdj4")))) + (build-system python-build-system) + (arguments + `(#:tests? #f ;there are no tests + #:phases + (modify-phases %standard-phases + (add-after 'unpack 'delete-files + ;; Delete files related to other operating systems. + (lambda _ + (delete-file "AnyQt/QtMacExtras.py") + (delete-file "AnyQt/QtWinExtras.py") + #t))))) + (home-page "https://github.com/ales-erjavec/anyqt") + (synopsis "PyQt4/PyQt5 compatibility layer") + (description "AnyQt is a PyQt4/PyQt5 compatibility layer.") + (license license:gpl3))) + +(define-public python-pyqtgraph + (package + (name "python-pyqtgraph") + (version "0.12.1") + (source + (origin + (method url-fetch) + (uri (pypi-uri "pyqtgraph" version)) + (sha256 + (base32 "0kc7ncv0lr3spni29i9g8nszyr4xinswqi2zzs6v8kqqi593pvyj")))) + (build-system python-build-system) + (arguments + `(#:phases + (modify-phases %standard-phases + (add-before 'check 'set-home-and-qpa + (lambda _ + (setenv "HOME" "/tmp") + (setenv "QT_QPA_PLATFORM" "offscreen") + #t)) + (replace 'check + (lambda* (#:key inputs outputs #:allow-other-keys) + (add-installed-pythonpath inputs outputs) + (invoke "pytest" "-vv" "-k" + ;; These tests try to download online data. + (string-append "not test_PolyLineROI" + " and not test_getArrayRegion_axisorder" + " and not test_getArrayRegion" + " and not test_PlotCurveItem" + " and not test_NonUniformImage_colormap" + " and not test_NonUniformImage_lut" + " and not test_ImageItem_axisorder" + " and not test_ImageItem"))))))) + (native-inputs + `(("python-pytest" ,python-pytest) + ("python-pytest-cov" ,python-pytest-cov) + ("python-pytest-xdist" ,python-pytest-xdist))) + (inputs + `(("qtbase" ,qtbase))) + (propagated-inputs + `(("python-h5py" ,python-h5py) + ("python-numpy" ,python-numpy) + ("python-pyopengl" ,python-pyopengl) + ("python-scipy" ,python-scipy) + ("python-pyqt" ,python-pyqt))) + (home-page "http://www.pyqtgraph.org") + (synopsis "Scientific graphics and GUI library for Python") + (description + "PyQtGraph is a Pure-python graphics library for PyQt5, PyQt6, PySide2 +and PySide6. It is intended for use in mathematics, scientific or engineering +applications.") + (license license:expat))) + +(define-public python-qasync + (package + (name "python-qasync") + (version "0.15.0") + (source + (origin + ;; There are no tests in the PyPI tarball. + (method git-fetch) + (uri (git-reference + (url "https://github.com/CabbageDevelopment/qasync/") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 "0va9h6v102d7mxz608banjc0l0v02dq3ywhr5i4nqaxx3qkazc2l")))) + (build-system python-build-system) + (arguments + `(#:test-target "pytest" + #:phases + (modify-phases %standard-phases + (add-before 'check 'set-qpa + (lambda _ + (setenv "QT_QPA_PLATFORM" "offscreen") + #t))))) + (native-inputs + `(("python-pytest" ,python-pytest) + ("python-pytest-runner" ,python-pytest-runner))) + (propagated-inputs + `(("python-pyqt" ,python-pyqt))) + (home-page "https://github.com/CabbageDevelopment/qasync") + (synopsis "Implementation of the PEP 3156 Event-Loop with Qt") + (description + "@code{qasync} allows coroutines to be used in PyQt/PySide applications +by providing an implementation of the PEP 3156 event-loop.") + (license license:bsd-2))) + (define-public python-editor (package (name "python-editor") @@ -24069,13 +24473,13 @@ applications with variable CPU loads).") (define-public python-djvulibre (package (name "python-djvulibre") - (version "0.8.5") + (version "0.8.6") (source (origin (method url-fetch) (uri (pypi-uri "python-djvulibre" version)) (sha256 - (base32 "1c0lvpg7j2525cv52s3q5sg7hfnakkb8rmghg0jc02gshsxmrj4f")))) + (base32 "089smpq29ll0z37lnq26r2f72d31i33xm9fw9pc6hlcsm6nbjbiv")))) (build-system python-build-system) (native-inputs `(("ghostscript" ,ghostscript) |