1{ lib
2, backoff
3, backports-datetime-fromisoformat
4, buildPythonPackage
5, dataclasses
6, fetchFromGitHub
7, google-api-core
8, jinja2
9, ndjson
10, pillow
11, pydantic
12, pytest-cases
13, pytestCheckHook
14, pythonOlder
15, rasterio
16, requests
17, shapely
18}:
19
20buildPythonPackage rec {
21 pname = "labelbox";
22 version = "3.24.1";
23 disabled = pythonOlder "3.6";
24
25 src = fetchFromGitHub {
26 owner = "Labelbox";
27 repo = "labelbox-python";
28 rev = "refs/tags/v.${version}";
29 sha256 = "sha256-pcIbCtVOr6pwodgNv8aGZ+k2Z9cQPCQm1UBJWJAlj/o=";
30 };
31
32 propagatedBuildInputs = [
33 backoff
34 backports-datetime-fromisoformat
35 dataclasses
36 google-api-core
37 jinja2
38 ndjson
39 pillow
40 pydantic
41 rasterio
42 requests
43 shapely
44 ];
45
46 postPatch = ''
47 substituteInPlace setup.py --replace "pydantic==1.8" "pydantic>=1.8"
48 '';
49
50 checkInputs = [
51 pytest-cases
52 pytestCheckHook
53 ];
54
55 disabledTestPaths = [
56 # Requires network access
57 "tests/integration"
58 ];
59
60 pythonImportsCheck = [ "labelbox" ];
61
62 meta = with lib; {
63 description = "Platform API for LabelBox";
64 homepage = "https://github.com/Labelbox/labelbox-python";
65 license = licenses.asl20;
66 maintainers = with maintainers; [ rakesh4g ];
67 };
68}