2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
|
|
|
fetchFromGitHub,
|
|
|
|
geojson,
|
|
|
|
google-api-core,
|
|
|
|
imagesize,
|
|
|
|
nbconvert,
|
|
|
|
nbformat,
|
|
|
|
numpy,
|
|
|
|
opencv4,
|
|
|
|
packaging,
|
|
|
|
pillow,
|
|
|
|
pydantic,
|
|
|
|
pyproj,
|
|
|
|
pytestCheckHook,
|
|
|
|
python-dateutil,
|
|
|
|
pythonOlder,
|
|
|
|
pythonRelaxDepsHook,
|
|
|
|
requests,
|
|
|
|
setuptools,
|
|
|
|
shapely,
|
|
|
|
strenum,
|
|
|
|
tqdm,
|
|
|
|
typeguard,
|
|
|
|
typing-extensions,
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "labelbox";
|
2024-04-21 15:54:59 +00:00
|
|
|
version = "3.67.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-04-21 15:54:59 +00:00
|
|
|
hash = "sha256-JQTjmYxPBS8JC4HQTtbQ7hb80LPLYE4OEj1lFA6cZ1Y=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2022-12-28 21:21:41 +00:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace pytest.ini \
|
2024-04-21 15:54:59 +00:00
|
|
|
--replace-fail "--reruns 2 --reruns-delay 10 --durations=20 -n 10" ""
|
|
|
|
|
|
|
|
# disable pytest_plugins which requires `pygeotile`
|
|
|
|
substituteInPlace tests/conftest.py \
|
|
|
|
--replace-fail "pytest_plugins" "_pytest_plugins"
|
2022-12-28 21:21:41 +00:00
|
|
|
'';
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
nativeBuildInputs = [ pythonRelaxDepsHook ];
|
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-06-05 15:53:02 +00:00
|
|
|
build-system = [ setuptools ];
|
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
|
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
|
|
|
|
geojson
|
|
|
|
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
|
|
|
|
packaging
|
|
|
|
];
|
|
|
|
};
|
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
|
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"
|
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";
|
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 ];
|
|
|
|
};
|
|
|
|
}
|