1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 pymongo,
6 isPy27,
7 six,
8 blinker,
9 pytestCheckHook,
10 pillow,
11 coverage,
12}:
13
14buildPythonPackage rec {
15 pname = "mongoengine";
16 version = "0.29.1";
17 format = "setuptools";
18 disabled = isPy27;
19
20 src = fetchFromGitHub {
21 owner = "MongoEngine";
22 repo = "mongoengine";
23 tag = "v${version}";
24 hash = "sha256-trWCKmCa+q+qtzF0HKCZMnko1cvvpwJvczLFuKtB83E=";
25 };
26
27 propagatedBuildInputs = [
28 pymongo
29 six
30 ];
31
32 nativeCheckInputs = [
33 pytestCheckHook
34 pillow
35 coverage
36 blinker
37 ];
38
39 postPatch = ''
40 substituteInPlace setup.py \
41 --replace "coverage==4.2" "coverage" \
42 --replace "pymongo>=3.4,<=4.0" "pymongo"
43 '';
44
45 # tests require mongodb running in background
46 doCheck = false;
47
48 pythonImportsCheck = [ "mongoengine" ];
49
50 meta = with lib; {
51 description = "MongoEngine is a Python Object-Document Mapper for working with MongoDB";
52 homepage = "http://mongoengine.org/";
53 license = licenses.mit;
54 maintainers = [ ];
55 };
56}