From 9f74bd317f00c55ab1fa30683c1668a19bf17eab Mon Sep 17 00:00:00 2001 From: Vagrant Cascadian Date: Sat, 7 Sep 2019 20:08:16 -0700 Subject: gnu: python-debian: Update to 0.1.36. * gnu/packages/python-xyz (python-debian): Update to 0.1.36. [source]: Switch to using git-fetch. [arguments]: Add phase to delete tests depending on tools not yet present in guix. [propagated-inputs]: Add python-chardet. --- gnu/packages/python-xyz.scm | 24 +++++++++++++++++++----- 1 file changed, 19 insertions(+), 5 deletions(-) (limited to 'gnu/packages/python-xyz.scm') diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm index 2827ddf770..16f1331a84 100644 --- a/gnu/packages/python-xyz.scm +++ b/gnu/packages/python-xyz.scm @@ -7490,17 +7490,31 @@ (define-public python-debian (package (name "python-debian") (home-page "https://salsa.debian.org/python-debian-team/python-debian") - (version "0.1.28") + (version "0.1.36") (source (origin - (method url-fetch) - (uri (pypi-uri name version)) + ;; Use git-fetch, as pypi doesn't include test suite. + (method git-fetch) + (uri (git-reference + (url home-page) + (commit version))) + (file-name (git-file-name name version)) (sha256 (base32 - "0i15f0xzx679sd0ldq2sls9pnnps9fv6vhqvnv9dzf4qhma42i0y")))) + "0qy6x28bj6yfikhjww932v5xq4mf5bm1iczl7acy4c7zm6mwhqfa")))) (build-system python-build-system) + (arguments + `(#:phases (modify-phases %standard-phases + (add-after 'unpack 'remove-debian-specific-tests + ;; python-apt, apt and dpkg are not yet available in guix, + ;; and these tests heavily depend on them. + (lambda _ + (delete-file "lib/debian/tests/test_deb822.py") + (delete-file "lib/debian/tests/test_debfile.py") + #t))))) (propagated-inputs - `(("python-six" ,python-six))) + `(("python-six" ,python-six) + ("python-chardet" ,python-chardet))) (synopsis "Debian package related modules") (description ;; XXX: Use @enumerate instead of @itemize to work around -- cgit v1.2.3 From 984cabc4a66cd6b58354887530d136e92bd8a172 Mon Sep 17 00:00:00 2001 From: Brian Leung Date: Sat, 24 Aug 2019 04:47:38 +0200 Subject: gnu: python-language-server: Update to 0.28.1. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * gnu/packages/python-xyz.scm (python-language-server): Update to 0.28.1. Signed-off-by: Ludovic Courtès --- gnu/packages/python-xyz.scm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'gnu/packages/python-xyz.scm') diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm index 16f1331a84..a928677858 100644 --- a/gnu/packages/python-xyz.scm +++ b/gnu/packages/python-xyz.scm @@ -2987,14 +2987,14 @@ (define-public python-pydocstyle (define-public python-language-server (package (name "python-language-server") - (version "0.26.1") + (version "0.28.1") (source (origin (method url-fetch) (uri (pypi-uri "python-language-server" version)) (sha256 (base32 - "1vs9ckfmm534n1hq3m871916wsjvi5h4gyj6wlzg13ck6506lx0s")))) + "1qbiij208l6g1l5hzihx8badhmqkxdk0spn7gm7564yg54zdp2g2")))) (build-system python-build-system) (propagated-inputs `(("python-pluggy" ,python-pluggy) -- cgit v1.2.3 From 1475094a457cd927e149d54ec9b8f59a8b05f0f2 Mon Sep 17 00:00:00 2001 From: Maxim Cournoyer Date: Tue, 10 Sep 2019 22:28:00 +0900 Subject: gnu: python-parso: Update to 0.5.1. * gnu/packages/python-xyz.scm (python-parso): Update to 0.5.1. --- gnu/packages/python-xyz.scm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'gnu/packages/python-xyz.scm') diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm index a928677858..ea183c0301 100644 --- a/gnu/packages/python-xyz.scm +++ b/gnu/packages/python-xyz.scm @@ -14744,14 +14744,14 @@ (define-public python-onetimepass (define-public python-parso (package (name "python-parso") - (version "0.3.1") + (version "0.5.1") (source (origin (method url-fetch) (uri (pypi-uri "parso" version)) (sha256 (base32 - "18p89iwcm8mnf380f92g9w0bhx5km8wxp392vvjcq4y1ld1llw1m")))) + "171a9ivhxwsd52h1cgsz40zgzpgzscn7yqb7sdjhy8m1lzj0wsv6")))) (native-inputs `(("python-pytest" ,python-pytest))) (build-system python-build-system) -- cgit v1.2.3 From 4eb97c254effc95115d5e9da1b7083ecbc427a2f Mon Sep 17 00:00:00 2001 From: Maxim Cournoyer Date: Tue, 10 Sep 2019 22:34:22 +0900 Subject: gnu: python-parso: Run the test suite. * gnu/packages/python-xyz.scm (python-parso)[phases]: Replace the check phase. --- gnu/packages/python-xyz.scm | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'gnu/packages/python-xyz.scm') diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm index ea183c0301..991082eed0 100644 --- a/gnu/packages/python-xyz.scm +++ b/gnu/packages/python-xyz.scm @@ -14755,6 +14755,10 @@ (define-public python-parso (native-inputs `(("python-pytest" ,python-pytest))) (build-system python-build-system) + (arguments + `(#:phases (modify-phases %standard-phases + (replace 'check + (lambda _ (invoke "pytest" "-vv")))))) (home-page "https://github.com/davidhalter/parso") (synopsis "Python Parser") (description "Parso is a Python parser that supports error recovery and -- cgit v1.2.3 From 296e1aea65eda887d9c9ce14038fec5ff090b977 Mon Sep 17 00:00:00 2001 From: Maxim Cournoyer Date: Wed, 11 Sep 2019 09:34:29 +0900 Subject: gnu: python-jedi: Update to 0.15.1 and re-enable tests. * gnu/packages/python-xyz.scm (python-jedi): Update to 0.15.1; re-enable tests. --- gnu/packages/python-xyz.scm | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) (limited to 'gnu/packages/python-xyz.scm') diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm index 991082eed0..819b3045a3 100644 --- a/gnu/packages/python-xyz.scm +++ b/gnu/packages/python-xyz.scm @@ -10556,25 +10556,29 @@ (define-public python2-prompt-toolkit-1 (define-public python-jedi (package (name "python-jedi") - (version "0.13.3") + (version "0.15.1") (source (origin (method url-fetch) (uri (pypi-uri "jedi" version)) (sha256 (base32 - "0nsrjlb57njqppxmi8wjsb1dkad7qa7svx67jbkhixq66lz61c1b")))) + "0bp4pxhsynaarbvzblsn5x32lzp29svy3sxfy8i6m5iwz9s9r1ds")))) (build-system python-build-system) (arguments - `( ;; Many tests are failing with Python 3.7.x as of version 0.13.3 (see: - ;; https://github.com/davidhalter/jedi/issues/1263) - #:tests? #f - #:phases + `(#:phases (modify-phases %standard-phases + (add-after 'unpack 'disable-file-completion-test + ;; A single parameterized test currently fail (see: + ;; https://github.com/davidhalter/jedi/issues/1395). Remove it. + (lambda _ + (substitute* "test/test_api/test_completion.py" + ((".*'example.py', 'rb\"' \\+ join\\('\\.\\.'.*") "")) + #t)) (replace 'check - (lambda* (#:key tests? #:allow-other-keys) - (when tests? - (invoke "py.test" "-vv"))))))) + (lambda _ + (setenv "HOME" "/tmp") + (invoke "python" "-m" "pytest")))))) (native-inputs `(("python-pytest" ,python-pytest) ("python-docopt" ,python-docopt))) @@ -10592,11 +10596,7 @@ (define-public python-jedi (license license:expat))) (define-public python2-jedi - (let ((base (package-with-python2 (strip-python2-variant python-jedi)))) - (package - (inherit base) - (arguments (substitute-keyword-arguments (package-arguments base) - ((#:tests? _) #t)))))) + (package-with-python2 python-jedi)) (define-public ptpython (package -- cgit v1.2.3 From 0f272518eca06f849cef86d26c294f17edc82c3e Mon Sep 17 00:00:00 2001 From: Ricardo Wurmus Date: Wed, 11 Sep 2019 23:29:07 +0200 Subject: gnu: python-ipython-documentation: Make reproducible. Fixes . * gnu/packages/python-xyz.scm (python-ipython)[arguments]: Add phase "make-docs-reproducible" to remove timestamps from documentation generated in dependent python-ipython-documentation package. --- gnu/packages/python-xyz.scm | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'gnu/packages/python-xyz.scm') diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm index 819b3045a3..00bffca74a 100644 --- a/gnu/packages/python-xyz.scm +++ b/gnu/packages/python-xyz.scm @@ -5399,6 +5399,13 @@ (define-public python-ipython (arguments `(#:phases (modify-phases %standard-phases + (add-after 'unpack 'make-docs-reproducible + (lambda _ + (substitute* "IPython/sphinxext/ipython_directive.py" + ((".*import datetime") "") + ((".*datetime.datetime.now\\(\\)") "") + (("%timeit") "# %timeit")) + #t)) ;; Tests can only be run after the library has been installed and not ;; within the source directory. (delete 'check) -- cgit v1.2.3 From 4913828bb1f1c9f672a49c19090ba4ae8d14e88b Mon Sep 17 00:00:00 2001 From: Brian Leung Date: Wed, 11 Sep 2019 19:15:22 +0200 Subject: gnu: python-language-server: Update to 0.28.3-1.c3cab77. * gnu/packages/python-xyz.scm (python-language-server): Update to 0.28.3-1.c3cab77. Signed-off-by: Maxim Cournoyer --- gnu/packages/python-xyz.scm | 62 +++++++++++++++++++++++++-------------------- 1 file changed, 34 insertions(+), 28 deletions(-) (limited to 'gnu/packages/python-xyz.scm') diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm index 00bffca74a..8b2023ceba 100644 --- a/gnu/packages/python-xyz.scm +++ b/gnu/packages/python-xyz.scm @@ -2984,38 +2984,44 @@ (define-public python-pydocstyle Server (PLS).") (license license:expat))) +;; XXX: We must use a non-release version since the latest release version +;; requires python-jedi version < 0.15. (define-public python-language-server - (package - (name "python-language-server") - (version "0.28.1") - (source - (origin - (method url-fetch) - (uri (pypi-uri "python-language-server" version)) - (sha256 - (base32 - "1qbiij208l6g1l5hzihx8badhmqkxdk0spn7gm7564yg54zdp2g2")))) - (build-system python-build-system) - (propagated-inputs - `(("python-pluggy" ,python-pluggy) - ("python-jsonrpc-server" ,python-jsonrpc-server) - ("python-jedi" ,python-jedi) - ("python-yapf" ,python-yapf) - ("python-pyflakes" ,python-pyflakes) - ("python-pydocstyle" ,python-pydocstyle) - ("python-pycodestyle" ,python-pycodestyle) - ("python-mccabe" ,python-mccabe) - ("python-rope" ,python-rope) - ("python-autopep8" ,python-autopep8) - ("python-pylint" ,python-pylint))) - (home-page "https://github.com/palantir/python-language-server") - (synopsis "Python implementation of the Language Server Protocol") - (description - "The Python Language Server (pyls) is an implementation of the Python 3 + (let ((commit "c3cab77a85b1de4af1aec1bafea6a7320d6baec5") + (revision "1")) + (package + (name "python-language-server") + (version (git-version "0.28.3" revision commit)) + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/palantir/python-language-server.git") + (commit commit))) + (sha256 + (base32 + "1q0xdwgln09sh58j0ryygj92hfgdhwcs57zjvqihya23jr5v0bz4")))) + (build-system python-build-system) + (propagated-inputs + `(("python-pluggy" ,python-pluggy) + ("python-jsonrpc-server" ,python-jsonrpc-server) + ("python-jedi" ,python-jedi) + ("python-yapf" ,python-yapf) + ("python-pyflakes" ,python-pyflakes) + ("python-pydocstyle" ,python-pydocstyle) + ("python-pycodestyle" ,python-pycodestyle) + ("python-mccabe" ,python-mccabe) + ("python-rope" ,python-rope) + ("python-autopep8" ,python-autopep8) + ("python-pylint" ,python-pylint))) + (home-page "https://github.com/palantir/python-language-server") + (synopsis "Python implementation of the Language Server Protocol") + (description + "The Python Language Server (pyls) is an implementation of the Python 3 language specification for the Language Server Protocol (LSP). This tool is used in text editing environments to provide a complete and integrated feature-set for programming Python effectively.") - (license license:expat))) + (license license:expat)))) (define-public python-black (package -- cgit v1.2.3 From 01a53e0b378aca02c429ebfb5018237867a6d024 Mon Sep 17 00:00:00 2001 From: Maxim Cournoyer Date: Fri, 13 Sep 2019 00:05:09 +0900 Subject: gnu: python-pathpy: Add a missing propagated input. This fixes the build of 'python-pytest-shutil', amongst others. * gnu/packages/python-xyz.scm (python-pathpy)[propagated-inputs]: Add python-importlib-metadata. --- gnu/packages/python-xyz.scm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'gnu/packages/python-xyz.scm') diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm index 8b2023ceba..74abf336c8 100644 --- a/gnu/packages/python-xyz.scm +++ b/gnu/packages/python-xyz.scm @@ -4972,7 +4972,8 @@ (define-public python-pathpy (outputs '("out" "doc")) (build-system python-build-system) (propagated-inputs - `(("python-appdirs" ,python-appdirs))) + `(("python-appdirs" ,python-appdirs) + ("python-importlib-metadata" ,python-importlib-metadata))) (native-inputs `(("python-setuptools-scm" ,python-setuptools-scm) ("python-sphinx" ,python-sphinx) -- cgit v1.2.3 From 5ea654cfe030165efadf1f1dcfb2adef66a1f44f Mon Sep 17 00:00:00 2001 From: Ricardo Wurmus Date: Thu, 12 Sep 2019 21:59:10 +0200 Subject: gnu: python-matplotlib: Update to 3.1.1. * gnu/packages/python-xyz.scm (python-matplotlib): Update to 3.1.1. [native-inputs]: Remove python-nose; add python-pytest and unzip; add jquery-ui. [arguments]: Add build phases "fix-and-disable-failing-tests" and "install-jquery-ui", and move the "check" phase after the "install" phase; use the default backend in setup.cfg. (python2-matplotlib): Keep at version 2.2.3. (python-matplotlib-documentation)[arguments]: Remove "check" phase. --- gnu/packages/python-xyz.scm | 73 ++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 66 insertions(+), 7 deletions(-) (limited to 'gnu/packages/python-xyz.scm') diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm index 74abf336c8..1a4c804f37 100644 --- a/gnu/packages/python-xyz.scm +++ b/gnu/packages/python-xyz.scm @@ -3806,14 +3806,14 @@ (define-public python2-colorspacious (define-public python-matplotlib (package (name "python-matplotlib") - (version "2.2.3") + (version "3.1.1") (source (origin (method url-fetch) (uri (pypi-uri "matplotlib" version)) (sha256 (base32 - "1rcc7x9ig3hpchkc4cwdvym3y451w74275fxr455zkfagrsvymbk")))) + "14qc109dibp32xfd9lah54djc0rc76fhbsj9cwyb328lzqmd5sqz")))) (build-system python-build-system) (propagated-inputs ; the following packages are all needed at run time `(("python-cycler" ,python-cycler) @@ -3830,7 +3830,7 @@ (define-public python-matplotlib ;; From version 1.4.0 'matplotlib' makes use of 'cairocffi' instead of ;; 'pycairo'. However, 'pygobject' makes use of a 'pycairo' 'context' ;; object. For this reason we need to import both libraries. - ;; https://pythonhosted.org/cairocffi/cffi_api.html#converting-pycairo + ;; https://cairocffi.readthedocs.io/en/stable/cffi_api.html#converting-pycairo-wrappers-to-cairocffi ("python-pycairo" ,python-pycairo) ("python-cairocffi" ,python-cairocffi))) (inputs @@ -3845,11 +3845,59 @@ (define-public python-matplotlib ("tk" ,tk))) (native-inputs `(("pkg-config" ,pkg-config) - ("python-nose" ,python-nose) - ("python-mock" ,python-mock))) + ("python-pytest" ,python-pytest) + ("python-mock" ,python-mock) + ("unzip" ,unzip) + ("jquery-ui" + ,(origin + (method url-fetch) + (uri "https://jqueryui.com/resources/download/jquery-ui-1.12.1.zip") + (sha256 + (base32 + "0kb21xf38diqgxcdi1z3s9ssq36pldvyqxy56hn6pcva6rs3c8zq")))))) (arguments `(#:phases (modify-phases %standard-phases + ;; XXX We disable all image comparison tests because we're using a + ;; newer version of FreeType than matplotlib expects. This leads to + ;; minor differences throughout the tests. + (add-after 'unpack 'fix-and-disable-failing-tests + (lambda _ + (substitute* (append (find-files "lib/matplotlib/tests/" + "test_.*\\.py$") + (find-files "lib/mpl_toolkits/tests" + "test_.*\\.py$")) + (("^from matplotlib" match) + (string-append "import pytest\n" match)) + (("( *)@image_comparison" match indent) + (string-append indent + "@pytest.mark.skip(reason=\"unknown minor image differences\")\n" + match))) + (substitute* "lib/matplotlib/tests/test_animation.py" + (("/bin/sh") (which "sh"))) + (for-each delete-file + ;; test_normal_axes, test_get_tightbbox_polar + '("lib/matplotlib/tests/test_axes.py" + ;; test_outward_ticks + "lib/matplotlib/tests/test_tightlayout.py" + ;; Fontconfig returns no fonts. + "lib/matplotlib/tests/test_font_manager.py")) + #t)) + (add-before 'install 'install-jquery-ui + (lambda* (#:key outputs inputs #:allow-other-keys) + (let ((dir (string-append (assoc-ref outputs "out") + "/lib/python3.7/site-packages/matplotlib/backends/web_backend/"))) + (mkdir-p dir) + (invoke "unzip" + (assoc-ref inputs "jquery-ui") + "-d" dir)) + #t)) + (delete 'check) + (add-after 'install 'check + (lambda* (#:key outputs inputs #:allow-other-keys) + (add-installed-pythonpath inputs outputs) + (invoke "python" "tests.py" "-v" + "-m" "not network"))) (add-before 'build 'configure-environment (lambda* (#:key outputs inputs #:allow-other-keys) (let ((cairo (assoc-ref inputs "cairo"))) @@ -3861,8 +3909,8 @@ (define-public python-matplotlib (lambda (port) (format port "[directories]~% basedirlist = ~a,~a~% - [rc_options]~% -backend = TkAgg~%" +[packages]~% +tests = True~%" (assoc-ref inputs "tcl") (assoc-ref inputs "tk"))))) #t))))) @@ -3881,6 +3929,14 @@ (define-public python2-matplotlib (let ((matplotlib (package-with-python2 (strip-python2-variant python-matplotlib)))) (package (inherit matplotlib) + (version "2.2.3") + (source + (origin + (method url-fetch) + (uri (pypi-uri "matplotlib" version)) + (sha256 + (base32 + "1rcc7x9ig3hpchkc4cwdvym3y451w74275fxr455zkfagrsvymbk")))) ;; Make sure to use special packages for Python 2 instead ;; of those automatically rewritten by package-with-python2. (propagated-inputs @@ -3930,6 +3986,9 @@ (define-public python-matplotlib-documentation `(#:tests? #f ; we're only generating documentation #:phases (modify-phases %standard-phases + ;; The tests in python-matplotlib are run after the install phase, so + ;; we need to delete the extra phase here. + (delete 'check) (replace 'build (lambda _ (chdir "doc") -- cgit v1.2.3 From 5ad0a4522116007420aeb288f76da241f43cb6bf Mon Sep 17 00:00:00 2001 From: Ricardo Wurmus Date: Thu, 12 Sep 2019 23:00:39 +0200 Subject: gnu: python-matplotlib-documentation: Add missing input. * gnu/packages/python-xyz.scm (python-matplotlib-documentation)[native-inputs]: Add python-sphinx-copybutton. (python2-matplotlib-documentation)[native-inputs]: Remove python-sphinx-copybutton. --- gnu/packages/python-xyz.scm | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'gnu/packages/python-xyz.scm') diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm index 1a4c804f37..4541604873 100644 --- a/gnu/packages/python-xyz.scm +++ b/gnu/packages/python-xyz.scm @@ -3960,6 +3960,7 @@ (define-public python-matplotlib-documentation `(("python-matplotlib" ,python-matplotlib) ("python-colorspacious" ,python-colorspacious) ("python-sphinx" ,python-sphinx) + ("python-sphinx-copybutton" ,python-sphinx-copybutton) ("python-sphinx-gallery" ,python-sphinx-gallery) ("python-numpydoc" ,python-numpydoc) ("python-ipython" ,python-ipython) @@ -4037,7 +4038,12 @@ (define-public python-matplotlib-documentation (license (package-license python-matplotlib)))) (define-public python2-matplotlib-documentation - (package-with-python2 python-matplotlib-documentation)) + (let ((parent (package-with-python2 python-matplotlib-documentation))) + (package + (inherit parent) + (native-inputs + (alist-delete "python-sphinx-copybutton" + (package-native-inputs parent)))))) (define-public python-matplotlib-venn (package -- cgit v1.2.3