2018-02-03 13:11:53 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchPypi
|
|
|
|
, requests
|
|
|
|
, python
|
2019-05-30 22:23:56 +01:00
|
|
|
|
|
|
|
# For tests/setup.py
|
2019-05-30 22:24:38 +01:00
|
|
|
, pytest
|
2019-05-30 22:23:56 +01:00
|
|
|
, pytestrunner
|
2019-05-30 22:24:38 +01:00
|
|
|
, requests-mock
|
2018-02-03 13:11:53 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "packet-python";
|
2020-10-25 09:06:54 +00:00
|
|
|
version = "1.43.1";
|
2018-02-03 13:11:53 +00:00
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2020-10-25 09:06:54 +00:00
|
|
|
sha256 = "e333fb5ce45a3f283ddeb6261d061b39328b82eb440a89233fa08ce3fec2fcf0";
|
2018-02-03 13:11:53 +00:00
|
|
|
};
|
2019-05-30 22:23:56 +01:00
|
|
|
nativeBuildInputs = [ pytestrunner ];
|
2018-02-03 13:11:53 +00:00
|
|
|
propagatedBuildInputs = [ requests ];
|
2019-05-30 22:24:38 +01:00
|
|
|
checkInputs = [
|
|
|
|
pytest
|
|
|
|
pytestrunner
|
|
|
|
requests-mock
|
|
|
|
];
|
2018-02-03 13:11:53 +00:00
|
|
|
|
|
|
|
checkPhase = ''
|
2019-05-30 22:24:38 +01:00
|
|
|
${python.interpreter} setup.py test
|
2018-02-03 13:11:53 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
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 ];
|
|
|
|
};
|
2019-05-30 22:23:56 +01:00
|
|
|
}
|