mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-30 09:31:01 +00:00
42 lines
943 B
Nix
42 lines
943 B
Nix
{ lib
|
|
, buildPythonPackage
|
|
, isPy3k
|
|
, fetchPypi
|
|
, boto
|
|
, boto3
|
|
, bz2file
|
|
, mock
|
|
, moto
|
|
, requests
|
|
, responses
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "smart_open";
|
|
version = "1.5.7";
|
|
|
|
src = fetchPypi {
|
|
inherit pname version;
|
|
sha256 = "0y1c29pdxxgxkymr7g2n59siqqaq351zbx9vz8433dxvzy4qgd7p";
|
|
};
|
|
|
|
# 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 ];
|
|
};
|
|
}
|