about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/python-modules/github3-py
diff options
context:
space:
mode:
authorAlyssa Ross <hi@alyssa.is>2024-01-07 14:58:29 +0100
committerAlyssa Ross <hi@alyssa.is>2024-01-07 14:58:29 +0100
commitad899504860973e98351c922ecb934595f2c0f19 (patch)
treeb1260cc90947e834af941c6cb6aed51dc68f50b5 /nixpkgs/pkgs/development/python-modules/github3-py
parentf34a1b70eb86e4a63cfb88ea460345bb1aed88e3 (diff)
parentdc676e1b5014069a2b06e236242e2f0990384934 (diff)
downloadnixlib-ad899504860973e98351c922ecb934595f2c0f19.tar
nixlib-ad899504860973e98351c922ecb934595f2c0f19.tar.gz
nixlib-ad899504860973e98351c922ecb934595f2c0f19.tar.bz2
nixlib-ad899504860973e98351c922ecb934595f2c0f19.tar.lz
nixlib-ad899504860973e98351c922ecb934595f2c0f19.tar.xz
nixlib-ad899504860973e98351c922ecb934595f2c0f19.tar.zst
nixlib-ad899504860973e98351c922ecb934595f2c0f19.zip
Merge branch 'nixos-unstable-small' of https://github.com/NixOS/nixpkgs
Diffstat (limited to 'nixpkgs/pkgs/development/python-modules/github3-py')
-rw-r--r--nixpkgs/pkgs/development/python-modules/github3-py/default.nix70
1 files changed, 70 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/development/python-modules/github3-py/default.nix b/nixpkgs/pkgs/development/python-modules/github3-py/default.nix
new file mode 100644
index 000000000000..72fd8108f0c4
--- /dev/null
+++ b/nixpkgs/pkgs/development/python-modules/github3-py/default.nix
@@ -0,0 +1,70 @@
+{ lib
+, buildPythonPackage
+, pythonOlder
+, fetchPypi
+, requests
+, uritemplate
+, python-dateutil
+, pyjwt
+, pytestCheckHook
+, betamax
+, betamax-matchers
+, hatchling
+, fetchpatch
+}:
+
+buildPythonPackage rec {
+  pname = "github3.py";
+  version = "4.0.1";
+  format = "pyproject";
+
+  disabled = pythonOlder "3.6";
+
+  src = fetchPypi {
+    inherit pname version;
+    hash = "sha256-MNVxB2dT78OJ7cf5qu8zik/LJLVNiWjV85sTQvRd3TY=";
+  };
+
+  nativeBuildInputs = [
+    hatchling
+  ];
+
+  propagatedBuildInputs = [
+    pyjwt
+    python-dateutil
+    requests
+    uritemplate
+  ]
+  ++ pyjwt.optional-dependencies.crypto;
+
+  nativeCheckInputs = [
+    pytestCheckHook
+    betamax
+    betamax-matchers
+  ];
+
+  patches = [
+    (fetchpatch {
+      # disable tests with "AttributeError: 'MockHTTPResponse' object has no attribute 'close'", due to betamax
+      url = "https://github.com/sigmavirus24/github3.py/commit/9d6124c09b0997b5e83579549bcf22b3e901d7e5.patch";
+      hash = "sha256-8Z4vN7iKl/sOcEJptsH5jsqijZgvL6jS7kymZ8+m6bY=";
+    })
+  ];
+
+  # Solves "__main__.py: error: unrecognized arguments: -nauto"
+  preCheck = ''
+    rm tox.ini
+  '';
+
+  disabledTests = [
+    # FileNotFoundError: [Errno 2] No such file or directory: 'tests/id_rsa.pub'
+    "test_delete_key"
+  ];
+
+  meta = with lib; {
+    homepage = "https://github3py.readthedocs.org/en/master/";
+    description = "A wrapper for the GitHub API written in python";
+    license = licenses.bsd3;
+    maintainers = with maintainers; [ pSub ];
+  };
+}