diff options
Diffstat (limited to 'pkgs')
-rw-r--r-- | pkgs/development/python-modules/pytest-virtualenv/default.nix | 23 | ||||
-rw-r--r-- | pkgs/top-level/python-packages.nix | 20 |
2 files changed, 24 insertions, 19 deletions
diff --git a/pkgs/development/python-modules/pytest-virtualenv/default.nix b/pkgs/development/python-modules/pytest-virtualenv/default.nix new file mode 100644 index 000000000000..1338cbb153f3 --- /dev/null +++ b/pkgs/development/python-modules/pytest-virtualenv/default.nix @@ -0,0 +1,23 @@ +{ stdenv, buildPythonPackage, fetchPypi +, pytest, pytestcov, mock, cmdline, pytest-fixture-config, pytest-shutil }: + +buildPythonPackage rec { + pname = "pytest-virtualenv"; + version = "1.2.7"; + + src = fetchPypi { + inherit pname version; + sha256 = "0mb76zhlak4qjjq2h7kaxbihk1b9plmimbzcb8qv4906cxl69ysi"; + }; + + buildInputs = [ pytest pytestcov mock cmdline ]; + propagatedBuildInputs = [ pytest-fixture-config pytest-shutil ]; + checkPhase = '' py.test tests/unit ''; + + meta = with stdenv.lib; { + description = "Create a Python virtual environment in your test that cleans up on teardown. The fixture has utility methods to install packages and list what’s installed."; + homepage = https://github.com/manahl/pytest-plugins; + license = licenses.mit; + maintainers = with maintainers; [ ryansydnor ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index b033f3e30939..4cdaa7ffb466 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -1958,25 +1958,7 @@ in { pytest-expect = callPackage ../development/python-modules/pytest-expect { }; - pytest-virtualenv = buildPythonPackage rec { - name = "${pname}-${version}"; - pname = "pytest-virtualenv"; - version = "1.2.7"; - src = pkgs.fetchurl { - url = "mirror://pypi/p/${pname}/${name}.tar.gz"; - sha256 = "51fb6468670624b2315aecaf1a2bbd698509e3ea6a1e28b094984c45e1376755"; - }; - buildInputs = with self; [ pytest pytestcov mock cmdline ]; - propagatedBuildInputs = with self; [ pytest-fixture-config pytest-shutil ]; - checkPhase = '' py.test tests/unit ''; - meta = { - description = "Create a Python virtual environment in your test that cleans up on teardown. The fixture has utility methods to install packages and list what’s installed."; - homepage = https://github.com/manahl/pytest-plugins; - license = licenses.mit; - maintainers = with maintainers; [ ryansydnor ]; - platforms = platforms.all; - }; - }; + pytest-virtualenv = callPackage ../development/python-modules/pytest-virtualenv { }; pytest_xdist = callPackage ../development/python-modules/pytest-xdist { }; |