From 565cc2a0db6b14a90a8ee946dd7ea7f1388647f6 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Mon, 7 Jun 2021 08:58:31 +0200 Subject: [PATCH 1/8] python3Packages.pyspnego: init at 0.1.6 --- .../python-modules/pyspnego/default.nix | 43 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 45 insertions(+) create mode 100644 pkgs/development/python-modules/pyspnego/default.nix diff --git a/pkgs/development/python-modules/pyspnego/default.nix b/pkgs/development/python-modules/pyspnego/default.nix new file mode 100644 index 000000000000..2f8e775e3404 --- /dev/null +++ b/pkgs/development/python-modules/pyspnego/default.nix @@ -0,0 +1,43 @@ +{ lib +, buildPythonPackage +, cryptography +, fetchFromGitHub +, pytest-mock +, pytestCheckHook +, pythonOlder +, glibcLocales +}: + +buildPythonPackage rec { + pname = "pyspnego"; + version = "0.1.6"; + disabled = pythonOlder "3.6"; + + src = fetchFromGitHub { + owner = "jborean93"; + repo = pname; + rev = "v${version}"; + sha256 = "0pfh2x0539f0k2qi2pbjm64b2fqp64c63xxpinvg1yfaw915kgpb"; + }; + + propagatedBuildInputs = [ + cryptography + ]; + + checkInputs = [ + glibcLocales + pytest-mock + pytestCheckHook + ]; + + LC_ALL = "en_US.UTF-8"; + + pythonImportsCheck = [ "spnego" ]; + + meta = with lib; { + description = "Python SPNEGO authentication library"; + homepage = "Python SPNEGO authentication library"; + license = with licenses; [ mit ]; + maintainers = with maintainers; [ fab ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index d9ba0532782a..4d89276911c0 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -6334,6 +6334,8 @@ in { pyspinel = callPackage ../development/python-modules/pyspinel { }; + pyspnego = callPackage ../development/python-modules/pyspnego { }; + pyspotify = callPackage ../development/python-modules/pyspotify { }; pysptk = callPackage ../development/python-modules/pysptk { }; From 52b3e47413be15d9798e78ef44d71e126f85c209 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Mon, 7 Jun 2021 09:01:49 +0200 Subject: [PATCH 2/8] python3Packages.smbprotocol: init at 1.5.1 --- .../python-modules/smbprotocol/default.nix | 43 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 45 insertions(+) create mode 100644 pkgs/development/python-modules/smbprotocol/default.nix diff --git a/pkgs/development/python-modules/smbprotocol/default.nix b/pkgs/development/python-modules/smbprotocol/default.nix new file mode 100644 index 000000000000..517acd6f9cca --- /dev/null +++ b/pkgs/development/python-modules/smbprotocol/default.nix @@ -0,0 +1,43 @@ +{ lib +, buildPythonPackage +, cryptography +, fetchFromGitHub +, pyspnego +, pytest-mock +, pytestCheckHook +, pythonOlder +, six +}: + +buildPythonPackage rec { + pname = "smbprotocol"; + version = "1.5.1"; + disabled = pythonOlder "3.6"; + + src = fetchFromGitHub { + owner = "jborean93"; + repo = pname; + rev = "v${version}"; + sha256 = "1ym0fvljbwgl1h7f63m3psbsvqm64fipsrrmbqb97hrhfdzxqxpa"; + }; + + propagatedBuildInputs = [ + cryptography + pyspnego + six + ]; + + checkInputs = [ + pytest-mock + pytestCheckHook + ]; + + pythonImportsCheck = [ "smbprotocol" ]; + + meta = with lib; { + description = "Python SMBv2 and v3 Client"; + homepage = "https://github.com/jborean93/smbprotocol"; + license = with licenses; [ mit ]; + maintainers = with maintainers; [ fab ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 4d89276911c0..cd657f8656cb 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -7713,6 +7713,8 @@ in { smartypants = callPackage ../development/python-modules/smartypants { }; + smbprotocol = callPackage ../development/python-modules/smbprotocol { }; + smbus-cffi = callPackage ../development/python-modules/smbus-cffi { }; smdebug-rulesconfig = callPackage ../development/python-modules/smdebug-rulesconfig { }; From ee9c929fc7bbe1e2e3252146eed040dc18e73c4e Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Mon, 7 Jun 2021 09:05:07 +0200 Subject: [PATCH 3/8] python3Packages.s3fs: 0.5.2 -> 2021.5.0 --- .../python-modules/s3fs/default.nix | 26 ++++++++++++++----- 1 file changed, 20 insertions(+), 6 deletions(-) diff --git a/pkgs/development/python-modules/s3fs/default.nix b/pkgs/development/python-modules/s3fs/default.nix index 86701865861f..63a9e722f2c1 100644 --- a/pkgs/development/python-modules/s3fs/default.nix +++ b/pkgs/development/python-modules/s3fs/default.nix @@ -1,24 +1,38 @@ -{ lib, buildPythonPackage, fetchPypi, docutils, aiobotocore, fsspec }: +{ lib +, buildPythonPackage +, fetchPypi +, docutils +, aiobotocore +, fsspec +}: buildPythonPackage rec { pname = "s3fs"; - version = "0.5.2"; + version = "2021.5.0"; src = fetchPypi { inherit pname version; - sha256 = "87e5210415db17b9de18c77bcfc4a301570cc9030ee112b77dc47ab82426bae1"; + sha256 = "sha256-cEJVMIFMaC3E9829ofKTCtgy2/G+40G1yQURxUzBJpA="; }; - buildInputs = [ docutils ]; - propagatedBuildInputs = [ aiobotocore fsspec ]; + buildInputs = [ + docutils + ]; + + propagatedBuildInputs = [ + aiobotocore + fsspec + ]; # Depends on `moto` which has a long dependency chain with exact # version requirements that can't be made to work with current # pythonPackages. doCheck = false; + pythonImportsCheck = [ "s3fs" ]; + meta = with lib; { - description = "S3FS builds on boto3 to provide a convenient Python filesystem interface for S3."; + description = "S3FS builds on boto3 to provide a convenient Python filesystem interface for S3"; homepage = "https://github.com/dask/s3fs/"; license = licenses.bsd3; maintainers = with maintainers; [ teh ]; From 5afbcec69f1cb2b8143947567512469e2ef58873 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Mon, 7 Jun 2021 10:00:58 +0200 Subject: [PATCH 4/8] python3Packages.gcsfs: 2021.04.0 -> 2021.05.0 --- .../python-modules/gcsfs/default.nix | 45 ++++++++++++++----- 1 file changed, 34 insertions(+), 11 deletions(-) diff --git a/pkgs/development/python-modules/gcsfs/default.nix b/pkgs/development/python-modules/gcsfs/default.nix index 483e4a61084e..c71794b106eb 100644 --- a/pkgs/development/python-modules/gcsfs/default.nix +++ b/pkgs/development/python-modules/gcsfs/default.nix @@ -1,31 +1,54 @@ -{ buildPythonPackage, fetchFromGitHub, lib, pytestCheckHook, google-auth -, google-auth-oauthlib, requests, decorator, fsspec, ujson, aiohttp, crcmod -, pytest-vcr, vcrpy }: +{ lib +, buildPythonPackage +, fetchFromGitHub +, pytestCheckHook +, pythonOlder +, google-auth +, google-auth-oauthlib +, requests +, decorator +, fsspec +, ujson +, aiohttp +, crcmod +, pytest-vcr +, vcrpy +}: buildPythonPackage rec { pname = "gcsfs"; - version = "2021.04.0"; + version = "2021.05.0"; + disabled = pythonOlder "3.6"; - # github sources needed for test data src = fetchFromGitHub { owner = "dask"; repo = pname; rev = version; - sha256 = "sha256-OA43DaQue7R5d6SzfKThEQFEwJndjLfznu1LMubs5fs="; + sha256 = "sha256-I17eWaijxn0+8CzfzvzXVc0t9gQ03vx29a/i+QCQ0/U="; }; propagatedBuildInputs = [ + aiohttp + crcmod + decorator + fsspec google-auth google-auth-oauthlib requests - decorator - fsspec - aiohttp ujson - crcmod ]; - checkInputs = [ pytestCheckHook pytest-vcr vcrpy ]; + checkInputs = [ + pytest-vcr + pytestCheckHook + vcrpy + ]; + + disabledTests = [ + # Tests wants to communicate with the Link-local address + "test_GoogleCredentials_None" + ]; + pythonImportsCheck = [ "gcsfs" ]; meta = with lib; { From 4704cf91c8707ca871234521fed930bd767eb7b5 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Mon, 7 Jun 2021 12:43:09 +0200 Subject: [PATCH 5/8] python3Packages.imgaug: fix build --- .../python-modules/imgaug/default.nix | 29 +++++++++++++++---- 1 file changed, 24 insertions(+), 5 deletions(-) diff --git a/pkgs/development/python-modules/imgaug/default.nix b/pkgs/development/python-modules/imgaug/default.nix index 343c7869a6c1..ab3cdd6e6d06 100644 --- a/pkgs/development/python-modules/imgaug/default.nix +++ b/pkgs/development/python-modules/imgaug/default.nix @@ -4,7 +4,7 @@ , imagecorruptions , numpy , opencv3 -, pytest +, pytestCheckHook , scikitimage , scipy , shapely @@ -43,11 +43,30 @@ buildPythonPackage rec { six ]; - checkPhase = '' - pytest ./test - ''; + checkInputs = [ + opencv3 + pytestCheckHook + ]; - checkInputs = [ opencv3 pytest ]; + disabledTests = [ + # Tests are outdated + "test_quokka_segmentation_map" + "test_pool" + "test_avg_pool" + "test_max_pool" + "test_min_pool" + "est_median_pool" + "test_alpha_is_080" + "test_face_and_lines_at_half_visibility" + "test_polygon_fully_inside_image__no_rectangular_shape" + ]; + + disabledTestPaths = [ + # TypeError: int() argument must be a string, a bytes-like object or a number, not 'NoneType' + "test/augmenters/test_pooling.py" + ]; + + pythonImportsCheck = [ "imgaug" ]; meta = with lib; { homepage = "https://github.com/aleju/imgaug"; From 31634eb7d82903f5e3406f95262e1b307da525e0 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Mon, 7 Jun 2021 13:02:12 +0200 Subject: [PATCH 6/8] python3Packages.zeep: 3.4.0 -> 4.0.0 --- .../python-modules/zeep/default.nix | 90 +++++++++---------- 1 file changed, 45 insertions(+), 45 deletions(-) diff --git a/pkgs/development/python-modules/zeep/default.nix b/pkgs/development/python-modules/zeep/default.nix index 50dda4c8edbd..7c72d2500346 100644 --- a/pkgs/development/python-modules/zeep/default.nix +++ b/pkgs/development/python-modules/zeep/default.nix @@ -1,85 +1,85 @@ -{ fetchPypi -, lib -, fetchpatch -, buildPythonPackage -, isPy3k +{ lib +, aiohttp +, aioresponses , appdirs , attrs +, buildPythonPackage , cached-property , defusedxml +, fetchFromGitHub +, freezegun +, httpx , isodate , lxml -, requests -, requests_toolbelt -, six -, pytz -, tornado -, aiohttp -# test dependencies -, freezegun , mock , pretend -, pytest -, pytestcov +, pytest-asyncio +, pytest-httpx +, pytestCheckHook +, pythonOlder +, pytz +, requests +, requests_toolbelt +, requests-file , requests-mock -, aioresponses +, xmlsec }: buildPythonPackage rec { pname = "zeep"; - version = "3.4.0"; + version = "4.0.0"; + disabled = pythonOlder "3.6"; - src = fetchPypi { - inherit pname version; - sha256 = "0e98669cfeb60756231ae185498f9ae21b30b2681786b8de58ed34c3b93e41dd"; + src = fetchFromGitHub { + owner = "mvantellingen"; + repo = "python-zeep"; + rev = version; + sha256 = "1rwmwk47fxs8dxwv5dr6gbnbiyilznifb47fhbxgzj231w0y82cm"; }; - patches = [ - ( fetchpatch { - url = "https://github.com/mvantellingen/python-zeep/pull/1006/commits/ba7edd6bf2b31023b31e8f17c161e1d6d5af3d29.patch"; - sha256 = "1j0jd5hmh457im9sbawaqf6pnfy36fhr9wqdim8wk5da9ixr0ajs"; - }) - ]; - propagatedBuildInputs = [ appdirs attrs cached-property defusedxml + httpx isodate lxml + pytz requests requests_toolbelt - six - pytz - - # optional requirements - tornado - ] ++ lib.optional isPy3k aiohttp; + requests-file + xmlsec + ]; checkInputs = [ + aiohttp + aioresponses freezegun mock pretend - pytestcov - pytest + pytest-asyncio + pytest-httpx + pytestCheckHook requests-mock - ] ++ lib.optional isPy3k aioresponses; + xmlsec + ]; - checkPhase = '' - runHook preCheck - # fix compatibility with pytest 4 - substituteInPlace tests/conftest.py \ - --replace 'request.node.get_marker("requests")' 'request.node.get_closest_marker("requests")' - # ignored tests requires xmlsec python module - HOME=$(mktemp -d) pytest tests --ignore tests/test_wsse_signature.py - runHook postCheck + preCheck = '' + export HOME=$(mktemp -d); ''; + disabledTests = [ + # lxml.etree.XMLSyntaxError: Extra content at the end of the document, line 2, column 64 + "test_mime_content_serialize_text_xml" + ]; + + pythonImportsCheck = [ "zeep" ]; + meta = with lib; { + description = "Python SOAP client"; homepage = "http://docs.python-zeep.org"; license = licenses.mit; - description = "A modern/fast Python SOAP client based on lxml / requests"; maintainers = with maintainers; [ rvl ]; }; } From fe84261826dff85b64796363e513a895f39f1412 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Mon, 7 Jun 2021 13:05:08 +0200 Subject: [PATCH 7/8] python3Packages.xmlsec: 1.3.9 -> 1.3.11 --- pkgs/development/python-modules/xmlsec/default.nix | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/xmlsec/default.nix b/pkgs/development/python-modules/xmlsec/default.nix index 82f4a968ba6e..b8c60f1b6425 100644 --- a/pkgs/development/python-modules/xmlsec/default.nix +++ b/pkgs/development/python-modules/xmlsec/default.nix @@ -16,11 +16,11 @@ buildPythonPackage rec { pname = "xmlsec"; - version = "1.3.9"; + version = "1.3.11"; src = fetchPypi { inherit pname version; - sha256 = "1c4k42zv3plm6v65p7z6l5rxyf50h40d02nhc16vq7cjrfvdf4rx"; + sha256 = "sha256-zS6q/38xeEoH3ZnOgfp2cxPfO6GDT6pBQ+4sBwAMrHo="; }; # https://github.com/mehcode/python-xmlsec/issues/84#issuecomment-632930116 @@ -38,6 +38,8 @@ buildPythonPackage rec { checkInputs = [ pytestCheckHook hypothesis ]; disabledTestPaths = [ "tests/test_doc_examples.py" ]; + pythonImportsCheck = [ "xmlsec" ]; + meta = with lib; { description = "Python bindings for the XML Security Library"; homepage = "https://github.com/mehcode/python-xmlsec"; From 0b963e0fed8c006a29983dee867fcb3cdacd8ca0 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Tue, 8 Jun 2021 20:19:33 +0200 Subject: [PATCH 8/8] python3Packages.fsspec: 2021.04.0 -> 2021.05.0 --- .../python-modules/fsspec/default.nix | 29 ++++++++++++++----- 1 file changed, 21 insertions(+), 8 deletions(-) diff --git a/pkgs/development/python-modules/fsspec/default.nix b/pkgs/development/python-modules/fsspec/default.nix index fbcf09de2eb3..e1a5611dfd30 100644 --- a/pkgs/development/python-modules/fsspec/default.nix +++ b/pkgs/development/python-modules/fsspec/default.nix @@ -1,33 +1,44 @@ { lib +, stdenv , buildPythonPackage , fetchFromGitHub , pythonOlder , pytestCheckHook , numpy -, stdenv , aiohttp , pytest-vcr , requests +, paramiko +, smbprotocol }: buildPythonPackage rec { pname = "fsspec"; - version = "2021.04.0"; - disabled = pythonOlder "3.5"; + version = "2021.05.0"; + disabled = pythonOlder "3.6"; src = fetchFromGitHub { owner = "intake"; repo = "filesystem_spec"; rev = version; - sha256 = "sha256-9072kb1VEQ0xg9hB8yEzJMD2Ttd3UGjBmTuhE+Uya1k="; + sha256 = "sha256-MQjUBLmx3Lb3nZNU/AgBKUQ/qNOd+XH+2YI51wV8AO0="; }; - checkInputs = [ pytestCheckHook numpy pytest-vcr ]; + propagatedBuildInputs = [ + aiohttp + paramiko + requests + smbprotocol + ]; + + checkInputs = [ + numpy + pytest-vcr + pytestCheckHook + ]; __darwinAllowLocalNetworking = true; - propagatedBuildInputs = [ aiohttp requests ]; - disabledTests = [ # Test assumes user name is part of $HOME # AssertionError: assert 'nixbld' in '/homeless-shelter/foo/bar' @@ -43,8 +54,10 @@ buildPythonPackage rec { "test_touch" ]; + pythonImportsCheck = [ "fsspec" ]; + meta = with lib; { - description = "A specification that python filesystems should adhere to"; + description = "A specification that Python filesystems should adhere to"; homepage = "https://github.com/intake/filesystem_spec"; license = licenses.bsd3; maintainers = [ maintainers.costrouc ];