2020-09-20 23:36:38 +01:00
|
|
|
{ lib
|
2018-11-02 17:58:45 +00:00
|
|
|
, buildPythonPackage
|
2020-09-20 23:36:38 +01:00
|
|
|
, isPy3k
|
2018-11-02 17:58:45 +00:00
|
|
|
, fetchPypi
|
|
|
|
, six
|
|
|
|
, requests
|
2019-10-15 22:55:41 +01:00
|
|
|
, setuptools
|
2018-11-02 17:58:45 +00:00
|
|
|
, pytest
|
|
|
|
, mock
|
2020-09-20 23:36:38 +01:00
|
|
|
, crcmod
|
|
|
|
, google-crc32c
|
2018-11-02 17:58:45 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "google-resumable-media";
|
2020-10-15 11:49:37 +01:00
|
|
|
version = "1.1.0";
|
2018-11-02 17:58:45 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2020-10-15 11:49:37 +01:00
|
|
|
sha256 = "dcdab13e95bc534d268f87d5293e482cce5bc86dfce6ca0f2e2e89cbb73ef38c";
|
2018-11-02 17:58:45 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
checkInputs = [ pytest mock ];
|
2020-09-20 23:36:38 +01:00
|
|
|
propagatedBuildInputs = [ requests setuptools six ]
|
|
|
|
++ lib.optional isPy3k google-crc32c
|
|
|
|
++ lib.optional (!isPy3k) crcmod;
|
2018-11-02 17:58:45 +00:00
|
|
|
|
|
|
|
checkPhase = ''
|
|
|
|
py.test tests/unit
|
|
|
|
'';
|
|
|
|
|
2020-09-20 23:36:38 +01:00
|
|
|
meta = with lib; {
|
2018-11-02 17:58:45 +00:00
|
|
|
description = "Utilities for Google Media Downloads and Resumable Uploads";
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "https://github.com/GoogleCloudPlatform/google-resumable-media-python";
|
2018-11-02 17:58:45 +00:00
|
|
|
license = licenses.asl20;
|
|
|
|
maintainers = [ maintainers.costrouc ];
|
|
|
|
};
|
|
|
|
}
|