2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
|
|
|
fetchFromGitHub,
|
|
|
|
geojson,
|
|
|
|
google-api-core,
|
2024-09-19 14:19:46 +00:00
|
|
|
hatchling,
|
2024-06-05 15:53:02 +00:00
|
|
|
imagesize,
|
2024-09-19 14:19:46 +00:00
|
|
|
mypy,
|
2024-06-05 15:53:02 +00:00
|
|
|
nbconvert,
|
|
|
|
nbformat,
|
|
|
|
numpy,
|
|
|
|
opencv4,
|
|
|
|
pillow,
|
|
|
|
pydantic,
|
|
|
|
pyproj,
|
2024-09-19 14:19:46 +00:00
|
|
|
pytest-cov-stub,
|
|
|
|
pytest-order,
|
|
|
|
pytest-rerunfailures,
|
|
|
|
pytest-xdist,
|
2024-06-05 15:53:02 +00:00
|
|
|
pytestCheckHook,
|
|
|
|
python-dateutil,
|
|
|
|
pythonOlder,
|
|
|
|
requests,
|
|
|
|
shapely,
|
|
|
|
strenum,
|
|
|
|
tqdm,
|
|
|
|
typeguard,
|
|
|
|
typing-extensions,
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "labelbox";
|
2024-10-04 16:56:33 +00:00
|
|
|
version = "5.1.0";
|
2024-01-02 11:29:13 +00:00
|
|
|
pyproject = true;
|
2022-12-28 21:21:41 +00:00
|
|
|
|
2024-04-21 15:54:59 +00:00
|
|
|
disabled = pythonOlder "3.8";
|
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}";
|
2024-10-04 16:56:33 +00:00
|
|
|
hash = "sha256-M55cwT7BrY+8m9ec+2bKDCxGkHJp/c50Gzib4sEg7Bk=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2024-09-19 14:19:46 +00:00
|
|
|
sourceRoot = "${src.name}/libs/labelbox";
|
2024-04-21 15:54:59 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
pythonRelaxDeps = [ "python-dateutil" ];
|
2024-04-21 15:54:59 +00:00
|
|
|
|
2024-09-19 14:19:46 +00:00
|
|
|
pythonRemoveDeps = [ "opencv-python-headless" ];
|
|
|
|
|
|
|
|
build-system = [ hatchling ];
|
2022-12-28 21:21:41 +00:00
|
|
|
|
2024-04-21 15:54:59 +00:00
|
|
|
dependencies = [
|
2021-05-20 23:08:51 +00:00
|
|
|
google-api-core
|
|
|
|
pydantic
|
2024-01-02 11:29:13 +00:00
|
|
|
python-dateutil
|
2021-05-20 23:08:51 +00:00
|
|
|
requests
|
2024-04-21 15:54:59 +00:00
|
|
|
strenum
|
2022-12-28 21:21:41 +00:00
|
|
|
tqdm
|
2024-09-19 14:19:46 +00:00
|
|
|
geojson
|
|
|
|
mypy
|
2021-05-20 23:08:51 +00:00
|
|
|
];
|
|
|
|
|
2024-04-21 15:54:59 +00:00
|
|
|
optional-dependencies = {
|
2022-12-28 21:21:41 +00:00
|
|
|
data = [
|
|
|
|
shapely
|
|
|
|
numpy
|
|
|
|
pillow
|
2024-01-02 11:29:13 +00:00
|
|
|
opencv4
|
2022-12-28 21:21:41 +00:00
|
|
|
typeguard
|
|
|
|
imagesize
|
|
|
|
pyproj
|
|
|
|
# pygeotile
|
|
|
|
typing-extensions
|
|
|
|
];
|
|
|
|
};
|
2021-05-20 23:08:51 +00:00
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2023-03-24 00:07:29 +00:00
|
|
|
nbconvert
|
|
|
|
nbformat
|
2024-09-19 14:19:46 +00:00
|
|
|
pytest-cov-stub
|
|
|
|
pytest-order
|
|
|
|
pytest-rerunfailures
|
|
|
|
pytest-xdist
|
2021-05-20 23:08:51 +00:00
|
|
|
pytestCheckHook
|
2024-04-21 15:54:59 +00:00
|
|
|
] ++ optional-dependencies.data;
|
2024-01-02 11:29:13 +00:00
|
|
|
|
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"
|
2024-09-19 14:19:46 +00:00
|
|
|
"tests/unit/test_label_data_type.py"
|
2020-11-21 19:51:51 +00:00
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2024-06-05 15:53:02 +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";
|
2024-09-19 14:19:46 +00:00
|
|
|
changelog = "https://github.com/Labelbox/labelbox-python/releases/tag/v.${version}";
|
2020-04-24 23:36:52 +00:00
|
|
|
license = licenses.asl20;
|
|
|
|
maintainers = with maintainers; [ rakesh4g ];
|
|
|
|
};
|
|
|
|
}
|