linux_xanmod: 5.11.14 -> 5.11.15
[NixPkgs.git] / pkgs / development / python-modules / hypothesis / 2.nix
blob5b086d5f1a7f0b88c65e672915e3578b6f546da0
1 { lib, buildPythonPackage, fetchFromGitHub
2 , isPy3k, attrs, coverage, enum34, pexpect
3 , doCheck ? true, pytest, pytest_xdist, flaky, mock
4 , sortedcontainers
5 }:
6 buildPythonPackage rec {
7   # https://hypothesis.readthedocs.org/en/latest/packaging.html
9   # Hypothesis has optional dependencies on the following libraries
10   # pytz fake_factory django numpy pytest
11   # If you need these, you can just add them to your environment.
13   version = "4.57.1";
14   pname = "hypothesis";
16   # Use github tarballs that includes tests
17   src = fetchFromGitHub {
18     owner = "HypothesisWorks";
19     repo = "hypothesis-python";
20     rev = "hypothesis-python-${version}";
21     sha256 = "1qcpcrk6892hzyjsdr581pw6i4fj9035nv89mcjrcrzcmycdlfds";
22   };
24   postUnpack = "sourceRoot=$sourceRoot/hypothesis-python";
26   propagatedBuildInputs = [
27     attrs
28     coverage
29     sortedcontainers
30   ] ++ lib.optional (!isPy3k) enum34;
32   checkInputs = [ pytest pytest_xdist flaky mock pexpect ];
33   inherit doCheck;
35   checkPhase = ''
36     rm tox.ini # This file changes how py.test runs and breaks it
37     py.test tests/cover
38   '';
40   meta = with lib; {
41     description = "A Python library for property based testing";
42     homepage = "https://github.com/HypothesisWorks/hypothesis";
43     license = licenses.mpl20;
44   };