depot/third_party/nixpkgs/pkgs/development/python-modules/dropbox/default.nix
Default email 81047829ea Project import generated by Copybara.
GitOrigin-RevId: 48d63e924a2666baf37f4f14a18f19347fbd54a2
2022-02-10 15:34:41 -05:00

52 lines
990 B
Nix

{ lib
, buildPythonPackage
, fetchFromGitHub
, requests
, urllib3
, mock
, setuptools
, stone
, pythonOlder
}:
buildPythonPackage rec {
pname = "dropbox";
version = "11.27.0";
format = "setuptools";
disabled = pythonOlder "3.7";
src = fetchFromGitHub {
owner = "dropbox";
repo = "dropbox-sdk-python";
rev = "v${version}";
sha256 = "sha256-atIrrK4BgTfu0UaHTqJ66AxEeSJLanrmYx8myrOCOfo=";
};
propagatedBuildInputs = [
requests
urllib3
mock
setuptools
stone
];
postPatch = ''
substituteInPlace setup.py \
--replace "'pytest-runner == 5.2.0'," ""
'';
# Set DROPBOX_TOKEN environment variable to a valid token.
doCheck = false;
pythonImportsCheck = [
"dropbox"
];
meta = with lib; {
description = "Python library for Dropbox's HTTP-based Core and Datastore APIs";
homepage = "https://github.com/dropbox/dropbox-sdk-python";
license = licenses.mit;
maintainers = with maintainers; [ ];
};
}