hoarder: 0.21.0 -> 0.22.0
[NixPkgs.git] / pkgs / development / python-modules / pyppeteer / default.nix
blobf7a754b8a1f0777012f5f5a6ab5f6eae86d8e291
2   lib,
3   appdirs,
4   buildPythonPackage,
5   certifi,
6   fetchFromGitHub,
7   importlib-metadata,
8   poetry-core,
9   pyee,
10   pytest-xdist,
11   pytestCheckHook,
12   pythonOlder,
13   syncer,
14   tqdm,
15   urllib3,
16   websockets,
19 buildPythonPackage rec {
20   pname = "pyppeteer";
21   version = "1.0.2";
22   pyproject = true;
24   disabled = pythonOlder "3.7";
26   src = fetchFromGitHub {
27     owner = "pyppeteer";
28     repo = "pyppeteer";
29     tag = version;
30     hash = "sha256-izMaWtJdkLHMQbyq7o7n46xB8dOHXZ5uO0UXt+twjL4=";
31   };
33   postPatch = ''
34     substituteInPlace pyproject.toml \
35       --replace 'pyee = "^8.1.0"' 'pyee = "*"' \
36       --replace 'urllib3 = "^1.25.8"' 'urllib3 = "*"' \
37       --replace 'websockets = "^10.0"' 'websockets = "*"'
38   '';
40   nativeBuildInputs = [ poetry-core ];
42   propagatedBuildInputs = [
43     appdirs
44     certifi
45     importlib-metadata
46     pyee
47     tqdm
48     urllib3
49     websockets
50   ];
52   nativeCheckInputs = [
53     syncer
54     pytest-xdist
55     pytestCheckHook
56   ];
58   disabledTestPaths = [
59     # Requires network access
60     "tests/test_browser.py"
61     "tests/test_browser_context.py"
62     "tests/test_connection.py"
63     "tests/test_coverage.py"
64     "tests/test_dialog.py"
65     "tests/test_element_handle.py"
66     "tests/test_execution_context.py"
67     "tests/test_frame.py"
68     "tests/test_input.py"
69     "tests/test_launcher.py"
70     "tests/test_network.py"
71     "tests/test_page.py"
72     "tests/test_pyppeteer.py"
73     "tests/test_target.py"
74     "tests/test_tracing.py"
75     "tests/test_worker.py"
76   ];
78   disabledTests = [
79     # Requires network access
80     "TestScreenShot"
81     "TestBrowserCrash"
82     "TestPDF"
83   ];
85   pythonImportsCheck = [ "pyppeteer" ];
87   meta = with lib; {
88     description = "Headless chrome/chromium automation library (unofficial port of puppeteer)";
89     mainProgram = "pyppeteer-install";
90     homepage = "https://github.com/pyppeteer/pyppeteer";
91     changelog = "https://github.com/pyppeteer/pyppeteer/blob/${version}/CHANGELOG.md";
92     license = licenses.mit;
93     maintainers = with maintainers; [ kmein ];
94   };