1{ lib
2, buildPythonPackage
3, deprecated
4, fetchFromGitHub
5, pynacl
6, typing-extensions
7, pyjwt
8, python-dateutil
9, pythonOlder
10, requests
11, setuptools-scm
12}:
13
14buildPythonPackage rec {
15 pname = "pygithub";
16 version = "2.1.1";
17 format = "setuptools";
18
19 disabled = pythonOlder "3.7";
20
21 src = fetchFromGitHub {
22 owner = "PyGithub";
23 repo = "PyGithub";
24 rev = "refs/tags/v${version}";
25 hash = "sha256-ysa1RAWuFFQCF6bYwAUVFou7nxCKHLZbUtrUtXiSpPk=";
26 };
27
28 SETUPTOOLS_SCM_PRETEND_VERSION = version;
29
30 nativeBuildInputs = [
31 setuptools-scm
32 ];
33
34 propagatedBuildInputs = [
35 deprecated
36 pyjwt
37 pynacl
38 python-dateutil
39 requests
40 typing-extensions
41 ] ++ pyjwt.optional-dependencies.crypto;
42
43 # Test suite makes REST calls against github.com
44 doCheck = false;
45
46 pythonImportsCheck = [
47 "github"
48 ];
49
50 meta = with lib; {
51 description = "Python library to access the GitHub API v3";
52 homepage = "https://github.com/PyGithub/PyGithub";
53 changelog = "https://github.com/PyGithub/PyGithub/raw/v${version}/doc/changes.rst";
54 license = licenses.lgpl3Plus;
55 maintainers = with maintainers; [ jhhuh ];
56 };
57}