gnu: python-hacking: Update to 4.0.0.

Fixes <https://issues.guix.gnu.org/39871>.

* gnu/packages/openstack.scm (python-hacking): Update to 4.0.0.
[arguments]: Remove field.
[propagated-inputs]: Remove python-flake8-2.6, python-mccabe-0.2.1, python-pbr,
python-pep8-1.5.7, python-pyflakes-1.2, python-six.  Add python-flake8.
[native-inputs]: Remove python-reno and python-testrepository.  Add
python-coverage, python-ddt, python-dnspython, python-fixtures,
python-monotonic, python-subunit, python-stestr and python-testtools.
(python2-hacking): Remove variable.
* gnu/packages/python-xyz.scm (python-pyflakes-1.2)
(python-mccabe-0.2.1, python2-mccabe-0.2.1)
(python-pep8-1.5.7, python2-pep8-1.5.7)
(python-flake8-2.6): Delete variables.
This commit is contained in:
Maxim Cournoyer 2020-11-18 16:14:15 -05:00
parent e8d1637be3
commit 226b2af51a
No known key found for this signature in database
GPG key ID: 1260E46482E63562
2 changed files with 15 additions and 113 deletions

View file

@ -5,6 +5,7 @@
;;; Copyright © 2018, 2019 Tobias Geerinckx-Rice <me@tobias.gr> ;;; Copyright © 2018, 2019 Tobias Geerinckx-Rice <me@tobias.gr>
;;; Copyright © 2018 Marius Bakke <mbakke@fastmail.com> ;;; Copyright © 2018 Marius Bakke <mbakke@fastmail.com>
;;; Copyright © 2020 Ricardo Wurmus <rekado@elephly.net> ;;; Copyright © 2020 Ricardo Wurmus <rekado@elephly.net>
;;; Copyright © 2020 Maxim Cournoyer <maxim.cournoyer@gmail.com>
;;; ;;;
;;; This file is part of GNU Guix. ;;; This file is part of GNU Guix.
;;; ;;;
@ -26,6 +27,7 @@ (define-module (gnu packages openstack)
#:use-module (gnu packages check) #:use-module (gnu packages check)
#:use-module (gnu packages gnupg) #:use-module (gnu packages gnupg)
#:use-module (gnu packages python) #:use-module (gnu packages python)
#:use-module (gnu packages python-check)
#:use-module (gnu packages python-crypto) #:use-module (gnu packages python-crypto)
#:use-module (gnu packages python-web) #:use-module (gnu packages python-web)
#:use-module (gnu packages python-xyz) #:use-module (gnu packages python-xyz)
@ -148,39 +150,30 @@ (define-public python2-debtcollector
(define-public python-hacking (define-public python-hacking
(package (package
(name "python-hacking") (name "python-hacking")
(version "1.1.0") (version "4.0.0")
(source (source
(origin (origin
(method url-fetch) (method url-fetch)
(uri (pypi-uri "hacking" version)) (uri (pypi-uri "hacking" version))
(sha256 (sha256
(base32 (base32
"1vlgh81v4vsw3q3cf7qggsp043vq16knp203lrll82h7l7rhd8r3")))) "062rvbkvbavqqz55f7q00ikwipkn5j0rdls1rrajdbfwgckjcrsm"))))
(build-system python-build-system) (build-system python-build-system)
(arguments (propagated-inputs
`(#:phases `(("python-flake8" ,python-flake8)))
(modify-phases %standard-phases
(add-after 'unpack 'delete-broken-test
(lambda _
;; TODO: Just one test fails:
;; hacking.tests.test_doctest.HackingTestCase.test_pycodestyle
;; (H403-hacking_docstring_multiline_end-line-5)
(delete-file "hacking/tests/test_doctest.py")
#t)))))
(propagated-inputs
`(("python-flake8" ,python-flake8-2.6)
("python-mccabe-0.2.1" ,python-mccabe-0.2.1)
("python-pbr" ,python-pbr)
("python-pep8-1.5.7" ,python-pep8-1.5.7)
("python-pyflakes-1.2" ,python-pyflakes-1.2)
("python-six" ,python-six)))
(native-inputs (native-inputs
`( ;; Tests `( ;; Tests
("python-coverage" ,python-coverage)
("python-ddt" ,python-ddt)
("python-dnspython" ,python-dnspython)
("python-fixtures" ,python-fixtures)
("python-eventlet" ,python-eventlet) ("python-eventlet" ,python-eventlet)
("python-mock" ,python-mock) ("python-mock" ,python-mock)
("python-reno" ,python-reno) ("python-monotonic" ,python-monotonic)
("python-testrepository" ,python-testrepository) ("python-subunit" ,python-subunit)
("python-testscenarios" ,python-testscenarios))) ("python-stestr" ,python-stestr)
("python-testscenarios" ,python-testscenarios)
("python-testtools" ,python-testtools)))
(home-page "https://github.com/openstack-dev/hacking") (home-page "https://github.com/openstack-dev/hacking")
(synopsis "OpenStack hacking guideline enforcement") (synopsis "OpenStack hacking guideline enforcement")
(description (description
@ -189,9 +182,6 @@ (define-public python-hacking
guidelines}.") guidelines}.")
(license asl2.0))) (license asl2.0)))
(define-public python2-hacking
(package-with-python2 python-hacking))
(define-public python-mox3 (define-public python-mox3
(package (package
(name "python-mox3") (name "python-mox3")

View file

@ -8137,27 +8137,6 @@ (define-public python-pyflakes
(define-public python2-pyflakes (define-public python2-pyflakes
(package-with-python2 python-pyflakes)) (package-with-python2 python-pyflakes))
;; Flake8 2.6 requires an older version of pyflakes.
;; This should be removed ASAP.
(define-public python-pyflakes-1.2
(package (inherit python-pyflakes)
(version "1.2.3")
(source
(origin
(method url-fetch)
(uri (pypi-uri "pyflakes" version))
(sha256
(base32
"17hkw8yd44cr8fz13phy4aih3r5j2p7ild4zlvqdh2c8dmiinjif"))))
(arguments
'(#:phases
(modify-phases %standard-phases
;; This one test fails.
(replace 'check
(lambda _ (invoke "pytest" "-vv" "-k" "not test_f_string"))))))
(native-inputs
`(("python-pytest" ,python-pytest)))))
(define-public python-mccabe (define-public python-mccabe
(package (package
(name "python-mccabe") (name "python-mccabe")
@ -8183,39 +8162,6 @@ (define-public python-mccabe
(define-public python2-mccabe (define-public python2-mccabe
(package-with-python2 python-mccabe)) (package-with-python2 python-mccabe))
(define-public python-mccabe-0.2.1
(package (inherit python-mccabe)
(version "0.2.1")
(source
(origin
(method url-fetch)
(uri (pypi-uri "mccabe" version))
(sha256
(base32
"0fi4a81kr5bcv5p4xgibqr595hyj5dafkqgsmfk96mfy8w71fajs"))))))
(define-public python2-mccabe-0.2.1
(package-with-python2 python-mccabe-0.2.1))
;; Flake8 2.4.1 requires an older version of pep8.
;; This should be removed ASAP.
(define-public python-pep8-1.5.7
(package (inherit python-pep8)
(version "1.5.7")
(source
(origin
(method url-fetch)
(uri (pypi-uri "pep8" version))
(sha256
(base32
"12b9bbdbwnspxgak14xg58c130x2n0blxzlms5jn2dszn8qj3d0m"))))
(arguments
;; XXX Tests not compatible with Python 3.5.
'(#:tests? #f))))
(define-public python2-pep8-1.5.7
(package-with-python2 python-pep8-1.5.7))
(define-public python-flake8 (define-public python-flake8
(package (package
(name "python-flake8") (name "python-flake8")
@ -8262,40 +8208,6 @@ (define-public python2-flake8
("python2-typing" ,python2-typing) ("python2-typing" ,python2-typing)
,@(package-propagated-inputs base)))))) ,@(package-propagated-inputs base))))))
;; python-hacking requires flake8 <2.7.0.
(define-public python-flake8-2.6
(package
(inherit python-flake8)
(version "2.6.2")
(source (origin
(method url-fetch)
(uri (pypi-uri "flake8" version))
(sha256
(base32
"0y57hzal0j84dh9i1g1g6dc4aywvrnhy2fjmmbglpv5ajihxh713"))))
(arguments
`(#:phases
(modify-phases %standard-phases
(add-after 'unpack 'use-later-pycodestyles
(lambda __
(substitute* '("flake8.egg-info/requires.txt"
"setup.py")
(("pycodestyle >= 2.0, < 2.1")
"pycodestyle >= 2.0"))
#t))
(delete 'check)
(add-after 'install 'check
(lambda* (#:key inputs outputs #:allow-other-keys)
(add-installed-pythonpath inputs outputs)
(invoke "pytest" "-v")
#t)))))
(propagated-inputs
`(("python-pep8" ,python-pep8)
("python-pycodestyle" ,python-pycodestyle)
("python-entrypoints" ,python-entrypoints)
("python-pyflakes" ,python-pyflakes-1.2)
("python-mccabe" ,python-mccabe)))))
(define-public python-flake8-bugbear (define-public python-flake8-bugbear
(package (package
(name "python-flake8-bugbear") (name "python-flake8-bugbear")