python3Packages.labelbox: enable some tests

This commit is contained in:
Fabian Affolter 2021-05-04 13:34:09 +02:00
parent f9f911168e
commit 112a1f6fd7

View file

@ -1,18 +1,20 @@
{ lib { lib
, backoff
, backports-datetime-fromisoformat
, buildPythonPackage , buildPythonPackage
, fetchPypi
, requests
, jinja2
, pillow
, dataclasses , dataclasses
, fetchFromGitHub
, google-api-core
, jinja2
, ndjson
, pillow
, pydantic
, pytest-cases
, pytestCheckHook
, pythonOlder , pythonOlder
, rasterio , rasterio
, requests
, shapely , shapely
, ndjson
, backoff
, pydantic
, google-api-core
, backports-datetime-fromisoformat
}: }:
buildPythonPackage rec { buildPythonPackage rec {
@ -20,27 +22,46 @@ buildPythonPackage rec {
version = "2.5.4"; version = "2.5.4";
disabled = pythonOlder "3.6"; disabled = pythonOlder "3.6";
src = fetchPypi { src = fetchFromGitHub {
inherit pname version; owner = "Labelbox";
sha256 = "sha256-L1KjP8Yzx9adTK84+Nf9JnirT4p3D3lwulWw6W1L/88="; repo = "labelbox-python";
rev = "v${version}";
sha256 = "0182klvm8bjcm8fkl9w8ypj12s026czgid8ldl6jjvmzhxpmss68";
}; };
propagatedBuildInputs = [ propagatedBuildInputs = [
jinja2 requests pillow rasterio shapely ndjson backoff backoff
google-api-core backports-datetime-fromisoformat pydantic backports-datetime-fromisoformat
dataclasses
google-api-core
jinja2
ndjson
pillow
pydantic
rasterio
requests
shapely
]; ];
postPatch = '' postPatch = ''
substituteInPlace setup.py --replace "pydantic==1.8" "pydantic>=1.8" substituteInPlace setup.py --replace "pydantic==1.8" "pydantic>=1.8"
''; '';
# Test cases are not running on pypi or GitHub checkInputs = [
doCheck = false; pytest-cases
pytestCheckHook
];
disabledTestPaths = [
# Requires network access
"tests/integration"
];
pythonImportsCheck = [ "labelbox" ]; pythonImportsCheck = [ "labelbox" ];
meta = with lib; { meta = with lib; {
homepage = "https://github.com/Labelbox/Labelbox";
description = "Platform API for LabelBox"; description = "Platform API for LabelBox";
homepage = "https://github.com/Labelbox/labelbox-python";
license = licenses.asl20; license = licenses.asl20;
maintainers = with maintainers; [ rakesh4g ]; maintainers = with maintainers; [ rakesh4g ];
}; };