Files
nixpkgs/pkgs/development/python-modules/smart_open/default.nix
T

41 lines
934 B
Nix
Raw Normal View History

2017-06-12 10:13:42 +02:00
{ lib
, buildPythonPackage
, fetchPypi
, boto
, boto3
2017-06-12 10:13:42 +02:00
, bz2file
, mock
2017-06-12 10:13:42 +02:00
, moto
, requests
, responses
}:
buildPythonPackage rec {
pname = "smart_open";
2018-10-23 21:15:04 -07:00
version = "1.7.1";
2017-06-12 10:13:42 +02:00
src = fetchPypi {
inherit pname version;
2018-10-23 21:15:04 -07:00
sha256 = "0lwlvvz7qndq89i8bhjv4zfkhg0lbd5yjhccb7svszf30k8niiap";
2017-06-12 10:13:42 +02: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 10:13:42 +02:00
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 ];
2017-06-12 10:13:42 +02:00
};
}