nixpkgs/pkgs/development/python-modules/mongoengine/default.nix
Jonathan Ringer a643f8350f python2Packages.mongoengine: disable
```
  Processing ./mongoengine-0.20.0-py2-none-any.whl
  ERROR: Package 'mongoengine' requires a different Python: 2.7.18 not in '>=3.5'
```
2020-10-16 10:00:27 -07:00

52 lines
902 B
Nix

{ lib
, buildPythonPackage
, fetchFromGitHub
, pymongo
, isPy27
, six
, blinker
, nose
, pillow
, coverage
}:
buildPythonPackage rec {
pname = "mongoengine";
version = "0.20.0";
disabled = isPy27;
src = fetchFromGitHub {
owner = "MongoEngine";
repo = pname;
rev = "v${version}";
sha256 = "0wc0cvjanlszn09n61jj38pq9wdlphkjgrp3c8hvd16754is3n7f";
};
propagatedBuildInputs = [
pymongo
six
];
checkInputs = [
nose
pillow
coverage
blinker
];
postPatch = ''
substituteInPlace setup.py \
--replace "coverage==4.2" "coverage"
'';
# tests require mongodb running in background
doCheck = false;
meta = with lib; {
description = "MongoEngine is a Python Object-Document Mapper for working with MongoDB";
homepage = "http://mongoengine.org/";
license = licenses.mit;
maintainers = [ maintainers.costrouc ];
};
}