Merge pull request #206980 from fabaff/labelbox-fix

python310Packages.labelbox: 3.24.1 -> 3.33.1
This commit is contained in:
Fabian Affolter 2022-12-20 14:06:05 +01:00 committed by GitHub
commit 2bd27565a4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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 ];
};