Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at 21.05 33 lines 1.1 kB view raw
1{ lib, buildPythonPackage, fetchPypi, pythonOlder 2, mock, pytest, pytestrunner 3, configparser, enum34, mccabe, pycodestyle, pyflakes, functools32, typing ? null, importlib-metadata 4}: 5 6buildPythonPackage rec { 7 pname = "flake8"; 8 version = "3.9.0"; 9 10 src = fetchPypi { 11 inherit pname version; 12 sha256 = "78873e372b12b093da7b5e5ed302e8ad9e988b38b063b61ad937f26ca58fc5f0"; 13 }; 14 15 checkInputs = [ pytest mock pytestrunner ]; 16 propagatedBuildInputs = [ pyflakes pycodestyle mccabe ] 17 ++ lib.optionals (pythonOlder "3.2") [ configparser functools32 ] 18 ++ lib.optionals (pythonOlder "3.4") [ enum34 ] 19 ++ lib.optionals (pythonOlder "3.5") [ typing ] 20 ++ lib.optionals (pythonOlder "3.8") [ importlib-metadata ]; 21 22 # fixtures fail to initialize correctly 23 checkPhase = '' 24 py.test tests --ignore=tests/integration/test_checker.py 25 ''; 26 27 meta = with lib; { 28 description = "Code checking using pep8 and pyflakes"; 29 homepage = "https://pypi.python.org/pypi/flake8"; 30 license = licenses.mit; 31 maintainers = with maintainers; [ ]; 32 }; 33}