summaryrefslogtreecommitdiff
path: root/pkgs/development/python-modules/packet-python
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/development/python-modules/packet-python')
-rw-r--r--pkgs/development/python-modules/packet-python/default.nix43
1 files changed, 26 insertions, 17 deletions
diff --git a/pkgs/development/python-modules/packet-python/default.nix b/pkgs/development/python-modules/packet-python/default.nix
index 2d33c3f57233..8c88e6dc6ea7 100644
--- a/pkgs/development/python-modules/packet-python/default.nix
+++ b/pkgs/development/python-modules/packet-python/default.nix
@@ -1,38 +1,47 @@
{ lib
, buildPythonPackage
, fetchPypi
+, pytestCheckHook
+, pythonOlder
, requests
-, python
-
-# For tests/setup.py
-, pytest
-, pytest-runner
, requests-mock
}:
buildPythonPackage rec {
pname = "packet-python";
version = "1.44.3";
+ format = "setuptools";
+
+ disabled = pythonOlder "3.7";
+
src = fetchPypi {
inherit pname version;
hash = "sha256-WVfMELOoml7Hx78jy6TAwlFRLuSQu9dtsb6Khs6/cgI=";
};
- nativeBuildInputs = [ pytest-runner ];
- propagatedBuildInputs = [ requests ];
+
+ postPatch = ''
+ substituteInPlace setup.py \
+ --replace "pytest-runner" ""
+ '';
+
+ propagatedBuildInputs = [
+ requests
+ ];
+
nativeCheckInputs = [
- pytest
- pytest-runner
+ pytestCheckHook
requests-mock
];
- checkPhase = ''
- ${python.interpreter} setup.py test
- '';
+ pythonImportsCheck = [
+ "packet"
+ ];
- 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 ];
+ meta = with lib; {
+ description = "Python client for the Packet API";
+ homepage = "https://github.com/packethost/packet-python";
+ changelog = "https://github.com/packethost/packet-python/blob/v${version}/CHANGELOG.md";
+ license = licenses.lgpl3Only;
+ maintainers = with maintainers; [ dipinhora ];
};
}