depot/third_party/nixpkgs/pkgs/development/python-modules/notion-client/default.nix
Default email fa5436e0a7 Project import generated by Copybara.
GitOrigin-RevId: e8057b67ebf307f01bdcc8fba94d94f75039d1f6
2024-06-05 17:53:02 +02:00

53 lines
1.1 KiB
Nix

{
lib,
buildPythonPackage,
fetchFromGitHub,
pythonOlder,
pytestCheckHook,
setuptools,
anyio,
httpx,
pytest-asyncio,
pytest-vcr,
}:
buildPythonPackage rec {
pname = "notion-client";
version = "2.2.1";
pyproject = true;
disabled = pythonOlder "3.7";
src = fetchFromGitHub {
owner = "ramnes";
repo = "notion-sdk-py";
rev = "refs/tags/${version}";
hash = "sha256-IEWFrdqrawFbuwA8bUewanmBoGWsjHJ7ucgvHQEaMcA=";
};
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 ];
};
}