1{ lib 2, buildPythonPackage 3, fetchPypi 4, setuptools 5, setuptools-scm 6, wheel 7, requests 8, lxml 9, pandas 10, pytestCheckHook 11, pytest-recording 12, responses 13}: 14 15buildPythonPackage rec { 16 pname = "pytrends"; 17 version = "4.9.2"; 18 format = "pyproject"; 19 20 src = fetchPypi { 21 inherit pname version; 22 hash = "sha256-aRxuNrGuqkdU82kr260N/0RuUo/7BS7uLn8TmqosaYk="; 23 }; 24 25 postPatch = '' 26 substituteInPlace pyproject.toml \ 27 --replace 'addopts = "--cov pytrends/"' "" 28 ''; 29 30 nativeBuildInputs = [ 31 setuptools 32 setuptools-scm 33 wheel 34 ]; 35 36 propagatedBuildInputs = [ requests lxml pandas ]; 37 38 nativeCheckInputs = [ 39 pytestCheckHook 40 pytest-recording 41 responses 42 ]; 43 44 pytestFlagsArray = [ 45 "--block-network" 46 ]; 47 48 pythonImportsCheck = [ "pytrends" ]; 49 50 meta = with lib; { 51 description = "Pseudo API for Google Trends"; 52 homepage = "https://github.com/GeneralMills/pytrends"; 53 license = [ licenses.asl20 ]; 54 maintainers = [ maintainers.mmahut ]; 55 }; 56 57}