Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
59 lines
1.2 KiB
Nix
59 lines
1.2 KiB
Nix
{
|
|
lib,
|
|
buildPythonPackage,
|
|
fetchFromGitHub,
|
|
pythonOlder,
|
|
pytestCheckHook,
|
|
setuptools,
|
|
anyio,
|
|
httpx,
|
|
pytest-asyncio,
|
|
pytest-vcr,
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "notion-client";
|
|
version = "2.5.0";
|
|
pyproject = true;
|
|
|
|
disabled = pythonOlder "3.7";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "ramnes";
|
|
repo = "notion-sdk-py";
|
|
tag = version;
|
|
hash = "sha256-5SuSfjKs5+2lAVyzK3JVk1naiaYYYBF+X2I+k53Fqx4=";
|
|
};
|
|
|
|
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" ];
|
|
|
|
disabledTests = [
|
|
# requires network access
|
|
"test_api_http_response_error"
|
|
];
|
|
|
|
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/${src.tag}";
|
|
license = licenses.mit;
|
|
maintainers = with maintainers; [ jpetrucciani ];
|
|
};
|
|
}
|