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";
|
2019-10-24 07:47:40 +01:00
|
|
|
version = "1.41.0";
|
2018-02-03 13:11:53 +00:00
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2019-10-24 07:47:40 +01:00
|
|
|
sha256 = "685021502293f6b2e733376bcd0fef3f082c1a66c27072d92f483e27e387ad43";
|
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
|
|
|
}
|