blob: 0e24bb60ad48da92a1d643f909772c2fafa53ac6 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
|
{ lib
, buildPythonPackage
, fetchFromGitHub
, pythonOlder
, pytestCheckHook
, setuptools
, anyio
, httpx
, pytest-asyncio
, pytest-vcr
}:
buildPythonPackage rec {
pname = "notion-client";
version = "2.1.0";
pyproject = true;
disabled = pythonOlder "3.7";
src = fetchFromGitHub {
owner = "ramnes";
repo = "notion-sdk-py";
rev = "refs/tags/${version}";
hash = "sha256-u10iPSbFPv9RewEYru3V6MpwhhySzmnymmv4CsefGC8=";
};
nativeBuildInputs = [
setuptools
];
propagatedBuildInputs = [
httpx
];
# disable coverage options as they don't provide us value, and they break the default pytestCheckHook
preCheck = ''
sed -i '/addopts/d' ./setup.cfg
'';
nativeCheckInputs = [
pytestCheckHook
anyio
pytest-asyncio
pytest-vcr
];
pythonImportsCheck = [
"notion_client"
];
meta = with lib; {
description = "Python client for the official Notion API";
homepage = "https://github.com/ramnes/notion-sdk-py";
changelog = "https://github.com/ramnes/notion-sdk-py/releases/tag/${version}";
license = licenses.mit;
maintainers = with maintainers; [ jpetrucciani ];
};
}
|