2017-06-12 09:13:42 +01:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchPypi
|
|
|
|
, boto
|
2018-03-30 22:02:01 +01:00
|
|
|
, boto3
|
2017-06-12 09:13:42 +01:00
|
|
|
, bz2file
|
2018-03-30 22:02:01 +01:00
|
|
|
, mock
|
2017-06-12 09:13:42 +01:00
|
|
|
, moto
|
|
|
|
, requests
|
|
|
|
, responses
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "smart_open";
|
2020-05-09 11:02:00 +01:00
|
|
|
version = "1.11.1";
|
2017-06-12 09:13:42 +01:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2020-05-09 11:02:00 +01:00
|
|
|
sha256 = "221cc08ae926af6ad72d141f208d228e1e801b1ee9b15f3e466eecf89d931002";
|
2017-06-12 09:13:42 +01:00
|
|
|
};
|
|
|
|
|
2018-03-30 22:02:01 +01:00
|
|
|
# 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 ];
|
2017-06-12 09:13:42 +01:00
|
|
|
meta = {
|
|
|
|
license = lib.licenses.mit;
|
|
|
|
description = "smart_open is a Python 2 & Python 3 library for efficient streaming of very large file";
|
2017-09-12 08:59:28 +01:00
|
|
|
maintainers = with lib.maintainers; [ jyp ];
|
2017-06-12 09:13:42 +01:00
|
|
|
};
|
|
|
|
}
|