Merge pull request #148403 from elohmeier/py2-flake8
writers.makePythonWriter: disable flake8 checks for Python 2
commit46839e369055724029aedbb23b61a06770712a60
authorLassulus <github@lassul.us>
dateSun 5 Dec 2021, 10:51 (5 years ago)
parent71239df10c725d
pkgs/build-support/writers/default.nix+2−2
@@ -240,9 +240,9 @@ rec {
240240 then "${python}/bin/python"
241241 else "${python.withPackages (ps: libraries)}/bin/python"
242242 ;
243− check = writeDash "python2check.sh" ''
243+ check = optionalString python.isPy3k (writeDash "pythoncheck.sh" ''
244244 exec ${pythonPackages.flake8}/bin/flake8 --show-source ${ignoreAttribute} "$1"
245− '';
245+ '');
246246 } name;
247247
248248 # writePython2 takes a name an attributeset with libraries and some python2 sourcecode and
pkgs/development/python-modules/flake8/default.nix+2
@@ -51,6 +51,8 @@ buildPythonPackage rec {
5151 pytestCheckHook
5252 ];
5353
54+ disabled = pythonOlder "3.6";
55+
5456 meta = with lib; {
5557 description = "Flake8 is a wrapper around pyflakes, pycodestyle and mccabe.";
5658 homepage = "https://github.com/pycqa/flake8";