1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 poetry-core,
6 pytest,
7 pythonOlder,
8 setuptoolsBuildHook,
9}:
10
11buildPythonPackage rec {
12 pname = "pytest-socket";
13 version = "0.7.0";
14 pyproject = true;
15
16 disabled = pythonOlder "3.7";
17
18 src = fetchFromGitHub {
19 owner = "miketheman";
20 repo = "pytest-socket";
21 rev = "refs/tags/${version}";
22 hash = "sha256-19YF3q85maCVdVg2HOOPbN45RNjBf6kiFAhLut8B2tQ=";
23 };
24
25 nativeBuildInputs = [ poetry-core ];
26
27 buildInputs = [ pytest ];
28
29 # pytest-socket require network for majority of tests
30 doCheck = false;
31
32 pythonImportsCheck = [ "pytest_socket" ];
33
34 meta = with lib; {
35 description = "Pytest Plugin to disable socket calls during tests";
36 homepage = "https://github.com/miketheman/pytest-socket";
37 changelog = "https://github.com/miketheman/pytest-socket/blob/${version}/CHANGELOG.md";
38 license = licenses.mit;
39 maintainers = with maintainers; [ ];
40 };
41}