From ac66bd13ee742c39b0371dde8fb361f87ad020cf Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Tue, 20 Dec 2022 09:56:02 +0100 Subject: [PATCH] python310Packages.labelbox: 3.24.1 -> 3.33.1 Changelog: https://github.com/Labelbox/labelbox-python/blob/v.3.33.1/CHANGELOG.md --- .../python-modules/labelbox/default.nix | 66 +++++++++++++++---- 1 file changed, 52 insertions(+), 14 deletions(-) diff --git a/pkgs/development/python-modules/labelbox/default.nix b/pkgs/development/python-modules/labelbox/default.nix index 08a1fa5ca5ea..15c533c91fce 100644 --- a/pkgs/development/python-modules/labelbox/default.nix +++ b/pkgs/development/python-modules/labelbox/default.nix @@ -1,65 +1,103 @@ { lib , backoff -, backports-datetime-fromisoformat , buildPythonPackage , fetchFromGitHub +, geojson , google-api-core -, jinja2 +, imagesize , ndjson +, numpy +, opencv + # , opencv-python +, packaging , pillow , pydantic + # , pygeotile +, pyproj , pytest-cases , pytestCheckHook , pythonOlder +, pythonRelaxDepsHook , rasterio , requests , shapely +, tqdm +, typeguard +, typing-extensions }: buildPythonPackage rec { pname = "labelbox"; - version = "3.24.1"; + version = "3.33.1"; + format = "setuptools"; + disabled = pythonOlder "3.7"; src = fetchFromGitHub { owner = "Labelbox"; repo = "labelbox-python"; rev = "refs/tags/v.${version}"; - sha256 = "sha256-pcIbCtVOr6pwodgNv8aGZ+k2Z9cQPCQm1UBJWJAlj/o="; + hash = "sha256-lYhgBELeVtNUp6ZvcSTIeKp2YkaGt6MH8BbzSERGHXw="; }; + postPatch = '' + substituteInPlace pytest.ini \ + --replace "-s -vv -x --reruns 5 --reruns-delay 10 --durations=20" "-s -vv -x --durations=20" + ''; + + nativeBuildInputs = [ + pythonRelaxDepsHook + ]; + + pythonRelaxDeps = [ + "backoff" + ]; + propagatedBuildInputs = [ backoff - backports-datetime-fromisoformat google-api-core - jinja2 ndjson - pillow pydantic - rasterio requests - shapely + tqdm ]; - postPatch = '' - substituteInPlace setup.py --replace "pydantic==1.8" "pydantic>=1.8" - ''; + passthru.optional-dependencies = { + data = [ + shapely + geojson + numpy + pillow + # opencv-python + typeguard + imagesize + pyproj + # pygeotile + typing-extensions + packaging + ]; + }; checkInputs = [ pytest-cases pytestCheckHook - ]; + ] ++ passthru.optional-dependencies.data; disabledTestPaths = [ # Requires network access "tests/integration" + # Missing requirements + "tests/data" ]; - 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"; license = licenses.asl20; maintainers = with maintainers; [ rakesh4g ]; };