From f9beba2c06dd1df0bf5802d23197ddc876f75009 Mon Sep 17 00:00:00 2001 From: Elis Hirwing Date: Sun, 1 Apr 2018 14:12:43 +0200 Subject: [PATCH] pythonPackages.pytestpep8: Move to own file and add version --- .../python-modules/pytest-pep8/default.nix | 28 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 24 +--------------- 2 files changed, 29 insertions(+), 23 deletions(-) create mode 100644 pkgs/development/python-modules/pytest-pep8/default.nix diff --git a/pkgs/development/python-modules/pytest-pep8/default.nix b/pkgs/development/python-modules/pytest-pep8/default.nix new file mode 100644 index 000000000000..1fcb99574b2a --- /dev/null +++ b/pkgs/development/python-modules/pytest-pep8/default.nix @@ -0,0 +1,28 @@ +{ stdenv, buildPythonPackage, fetchPypi +, pytest, pytestcache, pep8 }: + +buildPythonPackage rec { + pname = "pytest-pep8"; + version = "1.0.6"; + + src = fetchPypi { + inherit pname version; + sha256 = "06032agzhw1i9d9qlhfblnl3dw5hcyxhagn7b120zhrszbjzfbh3"; + }; + + buildInputs = [ pytest ]; + propagatedBuildInputs = [ pytestcache pep8 ]; + + checkPhase = '' + py.test + ''; + + # Fails + doCheck = false; + + meta = with stdenv.lib; { + license = licenses.mit; + homepage = https://pypi.python.org/pypi/pytest-pep8; + description = "pytest plugin to check PEP8 requirements"; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 47691529ef2b..a6e09ba9ff40 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -1940,29 +1940,7 @@ in { pytest-warnings = callPackage ../development/python-modules/pytest-warnings { }; - pytestpep8 = buildPythonPackage rec { - name = "pytest-pep8"; - src = pkgs.fetchurl { - url = "mirror://pypi/p/pytest-pep8/pytest-pep8-1.0.6.tar.gz"; - sha256 = "06032agzhw1i9d9qlhfblnl3dw5hcyxhagn7b120zhrszbjzfbh3"; - }; - - buildInputs = with self; [ pytest ]; - propagatedBuildInputs = with self; [ pytestcache pep8 ]; - - checkPhase = '' - py.test - ''; - - # Fails - doCheck = false; - - meta = { - license = licenses.mit; - homepage = "https://pypi.python.org/pypi/pytest-pep8"; - description = "pytest plugin to check PEP8 requirements"; - }; - }; + pytestpep8 = callPackage ../development/python-modules/pytest-pep8 { }; pytest-pep257 = callPackage ../development/python-modules/pytest-pep257 { };