diff options
Diffstat (limited to 'pkgs/development/python-modules/labelbox/default.nix')
-rw-r--r-- | pkgs/development/python-modules/labelbox/default.nix | 93 |
1 files changed, 44 insertions, 49 deletions
diff --git a/pkgs/development/python-modules/labelbox/default.nix b/pkgs/development/python-modules/labelbox/default.nix index 98c7adcc8e11..b81962cd7d9d 100644 --- a/pkgs/development/python-modules/labelbox/default.nix +++ b/pkgs/development/python-modules/labelbox/default.nix @@ -1,33 +1,37 @@ -{ lib -, buildPythonPackage -, fetchFromGitHub -, geojson -, google-api-core -, imagesize -, nbconvert -, nbformat -, numpy -, opencv4 -, packaging -, pillow -, pydantic -, pyproj -, pytestCheckHook -, python-dateutil -, pythonOlder -, pythonRelaxDepsHook -, requests -, setuptools -, shapely -, strenum -, tqdm -, typeguard -, typing-extensions +{ + 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 = "3.67.0"; + version = "5.2.1"; pyproject = true; disabled = pythonOlder "3.8"; @@ -36,29 +40,17 @@ buildPythonPackage rec { owner = "Labelbox"; repo = "labelbox-python"; rev = "refs/tags/v.${version}"; - hash = "sha256-JQTjmYxPBS8JC4HQTtbQ7hb80LPLYE4OEj1lFA6cZ1Y="; + hash = "sha256-vfhlzkCTm1fhvCpzwAaXWPyXE8/2Yx63fTVHl5CWon4="; }; - postPatch = '' - substituteInPlace pytest.ini \ - --replace-fail "--reruns 2 --reruns-delay 10 --durations=20 -n 10" "" - - # disable pytest_plugins which requires `pygeotile` - substituteInPlace tests/conftest.py \ - --replace-fail "pytest_plugins" "_pytest_plugins" - ''; - - nativeBuildInputs = [ - pythonRelaxDepsHook - ]; + sourceRoot = "${src.name}/libs/labelbox"; pythonRelaxDeps = [ + "mypy" "python-dateutil" ]; - build-system = [ - setuptools - ]; + build-system = [ hatchling ]; dependencies = [ google-api-core @@ -67,27 +59,31 @@ buildPythonPackage rec { requests strenum tqdm + geojson + mypy ]; optional-dependencies = { data = [ shapely - geojson numpy pillow - opencv4 + opencv-python-headless typeguard imagesize pyproj # pygeotile typing-extensions - packaging ]; }; nativeCheckInputs = [ nbconvert nbformat + pytest-cov-stub + pytest-order + pytest-rerunfailures + pytest-xdist pytestCheckHook ] ++ optional-dependencies.data; @@ -96,16 +92,15 @@ buildPythonPackage rec { "tests/integration" # Missing requirements "tests/data" + "tests/unit/test_label_data_type.py" ]; - pythonImportsCheck = [ - "labelbox" - ]; + pythonImportsCheck = [ "labelbox" ]; meta = with lib; { description = "Platform API for LabelBox"; homepage = "https://github.com/Labelbox/labelbox-python"; - changelog = "https://github.com/Labelbox/labelbox-python/blob/v.${version}/CHANGELOG.md"; + changelog = "https://github.com/Labelbox/labelbox-python/releases/tag/v.${version}"; license = licenses.asl20; maintainers = with maintainers; [ rakesh4g ]; }; |