about summary refs log tree commit diff
path: root/pkgs/development/python-modules/schema/default.nix
blob: 2214bc2da528a163688f90074ff861e67749b3ee (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
{ stdenv, buildPythonPackage, fetchPypi, contextlib2, pytest, mock }:

buildPythonPackage rec {

  pname = "schema";
  version = "0.7.2";

  src = fetchPypi {
    inherit pname version;
    sha256 = "b536f2375b49fdf56f36279addae98bd86a8afbd58b3c32ce363c464bed5fc1c";
  };

  preConfigure = ''
    substituteInPlace requirements.txt --replace '==' '>='
  '';

  propagatedBuildInputs = [ contextlib2 ];

  checkInputs = [ pytest mock ];
  checkPhase = "pytest ./test_schema.py";

  meta = with stdenv.lib; {
    description = "Library for validating Python data structures";
    homepage = "https://github.com/keleshev/schema";
    license = licenses.mit;
    maintainers = [ maintainers.tobim ];
  };
}