Merge pull request #241202 from tjni/pytrends

python310Packages.pytrends: 4.9.0 -> 4.9.2
This commit is contained in:
Weijia Wang 2023-07-04 11:22:02 +03:00 committed by GitHub
commit 988a9e0d89
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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; {