From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55985) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dcGz4-0000M3-F0 for guix-patches@gnu.org; Mon, 31 Jul 2017 16:08:11 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dcGz3-0001ke-BR for guix-patches@gnu.org; Mon, 31 Jul 2017 16:08:10 -0400 Received: from debbugs.gnu.org ([208.118.235.43]:33077) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dcGz3-0001kV-7k for guix-patches@gnu.org; Mon, 31 Jul 2017 16:08:09 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1dcGz3-0004qB-3n for guix-patches@gnu.org; Mon, 31 Jul 2017 16:08:09 -0400 Subject: [bug#27888] [PATCH 12/18] gnu: python-flake8: Update to 3.4.1. Resent-Message-ID: From: Marius Bakke Date: Mon, 31 Jul 2017 22:07:29 +0200 Message-Id: <20170731200735.28019-12-mbakke@fastmail.com> In-Reply-To: <20170731200735.28019-1-mbakke@fastmail.com> References: <20170731200735.28019-1-mbakke@fastmail.com> List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: 27888@debbugs.gnu.org * 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. --- gnu/packages/python.scm | 41 +++++++++++++++++++++++++---------------- 1 file changed, 25 insertions(+), 16 deletions(-) diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm index 0d90d2017..a23d6aa1c 100644 --- a/gnu/packages/python.scm +++ b/gnu/packages/python.scm @@ -6831,39 +6831,48 @@ complexity of Python source code.") (define-public python-flake8 (package (name "python-flake8") - (version "2.5.4") + (version "3.4.1") (source (origin (method url-fetch) (uri (pypi-uri "flake8" version)) (sha256 (base32 - "0bs9cz4fr99r2rwig1b8jwaadl1nan7kgpdzqwj0bwbckwbmh7nc")) - (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) - (propagated-inputs - `(("python-pep8" ,python-pep8) + "1n0i38592vy3q0x2a9bf8z6rhhn04i30wsn5i5zzcj7qkxvl8062")))) + (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 + `(("python-pycodestyle" ,python-pycodestyle) ("python-pyflakes" ,python-pyflakes) + ;; flake8 depends on a newer setuptools than provided by python. + ("python-setuptools" ,python-setuptools) ("python-mccabe" ,python-mccabe))) (native-inputs - `(("python-mock" ,python-mock) ; TODO: only required for < 3.3 - ("python-nose" ,python-nose))) + `(("python-mock" ,python-mock-2) ; TODO: only required for < 3.3 + ("python-pytest" ,python-pytest-bootstrap) + ("python-pytest-runner" ,python-pytest-runner))) (home-page "https://gitlab.com/pycqa/flake8") (synopsis "The modular source code checker: pep8, pyflakes and co") (description "Flake8 is a wrapper around PyFlakes, pep8 and python-mccabe.") + (properties `((python2-variant . ,(delay python2-flake8)))) (license license:expat))) (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 (package -- 2.13.3