From d3aefc6576b75dae65cc889c9c4561bec5c8cbe8 Mon Sep 17 00:00:00 2001 From: Martin Bornhold Date: Fri, 30 Sep 2016 13:26:23 +0200 Subject: [PATCH 1/6] pycodestyle: init at 2.0.0 --- pkgs/top-level/python-packages.nix | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 17f8704c799..aaafc47aa68 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -10489,6 +10489,23 @@ in modules // { }; }; + pycodestyle = buildPythonPackage rec { + name = "pycodestyle-${version}"; + version = "2.0.0"; + + src = pkgs.fetchurl { + url = "mirror://pypi/p/pycodestyle/${name}.tar.gz"; + sha256 = "1rz2v8506mdjdyxcnv9ygiw6v0d4dqx8z5sjyjm0w2v32h5l5w1p"; + }; + + meta = { + description = "Python style guide checker (formerly called pep8)"; + homepage = https://pycodestyle.readthedocs.io; + license = licenses.mit; + maintainers = with maintainers; [ garbas ]; + }; + }; + flake8 = buildPythonPackage rec { name = "flake8-${version}"; version = "2.5.4"; From 0986a17edada11da1a910e2a015a4c57ad1279f2 Mon Sep 17 00:00:00 2001 From: Martin Bornhold Date: Fri, 30 Sep 2016 13:28:02 +0200 Subject: [PATCH 2/6] pep8: replaced by pycodestyle (package was renamed) --- pkgs/top-level/python-packages.nix | 19 ++----------------- 1 file changed, 2 insertions(+), 17 deletions(-) diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index aaafc47aa68..047885bd856 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -10506,6 +10506,8 @@ in modules // { }; }; + pep8 = self.pycodestyle; + flake8 = buildPythonPackage rec { name = "flake8-${version}"; version = "2.5.4"; @@ -17568,23 +17570,6 @@ in modules // { }; }; - pep8 = buildPythonPackage rec { - name = "pep8-${version}"; - version = "1.7.0"; - - src = pkgs.fetchurl { - url = "mirror://pypi/p/pep8/${name}.tar.gz"; - sha256 = "a113d5f5ad7a7abacef9df5ec3f2af23a20a28005921577b15dd584d099d5900"; - }; - - meta = { - homepage = "http://pep8.readthedocs.org/"; - description = "Python style guide checker"; - license = licenses.mit; - maintainers = with maintainers; [ garbas ]; - }; - }; - pep257 = buildPythonPackage rec { name = "pep257-${version}"; version = "0.3.2"; From 532869cee2de2e3e3e9bccaaf52cfd0ba298ceaf Mon Sep 17 00:00:00 2001 From: Martin Bornhold Date: Fri, 30 Sep 2016 13:30:55 +0200 Subject: [PATCH 3/6] mccabe: 0.4.0 -> 0.5.2 --- pkgs/top-level/python-packages.nix | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 047885bd856..a577dcafd37 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -13414,22 +13414,13 @@ in modules // { mccabe = buildPythonPackage (rec { - name = "mccabe-0.4.0"; + name = "mccabe-0.5.2"; src = pkgs.fetchurl { url = "mirror://pypi/m/mccabe/${name}.tar.gz"; - sha256 = "0yr08a36h8lqlif10l4xcikbbig7q8f41gqywir7rrvnv3mi4aws"; + sha256 = "1zss8c5cn8wvxsbjzv70dxymybh3cjzrjl19vxfbnyvmidng0wrl"; }; - # See https://github.com/flintwork/mccabe/issues/31 - postPatch = '' - cp "${pkgs.fetchurl { - url = "https://raw.githubusercontent.com/flintwork/mccabe/" - + "e8aea16d28e92bd3c62601275762fc9c16808f6c/test_mccabe.py"; - sha256 = "0xhjxpnaxvbpi4myj9byrban7a5nrw931br9sgvfk42ayg4sn6lm"; - }}" test_mccabe.py - ''; - buildInputs = with self; [ pytestrunner pytest ]; meta = { From 7026cdf9e9d0d221534238023b7efbf1f04547a5 Mon Sep 17 00:00:00 2001 From: Martin Bornhold Date: Fri, 30 Sep 2016 13:31:30 +0200 Subject: [PATCH 4/6] flake8: 2.5.4 -> 3.0.4 --- pkgs/top-level/python-packages.nix | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index a577dcafd37..cbc5a83626c 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -10510,15 +10510,24 @@ in modules // { flake8 = buildPythonPackage rec { name = "flake8-${version}"; - version = "2.5.4"; + version = "3.0.4"; src = pkgs.fetchurl { url = "mirror://pypi/f/flake8/${name}.tar.gz"; - sha256 = "0bs9cz4fr99r2rwig1b8jwaadl1nan7kgpdzqwj0bwbckwbmh7nc"; + sha256 = "03cpdrjxh0fyi2qpdxbbrmxw7whiq3xr3p958gr6yzghk34i1hml"; }; buildInputs = with self; [ nose mock ]; - propagatedBuildInputs = with self; [ pyflakes pep8 mccabe ]; + propagatedBuildInputs = with self; [ pyflakes pep8 mccabe enum34 configparser pycodestyle ]; + + patches = [ + ../development/python-modules/flake8/move-pytest-config-to-pytest-ini.patch + ]; + + # Tests fail due to missing ini file. + preCheck = '' + touch tox.ini + ''; meta = { description = "Code checking using pep8 and pyflakes"; From 3c88d3a9c4224801ba4ae34abac0a8d342640795 Mon Sep 17 00:00:00 2001 From: Martin Bornhold Date: Fri, 30 Sep 2016 13:32:56 +0200 Subject: [PATCH 5/6] flake8: add patch to avoind pytest config conflict --- .../move-pytest-config-to-pytest-ini.patch | 22 +++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 pkgs/development/python-modules/flake8/move-pytest-config-to-pytest-ini.patch diff --git a/pkgs/development/python-modules/flake8/move-pytest-config-to-pytest-ini.patch b/pkgs/development/python-modules/flake8/move-pytest-config-to-pytest-ini.patch new file mode 100644 index 00000000000..d75d8e7bd0a --- /dev/null +++ b/pkgs/development/python-modules/flake8/move-pytest-config-to-pytest-ini.patch @@ -0,0 +1,22 @@ +diff -r ad8325924f04 pytest.ini +--- /dev/null Thu Jan 01 00:00:00 1970 +0000 ++++ b/pytest.ini Fri Sep 30 12:28:39 2016 +0200 +@@ -0,0 +1,4 @@ ++[pytest] ++-norecursedirs = .git .* *.egg* old docs dist build ++-addopts = -rwv ++ +diff -r ad8325924f04 setup.cfg +--- a/setup.cfg Fri Sep 30 09:22:39 2016 +0200 ++++ b/setup.cfg Fri Sep 30 12:28:39 2016 +0200 +@@ -12,10 +12,6 @@ + pycodestyle >= 2.0.0, < 2.1.0 + mccabe >= 0.5.0, < 0.6.0 + +-[pytest] +-norecursedirs = .git .* *.egg* old docs dist build +-addopts = -rw +- + [egg_info] + tag_build = + tag_date = 0 From 0675eb1b5d82e986589e3fc6ed5ebf1b798c0e7e Mon Sep 17 00:00:00 2001 From: Martin Bornhold Date: Fri, 30 Sep 2016 15:19:22 +0200 Subject: [PATCH 6/6] flake8: Add missing test dependencies. --- pkgs/top-level/python-packages.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index cbc5a83626c..0e69b4e5a57 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -10517,7 +10517,7 @@ in modules // { sha256 = "03cpdrjxh0fyi2qpdxbbrmxw7whiq3xr3p958gr6yzghk34i1hml"; }; - buildInputs = with self; [ nose mock ]; + buildInputs = with self; [ nose mock pytestrunner pytest ]; propagatedBuildInputs = with self; [ pyflakes pep8 mccabe enum34 configparser pycodestyle ]; patches = [