gnu: python-cloudpickle: Update to 1.6.0.

* gnu/packages/python-xyz.scm (python-cloudpickle-testpkg): New variable.
(python-cloudpickle): Update to 1.6.0; inherit from
python-cloudpickle-testpkg.
[source]: Fetch from git repository.
[native-inputs]: Add python-cloudpickle-testpkg; replace python-tornado with
python-tornado-6.
This commit is contained in:
Ricardo Wurmus 2021-07-28 14:44:31 +02:00
parent 2422fbf6b2
commit 145296dbcb
No known key found for this signature in database
GPG key ID: 197A5888235FACAC

View file

@ -21428,39 +21428,63 @@ pure-Python.")
(define-public python2-sortedcontainers (define-public python2-sortedcontainers
(package-with-python2 python-sortedcontainers)) (package-with-python2 python-sortedcontainers))
(define-public python-cloudpickle (define python-cloudpickle-testpkg
(package (package
(name "python-cloudpickle") (name "python-cloudpickle-testpkg")
(version "1.3.0") (version "1.6.0")
(source (source
(origin (origin
(method url-fetch) ;; Archive on pypi does not include test infrastructure.
(uri (pypi-uri "cloudpickle" version)) (method git-fetch)
(uri (git-reference
(url "https://github.com/cloudpipe/cloudpickle")
(commit (string-append "v" version))))
(file-name (git-file-name name version))
(sha256 (sha256
(base32 (base32
"0lx7gy9clp427qwcm7b23zdsldpr03gy3vxxhyi8fpbhwz859brq")))) "1584d21d4rcpryn8yfz0pjnjprk4zm367m0razdcz8cjbsh0dxp6"))))
(build-system python-build-system) (build-system python-build-system)
(arguments (arguments
'(#:phases (modify-phases %standard-phases '(#:phases
(add-before 'check 'do-not-override-PYTHONPATH (modify-phases %standard-phases
(lambda _ (add-after 'unpack 'chdir
;; Append to PYTHONPATH instead of overriding it so (lambda _ (chdir "tests/cloudpickle_testpkg"))))))
;; that dependencies from Guix can be found. (home-page "https://github.com/cloudpipe/cloudpickle")
(substitute* "tests/testutils.py" (synopsis "Extended pickling support for Python objects")
(("env\\['PYTHONPATH'\\] = pythonpath") (description
"env['PYTHONPATH'] += os.pathsep + pythonpath")) "Cloudpickle makes it possible to serialize Python constructs not
#t)) supported by the default pickle module from the Python standard library. It
(replace 'check is especially useful for cluster computing where Python expressions are
(lambda* (#:key tests? #:allow-other-keys) shipped over the network to execute on remote hosts, possibly close to the
(if tests? data.")
(invoke "pytest" "-s" "-vv") (license license:bsd-3)))
(format #t "test suite not run~%"))
#t))))) (define-public python-cloudpickle
(package
(inherit python-cloudpickle-testpkg)
(name "python-cloudpickle")
(build-system python-build-system)
(arguments
'(#:phases
(modify-phases %standard-phases
(add-before 'check 'do-not-override-PYTHONPATH
(lambda _
;; Append to PYTHONPATH instead of overriding it so
;; that dependencies from Guix can be found.
(substitute* "tests/testutils.py"
(("env\\['PYTHONPATH'\\] = pythonpath")
"env['PYTHONPATH'] += os.pathsep + pythonpath"))))
(replace 'check
(lambda* (#:key tests? #:allow-other-keys)
(if tests?
(invoke "pytest" "-s" "-vv")
(format #t "test suite not run~%")))))))
(native-inputs (native-inputs
`(;; For tests. `(;; For tests.
("python-cloudpickle-testpkg" ,python-cloudpickle-testpkg)
("python-psutil" ,python-psutil) ("python-psutil" ,python-psutil)
("python-pytest" ,python-pytest) ("python-pytest" ,python-pytest)
("python-tornado" ,python-tornado))) ("python-tornado" ,python-tornado-6)))
(home-page "https://github.com/cloudpipe/cloudpickle") (home-page "https://github.com/cloudpipe/cloudpickle")
(synopsis "Extended pickling support for Python objects") (synopsis "Extended pickling support for Python objects")
(description (description