1{
2 lib,
3 buildPythonPackage,
4 fetchPypi,
5 pytestCheckHook,
6 pythonOlder,
7 setuptools,
8 requests,
9 requests-mock,
10}:
11
12buildPythonPackage rec {
13 pname = "packet-python";
14 version = "1.44.3";
15 pyproject = true;
16
17 disabled = pythonOlder "3.7";
18
19 src = fetchPypi {
20 inherit pname version;
21 hash = "sha256-WVfMELOoml7Hx78jy6TAwlFRLuSQu9dtsb6Khs6/cgI=";
22 };
23
24 postPatch = ''
25 substituteInPlace setup.py \
26 --replace-fail "pytest-runner" ""
27 '';
28
29 build-system = [ setuptools ];
30
31 dependencies = [ requests ];
32
33 nativeCheckInputs = [
34 pytestCheckHook
35 requests-mock
36 ];
37
38 pythonImportsCheck = [ "packet" ];
39
40 meta = with lib; {
41 description = "Python client for the Packet API";
42 homepage = "https://github.com/packethost/packet-python";
43 changelog = "https://github.com/packethost/packet-python/blob/v${version}/CHANGELOG.md";
44 license = licenses.lgpl3Only;
45 maintainers = with maintainers; [ dipinhora ];
46 };
47}