1{
2 lib,
3 arrow,
4 beautifulsoup4,
5 bibtexparser,
6 buildPythonPackage,
7 deprecated,
8 fake-useragent,
9 fetchFromGitHub,
10 free-proxy,
11 httpx,
12 python-dotenv,
13 requests,
14 selenium,
15 setuptools,
16 sphinx-rtd-theme,
17 stem,
18 typing-extensions,
19 wheel,
20}:
21
22buildPythonPackage rec {
23 pname = "scholarly";
24 version = "1.7.11";
25 pyproject = true;
26
27 src = fetchFromGitHub {
28 owner = "scholarly-python-package";
29 repo = "scholarly";
30 tag = "v${version}";
31 hash = "sha256-yvew63tGwSjwseHK7wDqm26xiyCztUzxMqBpwwLD798=";
32 };
33
34 build-system = [
35 setuptools
36 wheel
37 ];
38
39 dependencies = [
40 arrow
41 beautifulsoup4
42 bibtexparser
43 deprecated
44 fake-useragent
45 free-proxy
46 httpx
47 python-dotenv
48 requests
49 selenium
50 sphinx-rtd-theme
51 typing-extensions
52 ];
53
54 optional-dependencies = {
55 tor = [ stem ];
56 };
57
58 nativeCheckInputs = lib.flatten (lib.attrValues optional-dependencies);
59
60 pythonImportsCheck = [ "scholarly" ];
61
62 meta = {
63 description = "Retrieve author and publication information from Google Scholar";
64 homepage = "https://scholarly.readthedocs.io/";
65 changelog = "https://github.com/scholarly-python-package/scholarly/releases/tag/${src.tag}";
66 license = lib.licenses.unlicense;
67 maintainers = with lib.maintainers; [ getchoo ];
68 };
69}