2020-04-24 23:36:52 +00:00
|
|
|
{ lib
|
2021-05-20 23:08:51 +00:00
|
|
|
, backoff
|
2020-04-24 23:36:52 +00:00
|
|
|
, buildPythonPackage
|
2021-05-20 23:08:51 +00:00
|
|
|
, fetchFromGitHub
|
2022-12-28 21:21:41 +00:00
|
|
|
, geojson
|
2021-05-20 23:08:51 +00:00
|
|
|
, google-api-core
|
2022-12-28 21:21:41 +00:00
|
|
|
, imagesize
|
2021-05-20 23:08:51 +00:00
|
|
|
, ndjson
|
2022-12-28 21:21:41 +00:00
|
|
|
, numpy
|
|
|
|
, opencv
|
|
|
|
# , opencv-python
|
|
|
|
, packaging
|
2020-04-24 23:36:52 +00:00
|
|
|
, pillow
|
2021-05-20 23:08:51 +00:00
|
|
|
, pydantic
|
2022-12-28 21:21:41 +00:00
|
|
|
# , pygeotile
|
|
|
|
, pyproj
|
2021-05-20 23:08:51 +00:00
|
|
|
, pytest-cases
|
|
|
|
, pytestCheckHook
|
|
|
|
, pythonOlder
|
2022-12-28 21:21:41 +00:00
|
|
|
, pythonRelaxDepsHook
|
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
|
2022-12-28 21:21:41 +00:00
|
|
|
, tqdm
|
|
|
|
, typeguard
|
|
|
|
, typing-extensions
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "labelbox";
|
2023-01-11 07:51:40 +00:00
|
|
|
version = "3.34.0";
|
2022-12-28 21:21:41 +00:00
|
|
|
format = "setuptools";
|
|
|
|
|
2022-12-17 10:02:37 +00:00
|
|
|
disabled = pythonOlder "3.7";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-05-20 23:08:51 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "Labelbox";
|
|
|
|
repo = "labelbox-python";
|
2022-08-12 12:06:08 +00:00
|
|
|
rev = "refs/tags/v.${version}";
|
2023-01-11 07:51:40 +00:00
|
|
|
hash = "sha256-x/XvcGiFS//f/le3JAd2n/tuUy9MBrCsISpkIkCCNis=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2022-12-28 21:21:41 +00:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace pytest.ini \
|
|
|
|
--replace "-s -vv -x --reruns 5 --reruns-delay 10 --durations=20" "-s -vv -x --durations=20"
|
|
|
|
'';
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
pythonRelaxDepsHook
|
|
|
|
];
|
|
|
|
|
|
|
|
pythonRelaxDeps = [
|
|
|
|
"backoff"
|
|
|
|
];
|
|
|
|
|
2020-11-21 19:51:51 +00:00
|
|
|
propagatedBuildInputs = [
|
2021-05-20 23:08:51 +00:00
|
|
|
backoff
|
|
|
|
google-api-core
|
|
|
|
ndjson
|
|
|
|
pydantic
|
|
|
|
requests
|
2022-12-28 21:21:41 +00:00
|
|
|
tqdm
|
2021-05-20 23:08:51 +00:00
|
|
|
];
|
|
|
|
|
2022-12-28 21:21:41 +00:00
|
|
|
passthru.optional-dependencies = {
|
|
|
|
data = [
|
|
|
|
shapely
|
|
|
|
geojson
|
|
|
|
numpy
|
|
|
|
pillow
|
|
|
|
# opencv-python
|
|
|
|
typeguard
|
|
|
|
imagesize
|
|
|
|
pyproj
|
|
|
|
# pygeotile
|
|
|
|
typing-extensions
|
|
|
|
packaging
|
|
|
|
];
|
|
|
|
};
|
2021-05-20 23:08:51 +00:00
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2021-05-20 23:08:51 +00:00
|
|
|
pytest-cases
|
|
|
|
pytestCheckHook
|
2022-12-28 21:21:41 +00:00
|
|
|
] ++ passthru.optional-dependencies.data;
|
2021-05-20 23:08:51 +00:00
|
|
|
|
|
|
|
disabledTestPaths = [
|
|
|
|
# Requires network access
|
|
|
|
"tests/integration"
|
2022-12-28 21:21:41 +00:00
|
|
|
# Missing requirements
|
|
|
|
"tests/data"
|
2020-11-21 19:51:51 +00:00
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-12-28 21:21:41 +00:00
|
|
|
pythonImportsCheck = [
|
|
|
|
"labelbox"
|
|
|
|
];
|
2020-11-21 19:51:51 +00:00
|
|
|
|
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";
|
2022-12-28 21:21:41 +00:00
|
|
|
changelog = "https://github.com/Labelbox/labelbox-python/blob/v.${version}/CHANGELOG.md";
|
2020-04-24 23:36:52 +00:00
|
|
|
license = licenses.asl20;
|
|
|
|
maintainers = with maintainers; [ rakesh4g ];
|
|
|
|
};
|
|
|
|
}
|