Merge pull request #268619 from tweag/lib-descriptions
[NixPkgs.git] / pkgs / development / python-modules / pytrends / default.nix
blobd52436348ad745e92f82e225e6dc4e800d1b5932
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
15 buildPythonPackage rec {
16   pname = "pytrends";
17   version = "4.9.2";
18   format = "pyproject";
20   src = fetchPypi {
21     inherit pname version;
22     hash = "sha256-aRxuNrGuqkdU82kr260N/0RuUo/7BS7uLn8TmqosaYk=";
23   };
25   postPatch = ''
26     substituteInPlace pyproject.toml \
27       --replace 'addopts = "--cov pytrends/"' ""
28   '';
30   nativeBuildInputs = [
31     setuptools
32     setuptools-scm
33     wheel
34   ];
36   propagatedBuildInputs = [ requests lxml pandas ];
38   nativeCheckInputs = [
39     pytestCheckHook
40     pytest-recording
41     responses
42   ];
44   pytestFlagsArray = [
45     "--block-network"
46   ];
48   pythonImportsCheck = [ "pytrends" ];
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   };