3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/development/python-modules/smart_open/default.nix

41 lines
946 B
Nix
Raw Normal View History

{ lib
, buildPythonPackage
, fetchPypi
, boto
, boto3
, bz2file
, mock
, moto
, requests
, responses
}:
buildPythonPackage rec {
pname = "smart_open";
2018-07-22 11:21:15 +01:00
version = "1.6.0";
src = fetchPypi {
inherit pname version;
2018-07-22 11:21:15 +01:00
sha256 = "c2c2b44125a03d6e96efdf3e53e28be99e1f548e8a4fa8035f8fab448bbdbbda";
};
# nixpkgs version of moto is >=1.2.0, remove version pin to fix build
postPatch = ''
substituteInPlace ./setup.py --replace "moto==0.4.31" "moto"
'';
# moto>=1.0.0 is backwards-incompatible and some tests fail with it,
# so disable tests for now
doCheck = false;
checkInputs = [ mock moto responses ];
# upstream code requires both boto and boto3
propagatedBuildInputs = [ boto boto3 bz2file requests ];
meta = {
license = lib.licenses.mit;
description = "smart_open is a Python 2 & Python 3 library for efficient streaming of very large file";
maintainers = with lib.maintainers; [ jyp ];
};
}