about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/python-modules/requests-http-signature
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/development/python-modules/requests-http-signature')
-rw-r--r--nixpkgs/pkgs/development/python-modules/requests-http-signature/default.nix61
1 files changed, 61 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/development/python-modules/requests-http-signature/default.nix b/nixpkgs/pkgs/development/python-modules/requests-http-signature/default.nix
new file mode 100644
index 000000000000..96ade3b45f6d
--- /dev/null
+++ b/nixpkgs/pkgs/development/python-modules/requests-http-signature/default.nix
@@ -0,0 +1,61 @@
+{ lib
+, buildPythonPackage
+, fetchFromGitHub
+, http-message-signatures
+, http-sfv
+, requests
+, pytestCheckHook
+, pythonOlder
+, setuptools-scm
+}:
+
+buildPythonPackage rec {
+  pname = "requests-http-signature";
+  version = "0.7.1";
+  format = "setuptools";
+
+  disabled = pythonOlder "3.7";
+
+  src = fetchFromGitHub {
+    owner = "pyauth";
+    repo = pname;
+    rev = "v${version}";
+    hash = "sha256-sW2vYqT/nY27DvEKHdptc3dUpuqKmD7PLMs+Xp+cpeU=";
+  };
+
+  SETUPTOOLS_SCM_PRETEND_VERSION = version;
+
+  nativeBuildInputs = [
+    setuptools-scm
+  ];
+
+  propagatedBuildInputs = [
+    http-message-signatures
+    http-sfv
+    requests
+  ];
+
+  checkInputs = [
+    pytestCheckHook
+  ];
+
+  pytestFlagsArray = [
+    "test/test.py"
+  ];
+
+  disabledTests = [
+    # Test require network access
+    "test_readme_example"
+  ];
+
+  pythonImportsCheck = [
+    "requests_http_signature"
+  ];
+
+  meta = with lib; {
+    description = "Requests authentication module for HTTP Signature";
+    homepage = "https://github.com/kislyuk/requests-http-signature";
+    license = licenses.asl20;
+    maintainers = with maintainers; [ mmai ];
+  };
+}