2023-01-11 07:51:40 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
|
|
|
, pythonOlder
|
|
|
|
, pytestCheckHook
|
|
|
|
, anyio
|
|
|
|
, httpx
|
|
|
|
, pytest-asyncio
|
|
|
|
, pytest-vcr
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "notion-client";
|
|
|
|
version = "2.0.0";
|
|
|
|
disabled = pythonOlder "3.7";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "ramnes";
|
|
|
|
repo = "notion-sdk-py";
|
|
|
|
rev = version;
|
2023-03-15 16:39:30 +00:00
|
|
|
hash = "sha256-zfG1OgH/2ytDUC+ogIY9/nP+xkgjiMt9+HVcWEMXoj8=";
|
2023-01-11 07:51:40 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
httpx
|
|
|
|
];
|
|
|
|
|
2023-05-24 13:37:59 +00:00
|
|
|
# disable coverage options as they don't provide us value, and they break the default pytestCheckHook
|
2023-01-11 07:51:40 +00:00
|
|
|
preCheck = ''
|
|
|
|
sed -i '/addopts/d' ./setup.cfg
|
|
|
|
'';
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2023-01-11 07:51:40 +00:00
|
|
|
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 ];
|
|
|
|
};
|
|
|
|
}
|