2020-04-24 23:36:52 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchPypi
|
|
|
|
, requests
|
|
|
|
, python
|
|
|
|
|
|
|
|
# For tests/setup.py
|
|
|
|
, pytest
|
2021-07-24 12:14:16 +00:00
|
|
|
, pytest-runner
|
2020-04-24 23:36:52 +00:00
|
|
|
, requests-mock
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "packet-python";
|
2021-10-01 09:20:50 +00:00
|
|
|
version = "1.44.1";
|
2020-04-24 23:36:52 +00:00
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2021-10-01 09:20:50 +00:00
|
|
|
sha256 = "ec0f40465fad5260a1b2c1ad39dc12c5df65828e171bf2aafb13c1c3883628ba";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
2021-07-24 12:14:16 +00:00
|
|
|
nativeBuildInputs = [ pytest-runner ];
|
2020-04-24 23:36:52 +00:00
|
|
|
propagatedBuildInputs = [ requests ];
|
|
|
|
checkInputs = [
|
|
|
|
pytest
|
2021-07-24 12:14:16 +00:00
|
|
|
pytest-runner
|
2020-04-24 23:36:52 +00:00
|
|
|
requests-mock
|
|
|
|
];
|
|
|
|
|
|
|
|
checkPhase = ''
|
|
|
|
${python.interpreter} setup.py test
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
description = "A Python client for the Packet API.";
|
|
|
|
homepage = "https://github.com/packethost/packet-python";
|
|
|
|
license = lib.licenses.lgpl3;
|
|
|
|
maintainers = with lib.maintainers; [ dipinhora ];
|
|
|
|
};
|
|
|
|
}
|