Merge pull request #307098 from r-ryantm/auto-update/cilium-cli
[NixPkgs.git] / pkgs / development / python-modules / labelbox / default.nix
blob98c7adcc8e11bb616a6526197c9d84da8e4e876c
1 { lib
2 , buildPythonPackage
3 , fetchFromGitHub
4 , geojson
5 , google-api-core
6 , imagesize
7 , nbconvert
8 , nbformat
9 , numpy
10 , opencv4
11 , packaging
12 , pillow
13 , pydantic
14 , pyproj
15 , pytestCheckHook
16 , python-dateutil
17 , pythonOlder
18 , pythonRelaxDepsHook
19 , requests
20 , setuptools
21 , shapely
22 , strenum
23 , tqdm
24 , typeguard
25 , typing-extensions
28 buildPythonPackage rec {
29   pname = "labelbox";
30   version = "3.67.0";
31   pyproject = true;
33   disabled = pythonOlder "3.8";
35   src = fetchFromGitHub {
36     owner = "Labelbox";
37     repo = "labelbox-python";
38     rev = "refs/tags/v.${version}";
39     hash = "sha256-JQTjmYxPBS8JC4HQTtbQ7hb80LPLYE4OEj1lFA6cZ1Y=";
40   };
42   postPatch = ''
43     substituteInPlace pytest.ini \
44       --replace-fail "--reruns 2 --reruns-delay 10 --durations=20 -n 10" ""
46     # disable pytest_plugins which requires `pygeotile`
47     substituteInPlace tests/conftest.py \
48       --replace-fail "pytest_plugins" "_pytest_plugins"
49   '';
51   nativeBuildInputs = [
52     pythonRelaxDepsHook
53   ];
55   pythonRelaxDeps = [
56     "python-dateutil"
57   ];
59   build-system = [
60     setuptools
61   ];
63   dependencies = [
64     google-api-core
65     pydantic
66     python-dateutil
67     requests
68     strenum
69     tqdm
70   ];
72   optional-dependencies = {
73     data = [
74       shapely
75       geojson
76       numpy
77       pillow
78       opencv4
79       typeguard
80       imagesize
81       pyproj
82       # pygeotile
83       typing-extensions
84       packaging
85     ];
86   };
88   nativeCheckInputs = [
89     nbconvert
90     nbformat
91     pytestCheckHook
92   ] ++ optional-dependencies.data;
94   disabledTestPaths = [
95     # Requires network access
96     "tests/integration"
97     # Missing requirements
98     "tests/data"
99   ];
101   pythonImportsCheck = [
102     "labelbox"
103   ];
105   meta = with lib; {
106     description = "Platform API for LabelBox";
107     homepage = "https://github.com/Labelbox/labelbox-python";
108     changelog = "https://github.com/Labelbox/labelbox-python/blob/v.${version}/CHANGELOG.md";
109     license = licenses.asl20;
110     maintainers = with maintainers; [ rakesh4g ];
111   };