gnu: python-astroid: Update to 2.0.4.
* gnu/packages/python.scm (python-astroid): Update to 2.0.4. [source]: Switch to pypi source. [native-inputs]: Add python-dateutil, python-nose, python-pytest, python-pytest-runner. [arguments]: Add phase to remove spurious test failure. Update custom 'check phase. (python2-astroid): Update to 1.6.5. [source]: Use pypi source. [arguments]: Add phase to remove spurious test failure.
This commit is contained in:
parent
4f70db97a0
commit
4e94cdb652
|
@ -11361,28 +11361,37 @@ clone, while other processes access the original tree.")
|
||||||
(define-public python-astroid
|
(define-public python-astroid
|
||||||
(package
|
(package
|
||||||
(name "python-astroid")
|
(name "python-astroid")
|
||||||
(version "1.5.3")
|
(version "2.0.4")
|
||||||
(source
|
(source
|
||||||
(origin
|
(origin
|
||||||
(method url-fetch)
|
(method url-fetch)
|
||||||
(uri (string-append
|
(uri (pypi-uri "astroid" version))
|
||||||
"https://github.com/PyCQA/astroid/archive/astroid-"
|
|
||||||
version ".tar.gz"))
|
|
||||||
(sha256
|
(sha256
|
||||||
(base32
|
(base32
|
||||||
"0isn5p7f9n48hmksgbrj7dkm9dyglnayzn5jngk37qywg8a74ngn"))))
|
"138svbm88w5k0y2nvl4svyas1jfhcc5iy0d2ywkbcpn9kq8ks0f7"))))
|
||||||
(build-system python-build-system)
|
(build-system python-build-system)
|
||||||
(propagated-inputs
|
(propagated-inputs
|
||||||
`(("python-lazy-object-proxy" ,python-lazy-object-proxy)
|
`(("python-lazy-object-proxy" ,python-lazy-object-proxy)
|
||||||
("python-six" ,python-six)
|
("python-six" ,python-six)
|
||||||
("python-wrapt" ,python-wrapt)))
|
("python-wrapt" ,python-wrapt)))
|
||||||
|
(native-inputs
|
||||||
|
`(("python-dateutil" ,python-dateutil)
|
||||||
|
("python-nose" ,python-nose)
|
||||||
|
("python-pytest" ,python-pytest)
|
||||||
|
("python-pytest-runner" ,python-pytest-runner)))
|
||||||
(arguments
|
(arguments
|
||||||
`(#:phases
|
`(#:phases
|
||||||
(modify-phases %standard-phases
|
(modify-phases %standard-phases
|
||||||
|
(add-after 'unpack 'remove-spurious-test
|
||||||
|
(lambda _
|
||||||
|
;; This can be removed after upgrading from python-3.7
|
||||||
|
;; https://github.com/PyCQA/astroid/issues/593
|
||||||
|
;; https://bugs.python.org/issue34056
|
||||||
|
(delete-file "astroid/tests/unittest_modutils.py")
|
||||||
|
#t))
|
||||||
(replace 'check
|
(replace 'check
|
||||||
(lambda _
|
(lambda _
|
||||||
(zero? (system* "python" "-m" "unittest" "discover"
|
(invoke "pytest" "astroid"))))))
|
||||||
"-p" "unittest*.py")))))))
|
|
||||||
(home-page "https://github.com/PyCQA/astroid")
|
(home-page "https://github.com/PyCQA/astroid")
|
||||||
(synopsis "Common base representation of python source code for pylint and
|
(synopsis "Common base representation of python source code for pylint and
|
||||||
other projects")
|
other projects")
|
||||||
|
@ -11402,12 +11411,35 @@ builds partial trees by inspecting living objects.")
|
||||||
(let ((base (package-with-python2
|
(let ((base (package-with-python2
|
||||||
(strip-python2-variant python-astroid))))
|
(strip-python2-variant python-astroid))))
|
||||||
(package (inherit base)
|
(package (inherit base)
|
||||||
(propagated-inputs
|
;; Version 2.x removes python2 support.
|
||||||
`(("python2-backports-functools-lru-cache"
|
(version "1.6.5")
|
||||||
,python2-backports-functools-lru-cache)
|
(source
|
||||||
("python2-enum34" ,python2-enum34)
|
(origin
|
||||||
("python2-singledispatch" ,python2-singledispatch)
|
(method url-fetch)
|
||||||
,@(package-propagated-inputs base))))))
|
(uri (pypi-uri "astroid" version))
|
||||||
|
(sha256
|
||||||
|
(base32
|
||||||
|
"0fir4b67sm7shcacah9n61pvq313m523jb4q80sycrh3p8nmi6zw"))))
|
||||||
|
(arguments
|
||||||
|
(substitute-keyword-arguments (package-arguments base)
|
||||||
|
((#:phases phases)
|
||||||
|
`(modify-phases ,phases
|
||||||
|
(add-after 'unpack 'remove-spurious-test
|
||||||
|
(lambda _
|
||||||
|
;; https://github.com/PyCQA/astroid/issues/276
|
||||||
|
(delete-file "astroid/tests/unittest_brain.py")
|
||||||
|
#t))
|
||||||
|
(replace 'check
|
||||||
|
(lambda _
|
||||||
|
(invoke"python" "-m" "unittest" "discover"
|
||||||
|
"-p" "unittest*.py")))))))
|
||||||
|
(native-inputs `())
|
||||||
|
(propagated-inputs
|
||||||
|
`(("python2-backports-functools-lru-cache"
|
||||||
|
,python2-backports-functools-lru-cache)
|
||||||
|
("python2-enum34" ,python2-enum34)
|
||||||
|
("python2-singledispatch" ,python2-singledispatch)
|
||||||
|
,@(package-propagated-inputs base))))))
|
||||||
|
|
||||||
(define-public python-isort
|
(define-public python-isort
|
||||||
(package
|
(package
|
||||||
|
|
Loading…
Reference in New Issue