From e493c8406cc514801941ed0f116562e2989c1d7b Mon Sep 17 00:00:00 2001 From: Alexander Ried Date: Sat, 1 Oct 2016 16:52:28 +0200 Subject: [PATCH 1/3] Revert "pep8: replaced by pycodestyle (package was renamed)" This reverts commit 0986a17edada11da1a910e2a015a4c57ad1279f2. ---- pycodestyle and pep8 are not api compatible so the alias adds little value. Packages that are compatible with pycodestyle should be updated to use the new version on a per package basis. --- pkgs/top-level/python-packages.nix | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 121583f6a04b..f3950406f645 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -10537,8 +10537,6 @@ in modules // { }; }; - pep8 = self.pycodestyle; - flake8 = buildPythonPackage rec { name = "flake8-${version}"; version = "3.0.4"; @@ -17601,6 +17599,23 @@ 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 14510fdc73f7a54a4da9d45c48ab36cc6c1128fe Mon Sep 17 00:00:00 2001 From: Alexander Ried Date: Sat, 1 Oct 2016 18:04:21 +0200 Subject: [PATCH 2/3] Revert "flake8: 2.5.4 -> 3.0.4" This reverts commit 7026cdf9e9d0d221534238023b7efbf1f04547a5. This reverts commit 0675eb1b5d82e986589e3fc6ed5ebf1b798c0e7e. This reverts commit 3c88d3a9c4224801ba4ae34abac0a8d342640795. --- flake8 versions 2 and 3 are api incompatible and this update breaks stuff. Version 3 should be added as a seperate expression and compatible packages should use it explicitly. --- .../move-pytest-config-to-pytest-ini.patch | 22 ------------------- pkgs/top-level/python-packages.nix | 17 ++++---------- 2 files changed, 4 insertions(+), 35 deletions(-) delete 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 deleted file mode 100644 index d75d8e7bd0ad..000000000000 --- a/pkgs/development/python-modules/flake8/move-pytest-config-to-pytest-ini.patch +++ /dev/null @@ -1,22 +0,0 @@ -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 diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index f3950406f645..641127ca40bd 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -10539,24 +10539,15 @@ in modules // { flake8 = buildPythonPackage rec { name = "flake8-${version}"; - version = "3.0.4"; + version = "2.5.4"; src = pkgs.fetchurl { url = "mirror://pypi/f/flake8/${name}.tar.gz"; - sha256 = "03cpdrjxh0fyi2qpdxbbrmxw7whiq3xr3p958gr6yzghk34i1hml"; + sha256 = "0bs9cz4fr99r2rwig1b8jwaadl1nan7kgpdzqwj0bwbckwbmh7nc"; }; - buildInputs = with self; [ nose mock pytestrunner pytest ]; - 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 - ''; + buildInputs = with self; [ nose mock ]; + propagatedBuildInputs = with self; [ pyflakes pep8 mccabe ]; meta = { description = "Code checking using pep8 and pyflakes"; From 0f63f35d6a04d35c3fa66057b38b941880d8e685 Mon Sep 17 00:00:00 2001 From: Martin Bornhold Date: Fri, 30 Sep 2016 13:31:30 +0200 Subject: [PATCH 3/3] flake8_3: init at 3.0.4 (cherry picked from commit 7026cdf9e9d0d221534238023b7efbf1f04547a5) (cherry picked from commit 0675eb1b5d82e986589e3fc6ed5ebf1b798c0e7e) (cherry picked from commit 3c88d3a9c4224801ba4ae34abac0a8d342640795) --- initializes a new version of flake8 as a seperate expression. Signed-off-by: Alexander Ried --- .../move-pytest-config-to-pytest-ini.patch | 22 ++++++++++++++ pkgs/top-level/python-packages.nix | 29 +++++++++++++++++++ 2 files changed, 51 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 000000000000..d75d8e7bd0ad --- /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 diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 641127ca40bd..16076d8f562f 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -10557,6 +10557,35 @@ in modules // { }; }; + flake8_3 = buildPythonPackage rec { + name = "flake8-${version}"; + version = "3.0.4"; + + src = pkgs.fetchurl { + url = "mirror://pypi/f/flake8/${name}.tar.gz"; + sha256 = "03cpdrjxh0fyi2qpdxbbrmxw7whiq3xr3p958gr6yzghk34i1hml"; + }; + + buildInputs = with self; [ nose mock pytestrunner pytest ]; + propagatedBuildInputs = with self; [ pyflakes 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"; + homepage = http://pypi.python.org/pypi/flake8; + license = licenses.mit; + maintainers = with maintainers; [ ]; + }; + }; + flaky = buildPythonPackage rec { name = "flaky-${version}"; version = "3.1.0";