From 64633c2fffd0a2c7eb26d0a6162279adf73f09a0 Mon Sep 17 00:00:00 2001 From: Damien Cassou Date: Sun, 13 Mar 2016 08:19:04 +0100 Subject: [PATCH 1/3] hypothesis: rename before introducing v3 --- pkgs/top-level/python-packages.nix | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index ade98083aa38..53b816232320 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -2061,7 +2061,7 @@ in modules // { sha256 = "1j4f51dxic39mdwf6alj7gd769wy6mhk916v031wjali51xkh3xb"; }; - buildInputs = with self; [ hypothesis sqlite3 ]; + buildInputs = with self; [ hypothesis1 sqlite3 ]; propagatedBuildInputs = with self; [ chardet ]; @@ -3577,7 +3577,7 @@ in modules // { }; buildInputs = [ pkgs.openssl self.pretend self.cryptography_vectors - self.iso8601 self.pyasn1 self.pytest self.py self.hypothesis ] + self.iso8601 self.pyasn1 self.pytest self.py self.hypothesis1 ] ++ optional stdenv.isDarwin pkgs.darwin.apple_sdk.frameworks.Security; propagatedBuildInputs = with self; [ six idna ipaddress pyasn1 cffi pyasn1-modules modules.sqlite3 ] ++ optional (pythonOlder "3.4") self.enum34; @@ -6456,7 +6456,7 @@ in modules // { buildInputs = with self; [ - hypothesis + hypothesis1 pytestcov pytestflakes pytestpep8 @@ -10025,7 +10025,7 @@ in modules // { }; }; - hypothesis = buildPythonPackage rec { + hypothesis1 = buildPythonPackage rec { name = "hypothesis-1.14.0"; buildInputs = with self; [fake_factory django numpy pytz flake8 pytest ]; @@ -17034,7 +17034,7 @@ in modules // { sha256 = "0jgyhkkq36wn36rymn4jiyqh2vdslmradq4a2mjkxfbk2cz6wpi5"; }; - buildInputs = with self; [ six pytest hypothesis ] ++ optional (!isPy3k) modules.sqlite3; + buildInputs = with self; [ six pytest hypothesis1 ] ++ optional (!isPy3k) modules.sqlite3; checkPhase = '' py.test From 94f1fe35f880a04ced6e9c5ecdae911647593118 Mon Sep 17 00:00:00 2001 From: Damien Cassou Date: Mon, 14 Mar 2016 07:29:41 +0100 Subject: [PATCH 2/3] flaky: init at 3.1.0 --- pkgs/top-level/python-packages.nix | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 53b816232320..5b74146330a6 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -8719,6 +8719,28 @@ in modules // { }; }; + flaky = buildPythonPackage rec { + name = "flaky-${version}"; + version = "3.1.0"; + + src = pkgs.fetchurl { + url = "https://pypi.python.org/packages/source/f/flaky/${name}.tar.gz"; + sha256 = "1x9ixika7wqjj52x8wnsh1vk7jadkdqpx01plj7mlh8slwyq4s41"; + }; + + propagatedBuildInputs = with self; [ pytest ]; + buildInputs = with self; [ mock ]; + + # waiting for feedback https://github.com/box/flaky/issues/97 + doCheck = false; + + meta = { + homepage = https://github.com/box/flaky; + description = "Plugin for nose or py.test that automatically reruns flaky tests"; + license = licenses.asl20; + }; + }; + flask = buildPythonPackage { name = "flask-0.10.1"; From 4909c56b69295e12f4973f4fe96467d768b4a851 Mon Sep 17 00:00:00 2001 From: Damien Cassou Date: Mon, 14 Mar 2016 07:29:54 +0100 Subject: [PATCH 3/3] 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 5b74146330a6..5d9b88fb9e31 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";