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