summaryrefslogtreecommitdiff
path: root/pkgs/development/python-modules/labelbox/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/development/python-modules/labelbox/default.nix')
-rw-r--r--pkgs/development/python-modules/labelbox/default.nix59
1 files changed, 44 insertions, 15 deletions
diff --git a/pkgs/development/python-modules/labelbox/default.nix b/pkgs/development/python-modules/labelbox/default.nix
index ce7cff4d79b8..957b8ad5fd1f 100644
--- a/pkgs/development/python-modules/labelbox/default.nix
+++ b/pkgs/development/python-modules/labelbox/default.nix
@@ -1,38 +1,67 @@
{ lib
+, backoff
+, backports-datetime-fromisoformat
, buildPythonPackage
-, fetchPypi
-, requests
+, dataclasses
+, fetchFromGitHub
+, google-api-core
, jinja2
+, ndjson
, pillow
+, pydantic
+, pytest-cases
+, pytestCheckHook
+, pythonOlder
, rasterio
+, requests
, shapely
-, ndjson
-, backoff
-, google-api-core
-, backports-datetime-fromisoformat
}:
buildPythonPackage rec {
pname = "labelbox";
- version = "2.5.1";
+ version = "2.5.4";
+ disabled = pythonOlder "3.6";
- src = fetchPypi {
- inherit pname version;
- sha256 = "7f2cbc5d4869d8acde865ad519fc1cc85338247cd7cf534334f988a040679219";
+ src = fetchFromGitHub {
+ owner = "Labelbox";
+ repo = "labelbox-python";
+ rev = "v${version}";
+ sha256 = "0182klvm8bjcm8fkl9w8ypj12s026czgid8ldl6jjvmzhxpmss68";
};
propagatedBuildInputs = [
- jinja2 requests pillow rasterio shapely ndjson backoff
- google-api-core backports-datetime-fromisoformat
+ backoff
+ backports-datetime-fromisoformat
+ dataclasses
+ google-api-core
+ jinja2
+ ndjson
+ pillow
+ pydantic
+ rasterio
+ requests
+ shapely
+ ];
+
+ postPatch = ''
+ substituteInPlace setup.py --replace "pydantic==1.8" "pydantic>=1.8"
+ '';
+
+ checkInputs = [
+ pytest-cases
+ pytestCheckHook
+ ];
+
+ disabledTestPaths = [
+ # Requires network access
+ "tests/integration"
];
- # Test cases are not running on pypi or GitHub
- doCheck = false;
pythonImportsCheck = [ "labelbox" ];
meta = with lib; {
- homepage = "https://github.com/Labelbox/Labelbox";
description = "Platform API for LabelBox";
+ homepage = "https://github.com/Labelbox/labelbox-python";
license = licenses.asl20;
maintainers = with maintainers; [ rakesh4g ];
};