From 3e1716fe60431a047654ec2c04aa64adda227f9c Mon Sep 17 00:00:00 2001 From: Theodore Ni <3806110+tjni@users.noreply.github.com> Date: Sun, 2 Jul 2023 19:10:30 -0700 Subject: [PATCH] python310Packages.pytrends: 4.9.0 -> 4.9.2 --- .../python-modules/pytrends/default.nix | 31 ++++++++++++++++--- 1 file changed, 26 insertions(+), 5 deletions(-) diff --git a/pkgs/development/python-modules/pytrends/default.nix b/pkgs/development/python-modules/pytrends/default.nix index 77c055b4e665..84a5aed8c7ad 100644 --- a/pkgs/development/python-modules/pytrends/default.nix +++ b/pkgs/development/python-modules/pytrends/default.nix @@ -1,25 +1,46 @@ { lib , buildPythonPackage , fetchPypi -, isPy27 +, setuptools , requests , lxml , pandas +, pytestCheckHook +, pytest-recording +, responses }: buildPythonPackage rec { pname = "pytrends"; - version = "4.9.0"; - disabled = isPy27; # python2 pandas is too old + version = "4.9.2"; + format = "pyproject"; src = fetchPypi { inherit pname version; - hash = "sha256-pU/B4xcUQrPI9cCApeId+Ae8T6rXeQzGK33bBZ6wqUs="; + hash = "sha256-aRxuNrGuqkdU82kr260N/0RuUo/7BS7uLn8TmqosaYk="; }; + postPatch = '' + substituteInPlace pyproject.toml \ + --replace 'addopts = "--cov pytrends/"' "" + ''; + + nativeBuildInputs = [ + setuptools + ]; + propagatedBuildInputs = [ requests lxml pandas ]; - doCheck = false; + nativeCheckInputs = [ + pytestCheckHook + pytest-recording + responses + ]; + + pytestFlagsArray = [ + "--block-network" + ]; + pythonImportsCheck = [ "pytrends" ]; meta = with lib; {