From ae45b31e06134f7f579c41910c430c454df07b56 Mon Sep 17 00:00:00 2001 From: Sarah Clark Date: Fri, 16 May 2025 18:43:16 -0700 Subject: [PATCH 1/2] python3Packages.labelbox: build missing lbox-clients dependency --- .../python-modules/labelbox/default.nix | 34 ++++++++++++++----- 1 file changed, 26 insertions(+), 8 deletions(-) diff --git a/pkgs/development/python-modules/labelbox/default.nix b/pkgs/development/python-modules/labelbox/default.nix index 212811a02151..25fe94199e94 100644 --- a/pkgs/development/python-modules/labelbox/default.nix +++ b/pkgs/development/python-modules/labelbox/default.nix @@ -20,7 +20,6 @@ pytest-xdist, pytestCheckHook, python-dateutil, - pythonOlder, requests, shapely, strenum, @@ -29,13 +28,10 @@ typing-extensions, }: -buildPythonPackage rec { - pname = "labelbox"; +let version = "6.6.0"; pyproject = true; - disabled = pythonOlder "3.8"; - src = fetchFromGitHub { owner = "Labelbox"; repo = "labelbox-python"; @@ -43,6 +39,27 @@ buildPythonPackage rec { hash = "sha256-aMJJZ9ONnjFK/J4pyLTFQox/cC8ij85IYNlJTFrfV2I="; }; + lbox-clients = buildPythonPackage { + inherit src version pyproject; + + pname = "lbox-clients"; + + sourceRoot = "${src.name}/libs/lbox-clients"; + + build-system = [ hatchling ]; + + dependencies = [ + google-api-core + requests + ]; + + }; +in +buildPythonPackage rec { + inherit src version pyproject; + + pname = "labelbox"; + sourceRoot = "${src.name}/libs/labelbox"; pythonRelaxDeps = [ @@ -54,6 +71,7 @@ buildPythonPackage rec { dependencies = [ google-api-core + lbox-clients pydantic python-dateutil requests @@ -97,11 +115,11 @@ buildPythonPackage rec { pythonImportsCheck = [ "labelbox" ]; - meta = with lib; { + meta = { description = "Platform API for LabelBox"; homepage = "https://github.com/Labelbox/labelbox-python"; changelog = "https://github.com/Labelbox/labelbox-python/releases/tag/v.${src.tag}"; - license = licenses.asl20; - maintainers = with maintainers; [ rakesh4g ]; + license = lib.licenses.asl20; + maintainers = with lib.maintainers; [ rakesh4g ]; }; } From 7b2772c14dbb2296a081e2195fcf7a8d1ac89abd Mon Sep 17 00:00:00 2001 From: Sarah Clark Date: Fri, 16 May 2025 19:18:30 -0700 Subject: [PATCH 2/2] python3Packages.labelbox: 6.6.0 -> 6.10.0 Changelogs: * https://github.com/Labelbox/labelbox-python/releases/tag/v.6.10.0 * https://github.com/Labelbox/labelbox-python/releases/tag/v.6.9.0 * https://github.com/Labelbox/labelbox-python/releases/tag/v.6.8.0 * https://github.com/Labelbox/labelbox-python/releases/tag/v.6.8.0 diff: https://github.com/Labelbox/labelbox-python/compare/v.6.6.0...v.6.10.0 --- .../python-modules/labelbox/default.nix | 20 +++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/labelbox/default.nix b/pkgs/development/python-modules/labelbox/default.nix index 25fe94199e94..0c0737abdead 100644 --- a/pkgs/development/python-modules/labelbox/default.nix +++ b/pkgs/development/python-modules/labelbox/default.nix @@ -29,14 +29,14 @@ }: let - version = "6.6.0"; + version = "6.10.0"; pyproject = true; src = fetchFromGitHub { owner = "Labelbox"; repo = "labelbox-python"; tag = "v.${version}"; - hash = "sha256-aMJJZ9ONnjFK/J4pyLTFQox/cC8ij85IYNlJTFrfV2I="; + hash = "sha256-EstHsY9yFeUhQAx3pgvKk/o3EMkr3JeHDDg/p6meDIE="; }; lbox-clients = buildPythonPackage { @@ -48,11 +48,23 @@ let build-system = [ hatchling ]; + postPatch = '' + substituteInPlace pyproject.toml \ + --replace "--durations=20 --cov=lbox.example" "--durations=20" + ''; + dependencies = [ google-api-core requests ]; + nativeCheckInputs = [ + pytestCheckHook + ]; + + doCheck = true; + + __darwinAllowLocalNetworking = true; }; in buildPythonPackage rec { @@ -113,6 +125,10 @@ buildPythonPackage rec { "tests/unit/test_label_data_type.py" ]; + doCheck = true; + + __darwinAllowLocalNetworking = true; + pythonImportsCheck = [ "labelbox" ]; meta = {