summaryrefslogtreecommitdiff
path: root/gnu/packages/python-xyz.scm
diff options
context:
space:
mode:
Diffstat (limited to 'gnu/packages/python-xyz.scm')
-rw-r--r--gnu/packages/python-xyz.scm213
1 files changed, 155 insertions, 58 deletions
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 296879f5341..eef2079c196 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -3004,38 +3004,44 @@ Language (TOML) configuration files.")
3004Server (PLS).") 3004Server (PLS).")
3005 (license license:expat))) 3005 (license license:expat)))
3006 3006
3007;; XXX: We must use a non-release version since the latest release version
3008;; requires python-jedi version < 0.15.
3007(define-public python-language-server 3009(define-public python-language-server
3008 (package 3010 (let ((commit "c3cab77a85b1de4af1aec1bafea6a7320d6baec5")
3009 (name "python-language-server") 3011 (revision "1"))
3010 (version "0.26.1") 3012 (package
3011 (source 3013 (name "python-language-server")
3012 (origin 3014 (version (git-version "0.28.3" revision commit))
3013 (method url-fetch) 3015 (source
3014 (uri (pypi-uri "python-language-server" version)) 3016 (origin
3015 (sha256 3017 (method git-fetch)
3016 (base32 3018 (uri (git-reference
3017 "1vs9ckfmm534n1hq3m871916wsjvi5h4gyj6wlzg13ck6506lx0s")))) 3019 (url "https://github.com/palantir/python-language-server.git")
3018 (build-system python-build-system) 3020 (commit commit)))
3019 (propagated-inputs 3021 (sha256
3020 `(("python-pluggy" ,python-pluggy) 3022 (base32
3021 ("python-jsonrpc-server" ,python-jsonrpc-server) 3023 "1q0xdwgln09sh58j0ryygj92hfgdhwcs57zjvqihya23jr5v0bz4"))))
3022 ("python-jedi" ,python-jedi) 3024 (build-system python-build-system)
3023 ("python-yapf" ,python-yapf) 3025 (propagated-inputs
3024 ("python-pyflakes" ,python-pyflakes) 3026 `(("python-pluggy" ,python-pluggy)
3025 ("python-pydocstyle" ,python-pydocstyle) 3027 ("python-jsonrpc-server" ,python-jsonrpc-server)
3026 ("python-pycodestyle" ,python-pycodestyle) 3028 ("python-jedi" ,python-jedi)
3027 ("python-mccabe" ,python-mccabe) 3029 ("python-yapf" ,python-yapf)
3028 ("python-rope" ,python-rope) 3030 ("python-pyflakes" ,python-pyflakes)
3029 ("python-autopep8" ,python-autopep8) 3031 ("python-pydocstyle" ,python-pydocstyle)
3030 ("python-pylint" ,python-pylint))) 3032 ("python-pycodestyle" ,python-pycodestyle)
3031 (home-page "https://github.com/palantir/python-language-server") 3033 ("python-mccabe" ,python-mccabe)
3032 (synopsis "Python implementation of the Language Server Protocol") 3034 ("python-rope" ,python-rope)
3033 (description 3035 ("python-autopep8" ,python-autopep8)
3034 "The Python Language Server (pyls) is an implementation of the Python 3 3036 ("python-pylint" ,python-pylint)))
3037 (home-page "https://github.com/palantir/python-language-server")
3038 (synopsis "Python implementation of the Language Server Protocol")
3039 (description
3040 "The Python Language Server (pyls) is an implementation of the Python 3
3035language specification for the Language Server Protocol (LSP). This tool is 3041language specification for the Language Server Protocol (LSP). This tool is
3036used in text editing environments to provide a complete and integrated 3042used in text editing environments to provide a complete and integrated
3037feature-set for programming Python effectively.") 3043feature-set for programming Python effectively.")
3038 (license license:expat))) 3044 (license license:expat))))
3039 3045
3040(define-public python-black 3046(define-public python-black
3041 (package 3047 (package
@@ -3848,14 +3854,14 @@ convert between colorspaces like sRGB, XYZ, CIEL*a*b*, CIECAM02, CAM02-UCS, etc.
3848(define-public python-matplotlib 3854(define-public python-matplotlib
3849 (package 3855 (package
3850 (name "python-matplotlib") 3856 (name "python-matplotlib")
3851 (version "2.2.3") 3857 (version "3.1.1")
3852 (source 3858 (source
3853 (origin 3859 (origin
3854 (method url-fetch) 3860 (method url-fetch)
3855 (uri (pypi-uri "matplotlib" version)) 3861 (uri (pypi-uri "matplotlib" version))
3856 (sha256 3862 (sha256
3857 (base32 3863 (base32
3858 "1rcc7x9ig3hpchkc4cwdvym3y451w74275fxr455zkfagrsvymbk")))) 3864 "14qc109dibp32xfd9lah54djc0rc76fhbsj9cwyb328lzqmd5sqz"))))
3859 (build-system python-build-system) 3865 (build-system python-build-system)
3860 (propagated-inputs ; the following packages are all needed at run time 3866 (propagated-inputs ; the following packages are all needed at run time
3861 `(("python-cycler" ,python-cycler) 3867 `(("python-cycler" ,python-cycler)
@@ -3872,7 +3878,7 @@ convert between colorspaces like sRGB, XYZ, CIEL*a*b*, CIECAM02, CAM02-UCS, etc.
3872 ;; From version 1.4.0 'matplotlib' makes use of 'cairocffi' instead of 3878 ;; From version 1.4.0 'matplotlib' makes use of 'cairocffi' instead of
3873 ;; 'pycairo'. However, 'pygobject' makes use of a 'pycairo' 'context' 3879 ;; 'pycairo'. However, 'pygobject' makes use of a 'pycairo' 'context'
3874 ;; object. For this reason we need to import both libraries. 3880 ;; object. For this reason we need to import both libraries.
3875 ;; https://pythonhosted.org/cairocffi/cffi_api.html#converting-pycairo 3881 ;; https://cairocffi.readthedocs.io/en/stable/cffi_api.html#converting-pycairo-wrappers-to-cairocffi
3876 ("python-pycairo" ,python-pycairo) 3882 ("python-pycairo" ,python-pycairo)
3877 ("python-cairocffi" ,python-cairocffi))) 3883 ("python-cairocffi" ,python-cairocffi)))
3878 (inputs 3884 (inputs
@@ -3887,11 +3893,59 @@ convert between colorspaces like sRGB, XYZ, CIEL*a*b*, CIECAM02, CAM02-UCS, etc.
3887 ("tk" ,tk))) 3893 ("tk" ,tk)))
3888 (native-inputs 3894 (native-inputs
3889 `(("pkg-config" ,pkg-config) 3895 `(("pkg-config" ,pkg-config)
3890 ("python-nose" ,python-nose) 3896 ("python-pytest" ,python-pytest)
3891 ("python-mock" ,python-mock))) 3897 ("python-mock" ,python-mock)
3898 ("unzip" ,unzip)
3899 ("jquery-ui"
3900 ,(origin
3901 (method url-fetch)
3902 (uri "https://jqueryui.com/resources/download/jquery-ui-1.12.1.zip")
3903 (sha256
3904 (base32
3905 "0kb21xf38diqgxcdi1z3s9ssq36pldvyqxy56hn6pcva6rs3c8zq"))))))
3892 (arguments 3906 (arguments
3893 `(#:phases 3907 `(#:phases
3894 (modify-phases %standard-phases 3908 (modify-phases %standard-phases
3909 ;; XXX We disable all image comparison tests because we're using a
3910 ;; newer version of FreeType than matplotlib expects. This leads to
3911 ;; minor differences throughout the tests.
3912 (add-after 'unpack 'fix-and-disable-failing-tests
3913 (lambda _
3914 (substitute* (append (find-files "lib/matplotlib/tests/"
3915 "test_.*\\.py$")
3916 (find-files "lib/mpl_toolkits/tests"
3917 "test_.*\\.py$"))
3918 (("^from matplotlib" match)
3919 (string-append "import pytest\n" match))
3920 (("( *)@image_comparison" match indent)
3921 (string-append indent
3922 "@pytest.mark.skip(reason=\"unknown minor image differences\")\n"
3923 match)))
3924 (substitute* "lib/matplotlib/tests/test_animation.py"
3925 (("/bin/sh") (which "sh")))
3926 (for-each delete-file
3927 ;; test_normal_axes, test_get_tightbbox_polar
3928 '("lib/matplotlib/tests/test_axes.py"
3929 ;; test_outward_ticks
3930 "lib/matplotlib/tests/test_tightlayout.py"
3931 ;; Fontconfig returns no fonts.
3932 "lib/matplotlib/tests/test_font_manager.py"))
3933 #t))
3934 (add-before 'install 'install-jquery-ui
3935 (lambda* (#:key outputs inputs #:allow-other-keys)
3936 (let ((dir (string-append (assoc-ref outputs "out")
3937 "/lib/python3.7/site-packages/matplotlib/backends/web_backend/")))
3938 (mkdir-p dir)
3939 (invoke "unzip"
3940 (assoc-ref inputs "jquery-ui")
3941 "-d" dir))
3942 #t))
3943 (delete 'check)
3944 (add-after 'install 'check
3945 (lambda* (#:key outputs inputs #:allow-other-keys)
3946 (add-installed-pythonpath inputs outputs)
3947 (invoke "python" "tests.py" "-v"
3948 "-m" "not network")))
3895 (add-before 'build 'configure-environment 3949 (add-before 'build 'configure-environment
3896 (lambda* (#:key outputs inputs #:allow-other-keys) 3950 (lambda* (#:key outputs inputs #:allow-other-keys)
3897 (let ((cairo (assoc-ref inputs "cairo"))) 3951 (let ((cairo (assoc-ref inputs "cairo")))
@@ -3903,8 +3957,8 @@ convert between colorspaces like sRGB, XYZ, CIEL*a*b*, CIECAM02, CAM02-UCS, etc.
3903 (lambda (port) 3957 (lambda (port)
3904 (format port "[directories]~% 3958 (format port "[directories]~%
3905basedirlist = ~a,~a~% 3959basedirlist = ~a,~a~%
3906 [rc_options]~% 3960[packages]~%
3907backend = TkAgg~%" 3961tests = True~%"
3908 (assoc-ref inputs "tcl") 3962 (assoc-ref inputs "tcl")
3909 (assoc-ref inputs "tk"))))) 3963 (assoc-ref inputs "tk")))))
3910 #t))))) 3964 #t)))))
@@ -3923,6 +3977,14 @@ toolkits.")
3923 (let ((matplotlib (package-with-python2 3977 (let ((matplotlib (package-with-python2
3924 (strip-python2-variant python-matplotlib)))) 3978 (strip-python2-variant python-matplotlib))))
3925 (package (inherit matplotlib) 3979 (package (inherit matplotlib)
3980 (version "2.2.3")
3981 (source
3982 (origin
3983 (method url-fetch)
3984 (uri (pypi-uri "matplotlib" version))
3985 (sha256
3986 (base32
3987 "1rcc7x9ig3hpchkc4cwdvym3y451w74275fxr455zkfagrsvymbk"))))
3926 ;; Make sure to use special packages for Python 2 instead 3988 ;; Make sure to use special packages for Python 2 instead
3927 ;; of those automatically rewritten by package-with-python2. 3989 ;; of those automatically rewritten by package-with-python2.
3928 (propagated-inputs 3990 (propagated-inputs
@@ -3946,6 +4008,7 @@ toolkits.")
3946 `(("python-matplotlib" ,python-matplotlib) 4008 `(("python-matplotlib" ,python-matplotlib)
3947 ("python-colorspacious" ,python-colorspacious) 4009 ("python-colorspacious" ,python-colorspacious)
3948 ("python-sphinx" ,python-sphinx) 4010 ("python-sphinx" ,python-sphinx)
4011 ("python-sphinx-copybutton" ,python-sphinx-copybutton)
3949 ("python-sphinx-gallery" ,python-sphinx-gallery) 4012 ("python-sphinx-gallery" ,python-sphinx-gallery)
3950 ("python-numpydoc" ,python-numpydoc) 4013 ("python-numpydoc" ,python-numpydoc)
3951 ("python-ipython" ,python-ipython) 4014 ("python-ipython" ,python-ipython)
@@ -3972,6 +4035,9 @@ toolkits.")
3972 `(#:tests? #f ; we're only generating documentation 4035 `(#:tests? #f ; we're only generating documentation
3973 #:phases 4036 #:phases
3974 (modify-phases %standard-phases 4037 (modify-phases %standard-phases
4038 ;; The tests in python-matplotlib are run after the install phase, so
4039 ;; we need to delete the extra phase here.
4040 (delete 'check)
3975 (replace 'build 4041 (replace 'build
3976 (lambda _ 4042 (lambda _
3977 (chdir "doc") 4043 (chdir "doc")
@@ -4020,7 +4086,12 @@ toolkits.")
4020 (license (package-license python-matplotlib)))) 4086 (license (package-license python-matplotlib))))
4021 4087
4022(define-public python2-matplotlib-documentation 4088(define-public python2-matplotlib-documentation
4023 (package-with-python2 python-matplotlib-documentation)) 4089 (let ((parent (package-with-python2 python-matplotlib-documentation)))
4090 (package
4091 (inherit parent)
4092 (native-inputs
4093 (alist-delete "python-sphinx-copybutton"
4094 (package-native-inputs parent))))))
4024 4095
4025(define-public python-matplotlib-venn 4096(define-public python-matplotlib-venn
4026 (package 4097 (package
@@ -5014,7 +5085,8 @@ releases.")
5014 (outputs '("out" "doc")) 5085 (outputs '("out" "doc"))
5015 (build-system python-build-system) 5086 (build-system python-build-system)
5016 (propagated-inputs 5087 (propagated-inputs
5017 `(("python-appdirs" ,python-appdirs))) 5088 `(("python-appdirs" ,python-appdirs)
5089 ("python-importlib-metadata" ,python-importlib-metadata)))
5018 (native-inputs 5090 (native-inputs
5019 `(("python-setuptools-scm" ,python-setuptools-scm) 5091 `(("python-setuptools-scm" ,python-setuptools-scm)
5020 ("python-sphinx" ,python-sphinx) 5092 ("python-sphinx" ,python-sphinx)
@@ -5447,6 +5519,13 @@ computing.")
5447 (arguments 5519 (arguments
5448 `(#:phases 5520 `(#:phases
5449 (modify-phases %standard-phases 5521 (modify-phases %standard-phases
5522 (add-after 'unpack 'make-docs-reproducible
5523 (lambda _
5524 (substitute* "IPython/sphinxext/ipython_directive.py"
5525 ((".*import datetime") "")
5526 ((".*datetime.datetime.now\\(\\)") "")
5527 (("%timeit") "# %timeit"))
5528 #t))
5450 ;; Tests can only be run after the library has been installed and not 5529 ;; Tests can only be run after the library has been installed and not
5451 ;; within the source directory. 5530 ;; within the source directory.
5452 (delete 'check) 5531 (delete 'check)
@@ -7500,17 +7579,31 @@ serve the same purpose: provide Python bindings for libmagic.")))
7500 (package 7579 (package
7501 (name "python-debian") 7580 (name "python-debian")
7502 (home-page "https://salsa.debian.org/python-debian-team/python-debian") 7581 (home-page "https://salsa.debian.org/python-debian-team/python-debian")
7503 (version "0.1.28") 7582 (version "0.1.36")
7504 (source 7583 (source
7505 (origin 7584 (origin
7506 (method url-fetch) 7585 ;; Use git-fetch, as pypi doesn't include test suite.
7507 (uri (pypi-uri name version)) 7586 (method git-fetch)
7587 (uri (git-reference
7588 (url home-page)
7589 (commit version)))
7590 (file-name (git-file-name name version))
7508 (sha256 7591 (sha256
7509 (base32 7592 (base32
7510 "0i15f0xzx679sd0ldq2sls9pnnps9fv6vhqvnv9dzf4qhma42i0y")))) 7593 "0qy6x28bj6yfikhjww932v5xq4mf5bm1iczl7acy4c7zm6mwhqfa"))))
7511 (build-system python-build-system) 7594 (build-system python-build-system)
7595 (arguments
7596 `(#:phases (modify-phases %standard-phases
7597 (add-after 'unpack 'remove-debian-specific-tests
7598 ;; python-apt, apt and dpkg are not yet available in guix,
7599 ;; and these tests heavily depend on them.
7600 (lambda _
7601 (delete-file "lib/debian/tests/test_deb822.py")
7602 (delete-file "lib/debian/tests/test_debfile.py")
7603 #t)))))
7512 (propagated-inputs 7604 (propagated-inputs
7513 `(("python-six" ,python-six))) 7605 `(("python-six" ,python-six)
7606 ("python-chardet" ,python-chardet)))
7514 (synopsis "Debian package related modules") 7607 (synopsis "Debian package related modules")
7515 (description 7608 (description
7516 ;; XXX: Use @enumerate instead of @itemize to work around 7609 ;; XXX: Use @enumerate instead of @itemize to work around
@@ -10554,25 +10647,29 @@ characters, mouse support, and auto suggestions.")
10554(define-public python-jedi 10647(define-public python-jedi
10555 (package 10648 (package
10556 (name "python-jedi") 10649 (name "python-jedi")
10557 (version "0.13.3") 10650 (version "0.15.1")
10558 (source 10651 (source
10559 (origin 10652 (origin
10560 (method url-fetch) 10653 (method url-fetch)
10561 (uri (pypi-uri "jedi" version)) 10654 (uri (pypi-uri "jedi" version))
10562 (sha256 10655 (sha256
10563 (base32 10656 (base32
10564 "0nsrjlb57njqppxmi8wjsb1dkad7qa7svx67jbkhixq66lz61c1b")))) 10657 "0bp4pxhsynaarbvzblsn5x32lzp29svy3sxfy8i6m5iwz9s9r1ds"))))
10565 (build-system python-build-system) 10658 (build-system python-build-system)
10566 (arguments 10659 (arguments
10567 `( ;; Many tests are failing with Python 3.7.x as of version 0.13.3 (see: 10660 `(#:phases
10568 ;; https://github.com/davidhalter/jedi/issues/1263)
10569 #:tests? #f
10570 #:phases
10571 (modify-phases %standard-phases 10661 (modify-phases %standard-phases
10662 (add-after 'unpack 'disable-file-completion-test
10663 ;; A single parameterized test currently fail (see:
10664 ;; https://github.com/davidhalter/jedi/issues/1395). Remove it.
10665 (lambda _
10666 (substitute* "test/test_api/test_completion.py"
10667 ((".*'example.py', 'rb\"' \\+ join\\('\\.\\.'.*") ""))
10668 #t))
10572 (replace 'check 10669 (replace 'check
10573 (lambda* (#:key tests? #:allow-other-keys) 10670 (lambda _
10574 (when tests? 10671 (setenv "HOME" "/tmp")
10575 (invoke "py.test" "-vv"))))))) 10672 (invoke "python" "-m" "pytest"))))))
10576 (native-inputs 10673 (native-inputs
10577 `(("python-pytest" ,python-pytest) 10674 `(("python-pytest" ,python-pytest)
10578 ("python-docopt" ,python-docopt))) 10675 ("python-docopt" ,python-docopt)))
@@ -10590,11 +10687,7 @@ well.")
10590 (license license:expat))) 10687 (license license:expat)))
10591 10688
10592(define-public python2-jedi 10689(define-public python2-jedi
10593 (let ((base (package-with-python2 (strip-python2-variant python-jedi)))) 10690 (package-with-python2 python-jedi))
10594 (package
10595 (inherit base)
10596 (arguments (substitute-keyword-arguments (package-arguments base)
10597 ((#:tests? _) #t))))))
10598 10691
10599(define-public ptpython 10692(define-public ptpython
10600 (package 10693 (package
@@ -14729,17 +14822,21 @@ time-based (TOTP) passwords.")
14729(define-public python-parso 14822(define-public python-parso
14730 (package 14823 (package
14731 (name "python-parso") 14824 (name "python-parso")
14732 (version "0.3.1") 14825 (version "0.5.1")
14733 (source 14826 (source
14734 (origin 14827 (origin
14735 (method url-fetch) 14828 (method url-fetch)
14736 (uri (pypi-uri "parso" version)) 14829 (uri (pypi-uri "parso" version))
14737 (sha256 14830 (sha256
14738 (base32 14831 (base32
14739 "18p89iwcm8mnf380f92g9w0bhx5km8wxp392vvjcq4y1ld1llw1m")))) 14832 "171a9ivhxwsd52h1cgsz40zgzpgzscn7yqb7sdjhy8m1lzj0wsv6"))))
14740 (native-inputs 14833 (native-inputs
14741 `(("python-pytest" ,python-pytest))) 14834 `(("python-pytest" ,python-pytest)))
14742 (build-system python-build-system) 14835 (build-system python-build-system)
14836 (arguments
14837 `(#:phases (modify-phases %standard-phases
14838 (replace 'check
14839 (lambda _ (invoke "pytest" "-vv"))))))
14743 (home-page "https://github.com/davidhalter/parso") 14840 (home-page "https://github.com/davidhalter/parso")
14744 (synopsis "Python Parser") 14841 (synopsis "Python Parser")
14745 (description "Parso is a Python parser that supports error recovery and 14842 (description "Parso is a Python parser that supports error recovery and