From 4909c56b69295e12f4973f4fe96467d768b4a851 Mon Sep 17 00:00:00 2001 From: Damien Cassou Date: Mon, 14 Mar 2016 07:29:54 +0100 Subject: [PATCH] hypothesis: init at 3.1.0 --- pkgs/top-level/python-packages.nix | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 5b74146330a..5d9b88fb9e3 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -10066,6 +10066,35 @@ in modules // { }; }; + hypothesis = buildPythonPackage rec { + # http://hypothesis.readthedocs.org/en/latest/packaging.html + + name = "hypothesis-${version}"; + version = "3.1.0"; + + # Upstream prefers github tarballs + src = pkgs.fetchFromGitHub { + owner = "DRMacIver"; + repo = "hypothesis"; + rev = "${version}"; + sha256 = "1fhdb2vwc4blas5fvcly6pmha8psqm4bhi67jz32ypjryzk09iyf"; + }; + + buildInputs = with self; [ flake8 pytest flaky ]; + propagatedBuildInputs = with self; ([ pytz fake_factory django numpy ] ++ optionals isPy27 [ enum34 modules.sqlite3 ]); + + # https://github.com/DRMacIver/hypothesis/issues/300 + checkPhase = '' + ${python.interpreter} -m pytest tests/cover + ''; + + meta = { + description = "A Python library for property based testing"; + homepage = https://github.com/DRMacIver/hypothesis; + license = licenses.mpl20; + }; + }; + httpretty = buildPythonPackage rec { name = "httpretty-${version}"; version = "0.8.6";