From 981d2eebe3cbeb4e5ee418d38eb1e823cb3b845f Mon Sep 17 00:00:00 2001 From: Nick Cao Date: Sun, 12 Feb 2023 10:12:31 +0800 Subject: [PATCH 1/2] python3Packages.remotezip: init at 0.12.1 --- .../python-modules/remotezip/default.nix | 47 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 49 insertions(+) create mode 100644 pkgs/development/python-modules/remotezip/default.nix diff --git a/pkgs/development/python-modules/remotezip/default.nix b/pkgs/development/python-modules/remotezip/default.nix new file mode 100644 index 000000000000..5a79b68e6b85 --- /dev/null +++ b/pkgs/development/python-modules/remotezip/default.nix @@ -0,0 +1,47 @@ +{ lib +, buildPythonPackage +, fetchFromGitHub +, requests +, tabulate +, pytestCheckHook +, requests-mock +}: + +buildPythonPackage { + pname = "remotezip"; + version = "0.12.1"; + format = "setuptools"; + + src = fetchFromGitHub { + owner = "gtsystem"; + repo = "python-remotezip"; + # upstream does not tag releases, determined with git blame + # pypi archive lacks files for tests + rev = "da62e115bdb2071ad08a8c91f7ae48f2c1827e0c"; + hash = "sha256-su4dlV8KZuewf/yGdTnGHK9hNLHwGe10ditmFcne4Us="; + }; + + propagatedBuildInputs = [ + requests + tabulate + ]; + + nativeCheckInputs = [ + pytestCheckHook + ]; + + checkInputs = [ + requests-mock + ]; + + pythonImportsCheck = [ + "remotezip" + ]; + + meta = with lib; { + description = "Python module to access single members of a zip archive without downloading the full content"; + homepage = "https://github.com/gtsystem/python-remotezip"; + license = licenses.mit; + maintainers = with maintainers; [ nickcao ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 3710c88a2f6a..b667cd01f9ee 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -9943,6 +9943,8 @@ self: super: with self; { remote-pdb = callPackage ../development/python-modules/remote-pdb { }; + remotezip = callPackage ../development/python-modules/remotezip { }; + renault-api = callPackage ../development/python-modules/renault-api { }; rencode = callPackage ../development/python-modules/rencode { }; From 2db77945804dc4fd02e628660a48fbe25b5f451c Mon Sep 17 00:00:00 2001 From: Nick Cao Date: Sun, 12 Feb 2023 10:51:04 +0800 Subject: [PATCH 2/2] python3Packages.asf-search: sync deps with upstream --- .../python-modules/asf-search/default.nix | 38 ++++++++++--------- 1 file changed, 20 insertions(+), 18 deletions(-) diff --git a/pkgs/development/python-modules/asf-search/default.nix b/pkgs/development/python-modules/asf-search/default.nix index b0d2b1f72386..686a9e92cebf 100644 --- a/pkgs/development/python-modules/asf-search/default.nix +++ b/pkgs/development/python-modules/asf-search/default.nix @@ -1,17 +1,19 @@ { lib , buildPythonPackage -, dateparser , fetchFromGitHub +, pythonOlder +, requests +, shapely +, python-dateutil +, pytz , importlib-metadata , numpy +, dateparser +, jinja2 +, remotezip , pytestCheckHook -, python-dateutil -, pythonOlder -, pytz -, requests , requests-mock -, shapely -, wktutils +, defusedxml }: buildPythonPackage rec { @@ -29,25 +31,25 @@ buildPythonPackage rec { }; propagatedBuildInputs = [ - dateparser - importlib-metadata - numpy - python-dateutil - pytz requests shapely - wktutils + python-dateutil + pytz + importlib-metadata + numpy + dateparser + jinja2 + remotezip ]; nativeCheckInputs = [ pytestCheckHook - requests-mock ]; - postPatch = '' - substituteInPlace setup.py \ - --replace "WKTUtils==" "WKTUtils>=" - ''; + checkInputs = [ + requests-mock + defusedxml + ]; pythonImportsCheck = [ "asf_search"