depot/third_party/nixpkgs/pkgs/development/python-modules/labelbox/default.nix

107 lines
1.9 KiB
Nix

{
lib,
buildPythonPackage,
fetchFromGitHub,
geojson,
google-api-core,
hatchling,
imagesize,
mypy,
nbconvert,
nbformat,
numpy,
opencv-python-headless,
pillow,
pydantic,
pyproj,
pytest-cov-stub,
pytest-order,
pytest-rerunfailures,
pytest-xdist,
pytestCheckHook,
python-dateutil,
pythonOlder,
requests,
shapely,
strenum,
tqdm,
typeguard,
typing-extensions,
}:
buildPythonPackage rec {
pname = "labelbox";
version = "5.2.1";
pyproject = true;
disabled = pythonOlder "3.8";
src = fetchFromGitHub {
owner = "Labelbox";
repo = "labelbox-python";
rev = "refs/tags/v.${version}";
hash = "sha256-vfhlzkCTm1fhvCpzwAaXWPyXE8/2Yx63fTVHl5CWon4=";
};
sourceRoot = "${src.name}/libs/labelbox";
pythonRelaxDeps = [
"mypy"
"python-dateutil"
];
build-system = [ hatchling ];
dependencies = [
google-api-core
pydantic
python-dateutil
requests
strenum
tqdm
geojson
mypy
];
optional-dependencies = {
data = [
shapely
numpy
pillow
opencv-python-headless
typeguard
imagesize
pyproj
# pygeotile
typing-extensions
];
};
nativeCheckInputs = [
nbconvert
nbformat
pytest-cov-stub
pytest-order
pytest-rerunfailures
pytest-xdist
pytestCheckHook
] ++ optional-dependencies.data;
disabledTestPaths = [
# Requires network access
"tests/integration"
# Missing requirements
"tests/data"
"tests/unit/test_label_data_type.py"
];
pythonImportsCheck = [ "labelbox" ];
meta = with lib; {
description = "Platform API for LabelBox";
homepage = "https://github.com/Labelbox/labelbox-python";
changelog = "https://github.com/Labelbox/labelbox-python/releases/tag/v.${version}";
license = licenses.asl20;
maintainers = with maintainers; [ rakesh4g ];
};
}