@@ -1,38 +1,67 @@
11{ lib
2+, backoff
3+, backports-datetime-fromisoformat
24, buildPythonPackage
3−, fetchPypi
4−, requests
5+, dataclasses
6+, fetchFromGitHub
7+, google-api-core
58, jinja2
9+, ndjson
610, pillow
11+, pydantic
12+, pytest-cases
13+, pytestCheckHook
14+, pythonOlder
715, rasterio
16+, requests
817, shapely
9−, ndjson
10−, backoff
11−, google-api-core
12−, backports-datetime-fromisoformat
1318}:
1419
1520buildPythonPackage rec {
1621 pname = "labelbox";
17− version = "2.5.1";
22+ version = "2.5.4";
23+ disabled = pythonOlder "3.6";
1824
19− src = fetchPypi {
20− inherit pname version;
21− sha256 = "7f2cbc5d4869d8acde865ad519fc1cc85338247cd7cf534334f988a040679219";
25+ src = fetchFromGitHub {
26+ owner = "Labelbox";
27+ repo = "labelbox-python";
28+ rev = "v${version}";
29+ sha256 = "0182klvm8bjcm8fkl9w8ypj12s026czgid8ldl6jjvmzhxpmss68";
2230 };
2331
2432 propagatedBuildInputs = [
25− jinja2 requests pillow rasterio shapely ndjson backoff
26− google-api-core backports-datetime-fromisoformat
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"
2758 ];
2859
29− # Test cases are not running on pypi or GitHub
30− doCheck = false;
3160 pythonImportsCheck = [ "labelbox" ];
3261
3362 meta = with lib; {
34− homepage = "https://github.com/Labelbox/Labelbox";
3563 description = "Platform API for LabelBox";
64+ homepage = "https://github.com/Labelbox/labelbox-python";
3665 license = licenses.asl20;
3766 maintainers = with maintainers; [ rakesh4g ];
3867 };