1{
2 lib,
3 buildPythonPackage,
4 pythonOlder,
5 fetchFromGitHub,
6 setuptools,
7 aiohttp,
8 python-dateutil,
9 typing-extensions,
10}:
11
12buildPythonPackage rec {
13 pname = "twitchapi";
14 version = "4.4.0";
15
16 disabled = pythonOlder "3.7";
17
18 pyproject = true;
19
20 src = fetchFromGitHub {
21 owner = "Teekeks";
22 repo = "pyTwitchAPI";
23 tag = "v${version}";
24 hash = "sha256-yN7KsiPnhGSm8wj44zn1TzGhRDIMflkKiRnBlVT5i2o=";
25 };
26
27 postPatch = ''
28 sed -i "/document_enum/d" twitchAPI/type.py
29 '';
30
31 pythonRemoveDeps = [
32 "enum-tools"
33 ];
34
35 build-system = [ setuptools ];
36
37 dependencies = [
38 aiohttp
39 python-dateutil
40 typing-extensions
41 ];
42
43 # upstream has no tests
44 doCheck = false;
45
46 pythonImportsCheck = [
47 "twitchAPI.eventsub"
48 "twitchAPI.oauth"
49 "twitchAPI.pubsub"
50 "twitchAPI.twitch"
51 "twitchAPI.type"
52 ];
53
54 meta = with lib; {
55 changelog = "https://github.com/Teekeks/pyTwitchAPI/blob/${src.rev}/docs/changelog.rst";
56 description = "Python implementation of the Twitch Helix API, its Webhook, PubSub and EventSub";
57 homepage = "https://github.com/Teekeks/pyTwitchAPI";
58 license = licenses.mit;
59 maintainers = with maintainers; [
60 dotlambda
61 ];
62 };
63}