about summary refs log tree commit diff
path: root/pkgs
diff options
context:
space:
mode:
authorJörg Thalheim <joerg@higgsboson.tk>2016-09-30 15:46:18 +0200
committerGitHub <noreply@github.com>2016-09-30 15:46:18 +0200
commit4b55584dba3b65b48ba841811a6005a9ac0142ca (patch)
tree9699115bea70310d07dd373037cf4b07b6142d93 /pkgs
parent1ddc08a3ac88542acdc9e0d6061e5fd242d07f3e (diff)
parent0675eb1b5d82e986589e3fc6ed5ebf1b798c0e7e (diff)
downloadnixlib-4b55584dba3b65b48ba841811a6005a9ac0142ca.tar
nixlib-4b55584dba3b65b48ba841811a6005a9ac0142ca.tar.gz
nixlib-4b55584dba3b65b48ba841811a6005a9ac0142ca.tar.bz2
nixlib-4b55584dba3b65b48ba841811a6005a9ac0142ca.tar.lz
nixlib-4b55584dba3b65b48ba841811a6005a9ac0142ca.tar.xz
nixlib-4b55584dba3b65b48ba841811a6005a9ac0142ca.tar.zst
nixlib-4b55584dba3b65b48ba841811a6005a9ac0142ca.zip
Merge pull request #19104 from mbld/python-flake8-update
flake8: 2.5.4 -> 3.0.4
Diffstat (limited to 'pkgs')
-rw-r--r--pkgs/development/python-modules/flake8/move-pytest-config-to-pytest-ini.patch22
-rw-r--r--pkgs/top-level/python-packages.nix66
2 files changed, 56 insertions, 32 deletions
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 17f8704c7994..0e69b4e5a578 100644
--- a/pkgs/top-level/python-packages.nix
+++ b/pkgs/top-level/python-packages.nix
@@ -10489,17 +10489,45 @@ 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 ];
+    };
+  };
+
+  pep8 = self.pycodestyle;
+
   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 ];
+    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
+    '';
 
     meta = {
       description = "Code checking using pep8 and pyflakes";
@@ -13395,22 +13423,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 = {
@@ -17551,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";