gnu: python-flake8: Update to 3.4.1.

* gnu/packages/python.scm (python-flake8): Update to 3.4.1.
[source]: Remove obsolete snippet.
[arguments]: Override 'check' phase.
[propagated-inputs]: Remove PYTHON-PEP8. Add PYTHON-PYCODESTYLE and
PYTHON-SETUPTOOLS.
[native-inputs]: Change PYTHON-MOCK to PYTHON-MOCK-2. Remove PYTHON-NOSE. Add
PYTHON-PYTEST-BOOTSTRAP and PYTHON-PYTEST-RUNNER.
[properties]: Declare python2 variant.
* gnu/packages/python.scm (python-flake8)[propagated-inputs]: Add PYTHON2-ENUM
and PYTHON2-CONFIGPARSER.
This commit is contained in:
Marius Bakke 2017-07-31 01:47:46 +02:00
parent a6c6a59faf
commit a0fd9a3ca9
No known key found for this signature in database
GPG Key ID: A2A06DF2A33A54FA
1 changed files with 23 additions and 14 deletions

View File

@ -7106,39 +7106,48 @@ complexity of Python source code.")
(define-public python-flake8 (define-public python-flake8
(package (package
(name "python-flake8") (name "python-flake8")
(version "2.5.4") (version "3.4.1")
(source (source
(origin (origin
(method url-fetch) (method url-fetch)
(uri (pypi-uri "flake8" version)) (uri (pypi-uri "flake8" version))
(sha256 (sha256
(base32 (base32
"0bs9cz4fr99r2rwig1b8jwaadl1nan7kgpdzqwj0bwbckwbmh7nc")) "1n0i38592vy3q0x2a9bf8z6rhhn04i30wsn5i5zzcj7qkxvl8062"))))
(modules '((guix build utils)))
(snippet
'(begin
;; Remove pre-compiled .pyc files from source.
(for-each delete-file-recursively
(find-files "." "__pycache__" #:directories? #t))
(for-each delete-file (find-files "." "\\.pyc$"))
#t))))
(build-system python-build-system) (build-system python-build-system)
(arguments
`(#:phases
(modify-phases %standard-phases
(delete 'check)
(add-after 'install 'check
(lambda* (#:key inputs outputs #:allow-other-keys)
(add-installed-pythonpath inputs outputs)
(zero? (system* "pytest" "-v")))))))
(propagated-inputs (propagated-inputs
`(("python-pep8" ,python-pep8) `(("python-pycodestyle" ,python-pycodestyle)
("python-pyflakes" ,python-pyflakes) ("python-pyflakes" ,python-pyflakes)
;; flake8 depends on a newer setuptools than provided by python.
("python-setuptools" ,python-setuptools)
("python-mccabe" ,python-mccabe))) ("python-mccabe" ,python-mccabe)))
(native-inputs (native-inputs
`(("python-mock" ,python-mock) ; TODO: only required for < 3.3 `(("python-mock" ,python-mock-2) ; TODO: only required for < 3.3
("python-nose" ,python-nose))) ("python-pytest" ,python-pytest-bootstrap)
("python-pytest-runner" ,python-pytest-runner)))
(home-page "https://gitlab.com/pycqa/flake8") (home-page "https://gitlab.com/pycqa/flake8")
(synopsis (synopsis
"The modular source code checker: pep8, pyflakes and co") "The modular source code checker: pep8, pyflakes and co")
(description (description
"Flake8 is a wrapper around PyFlakes, pep8 and python-mccabe.") "Flake8 is a wrapper around PyFlakes, pep8 and python-mccabe.")
(properties `((python2-variant . ,(delay python2-flake8))))
(license license:expat))) (license license:expat)))
(define-public python2-flake8 (define-public python2-flake8
(package-with-python2 python-flake8)) (let ((base (package-with-python2 (strip-python2-variant python-flake8))))
(package (inherit base)
(propagated-inputs
`(("python2-configparser" ,python2-configparser)
("python2-enum" ,python2-enum)
,@(package-propagated-inputs base))))))
(define-public python-flake8-polyfill (define-public python-flake8-polyfill
(package (package