2020-04-24 23:36:52 +00:00
|
|
|
{ lib
|
2021-05-20 23:08:51 +00:00
|
|
|
, backoff
|
|
|
|
, backports-datetime-fromisoformat
|
2020-04-24 23:36:52 +00:00
|
|
|
, buildPythonPackage
|
2021-05-20 23:08:51 +00:00
|
|
|
, dataclasses
|
|
|
|
, fetchFromGitHub
|
|
|
|
, google-api-core
|
2020-04-24 23:36:52 +00:00
|
|
|
, jinja2
|
2021-05-20 23:08:51 +00:00
|
|
|
, ndjson
|
2020-04-24 23:36:52 +00:00
|
|
|
, pillow
|
2021-05-20 23:08:51 +00:00
|
|
|
, pydantic
|
|
|
|
, pytest-cases
|
|
|
|
, pytestCheckHook
|
|
|
|
, pythonOlder
|
2020-04-24 23:36:52 +00:00
|
|
|
, rasterio
|
2021-05-20 23:08:51 +00:00
|
|
|
, requests
|
2020-04-24 23:36:52 +00:00
|
|
|
, shapely
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "labelbox";
|
2021-05-20 23:08:51 +00:00
|
|
|
version = "2.5.4";
|
|
|
|
disabled = pythonOlder "3.6";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-05-20 23:08:51 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "Labelbox";
|
|
|
|
repo = "labelbox-python";
|
|
|
|
rev = "v${version}";
|
|
|
|
sha256 = "0182klvm8bjcm8fkl9w8ypj12s026czgid8ldl6jjvmzhxpmss68";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2020-11-21 19:51:51 +00:00
|
|
|
propagatedBuildInputs = [
|
2021-05-20 23:08:51 +00:00
|
|
|
backoff
|
|
|
|
backports-datetime-fromisoformat
|
|
|
|
dataclasses
|
|
|
|
google-api-core
|
|
|
|
jinja2
|
|
|
|
ndjson
|
|
|
|
pillow
|
|
|
|
pydantic
|
|
|
|
rasterio
|
|
|
|
requests
|
|
|
|
shapely
|
|
|
|
];
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace setup.py --replace "pydantic==1.8" "pydantic>=1.8"
|
|
|
|
'';
|
|
|
|
|
|
|
|
checkInputs = [
|
|
|
|
pytest-cases
|
|
|
|
pytestCheckHook
|
|
|
|
];
|
|
|
|
|
|
|
|
disabledTestPaths = [
|
|
|
|
# Requires network access
|
|
|
|
"tests/integration"
|
2020-11-21 19:51:51 +00:00
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2020-11-21 19:51:51 +00:00
|
|
|
pythonImportsCheck = [ "labelbox" ];
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
meta = with lib; {
|
|
|
|
description = "Platform API for LabelBox";
|
2021-05-20 23:08:51 +00:00
|
|
|
homepage = "https://github.com/Labelbox/labelbox-python";
|
2020-04-24 23:36:52 +00:00
|
|
|
license = licenses.asl20;
|
|
|
|
maintainers = with maintainers; [ rakesh4g ];
|
|
|
|
};
|
|
|
|
}
|