git.iko.soy/typeable/nixpkgs
on master help sign in
Merge pull request #121677 from fabaff/bump-labelbox

python3Packages.labelbox: 2.5.1 -> 2.5.4

commit28907d3bffaaf3e73e3f1c7ff59923c4b66afd38 authorFabian Affolter <fabian@affolter-engineering.ch> dateThu 6 May 2021, 18:42 (6 years ago) parent59bf1c2112a1f6
4 files changed+136−15
pkgs/development/python-modules/decopatch/default.nix+37 pkgs/development/python-modules/labelbox/default.nix+44−15 pkgs/development/python-modules/pytest-cases/default.nix+51 pkgs/top-level/python-packages.nix+4
pkgs/development/python-modules/decopatch/default.nixnew file+37
@@ -0,0 +1,37 @@
1+{ lib
2+, buildPythonPackage
3+, fetchPypi
4+, makefun
5+, setuptools-scm
6+}:
7+
8+buildPythonPackage rec {
9+ pname = "decopatch";
10+ version = "1.4.8";
11+
12+ src = fetchPypi {
13+ inherit pname version;
14+ sha256 = "0i6i811s2j1z0cl6y177dwsbfxib8dvb5c2jpgklvc2xy4ahhsy6";
15+ };
16+
17+ nativeBuildInputs = [ setuptools-scm ];
18+
19+ propagatedBuildInputs = [ makefun ];
20+
21+ postPatch = ''
22+ substituteInPlace setup.py --replace "'pytest-runner', " ""
23+ '';
24+
25+ # Tests would introduce multiple cirucular dependencies
26+ # Affected: makefun, pytest-cases
27+ doCheck = false;
28+
29+ pythonImportsCheck = [ "decopatch" ];
30+
31+ meta = with lib; {
32+ description = "Python helper for decorators";
33+ homepage = "https://github.com/smarie/python-decopatch";
34+ license = licenses.bsd3;
35+ maintainers = with maintainers; [ fab ];
36+ };
37+}
pkgs/development/python-modules/labelbox/default.nix+44−15
@@ -1,38 +1,67 @@
11{ lib
2+, backoff
3+, backports-datetime-fromisoformat
24, buildPythonPackage
3−, fetchPypi
4−, requests
5+, dataclasses
6+, fetchFromGitHub
7+, google-api-core
58, jinja2
9+, ndjson
610, pillow
11+, pydantic
12+, pytest-cases
13+, pytestCheckHook
14+, pythonOlder
715, rasterio
16+, requests
817, shapely
9−, ndjson
10−, backoff
11−, google-api-core
12−, backports-datetime-fromisoformat
1318}:
1419
1520buildPythonPackage rec {
1621 pname = "labelbox";
17− version = "2.5.1";
22+ version = "2.5.4";
23+ disabled = pythonOlder "3.6";
1824
19− src = fetchPypi {
20− inherit pname version;
21− sha256 = "7f2cbc5d4869d8acde865ad519fc1cc85338247cd7cf534334f988a040679219";
25+ src = fetchFromGitHub {
26+ owner = "Labelbox";
27+ repo = "labelbox-python";
28+ rev = "v${version}";
29+ sha256 = "0182klvm8bjcm8fkl9w8ypj12s026czgid8ldl6jjvmzhxpmss68";
2230 };
2331
2432 propagatedBuildInputs = [
25− jinja2 requests pillow rasterio shapely ndjson backoff
26− google-api-core backports-datetime-fromisoformat
33+ backoff
34+ backports-datetime-fromisoformat
35+ dataclasses
36+ google-api-core
37+ jinja2
38+ ndjson
39+ pillow
40+ pydantic
41+ rasterio
42+ requests
43+ shapely
44+ ];
45+
46+ postPatch = ''
47+ substituteInPlace setup.py --replace "pydantic==1.8" "pydantic>=1.8"
48+ '';
49+
50+ checkInputs = [
51+ pytest-cases
52+ pytestCheckHook
53+ ];
54+
55+ disabledTestPaths = [
56+ # Requires network access
57+ "tests/integration"
2758 ];
2859
29− # Test cases are not running on pypi or GitHub
30− doCheck = false;
3160 pythonImportsCheck = [ "labelbox" ];
3261
3362 meta = with lib; {
34− homepage = "https://github.com/Labelbox/Labelbox";
3563 description = "Platform API for LabelBox";
64+ homepage = "https://github.com/Labelbox/labelbox-python";
3665 license = licenses.asl20;
3766 maintainers = with maintainers; [ rakesh4g ];
3867 };
pkgs/development/python-modules/pytest-cases/default.nixnew file+51
@@ -0,0 +1,51 @@
1+{ lib
2+, buildPythonPackage
3+, fetchPypi
4+, makefun
5+, decopatch
6+, pythonOlder
7+, pytest
8+, setuptools-scm
9+}:
10+
11+buildPythonPackage rec {
12+ pname = "pytest-cases";
13+ version = "3.4.6";
14+ disabled = pythonOlder "3.6";
15+
16+ src = fetchPypi {
17+ inherit pname version;
18+ sha256 = "17w4s6622i97q81g15zamqm536ib00grgdfk2f4kk9bw2k7sdlq6";
19+ };
20+
21+ nativeBuildInputs = [
22+ setuptools-scm
23+ ];
24+
25+ buildInputs = [
26+ pytest
27+ ];
28+
29+ propagatedBuildInputs = [
30+ decopatch
31+ makefun
32+ ];
33+
34+ postPatch = ''
35+ substituteInPlace setup.cfg --replace "pytest-runner" ""
36+ '';
37+
38+ # Tests have dependencies (pytest-harvest, pytest-steps) which
39+ # are not available in Nixpkgs. Most of the packages (decopatch,
40+ # makefun, pytest-*) have circular dependecies.
41+ doCheck = false;
42+
43+ pythonImportsCheck = [ "pytest_cases" ];
44+
45+ meta = with lib; {
46+ description = "Separate test code from test cases in pytest";
47+ homepage = "https://github.com/smarie/python-pytest-cases";
48+ license = licenses.bsd3;
49+ maintainers = with maintainers; [ fab ];
50+ };
51+}
pkgs/top-level/python-packages.nix+4
@@ -1733,6 +1733,8 @@ in {
17331733
17341734 decorator = callPackage ../development/python-modules/decorator { };
17351735
1736+ decopatch = callPackage ../development/python-modules/decopatch { };
1737+
17361738 deep_merge = callPackage ../development/python-modules/deep_merge { };
17371739
17381740 deepdiff = callPackage ../development/python-modules/deepdiff { };
@@ -6267,6 +6269,8 @@ in {
62676269 pytest-cache = self.pytestcache; # added 2021-01-04
62686270 pytestcache = callPackage ../development/python-modules/pytestcache { };
62696271
6272+ pytest-cases = callPackage ../development/python-modules/pytest-cases{ };
6273+
62706274 pytest-catchlog = callPackage ../development/python-modules/pytest-catchlog { };
62716275
62726276 pytest-celery = callPackage ../development/python-modules/pytest-celery { };