python313Packages.notion-client: modernize

This commit is contained in:
Fabian Affolter
2025-10-25 12:30:03 +02:00
parent b4794520a9
commit dadfbbb816

View File

@@ -1,14 +1,14 @@
{ {
lib, lib,
anyio,
buildPythonPackage, buildPythonPackage,
fetchFromGitHub, fetchFromGitHub,
pythonOlder,
pytestCheckHook,
setuptools,
anyio,
httpx, httpx,
pytest-asyncio, pytest-asyncio,
pytest-cov-stub,
pytest-vcr, pytest-vcr,
pytestCheckHook,
setuptools,
}: }:
buildPythonPackage rec { buildPythonPackage rec {
@@ -16,8 +16,6 @@ buildPythonPackage rec {
version = "2.6.0"; version = "2.6.0";
pyproject = true; pyproject = true;
disabled = pythonOlder "3.7";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "ramnes"; owner = "ramnes";
repo = "notion-sdk-py"; repo = "notion-sdk-py";
@@ -25,26 +23,22 @@ buildPythonPackage rec {
hash = "sha256-kUeZhnQwZ+To5NCo7jtQsTfX1kQotbAHDcHf2qwGOIs="; hash = "sha256-kUeZhnQwZ+To5NCo7jtQsTfX1kQotbAHDcHf2qwGOIs=";
}; };
nativeBuildInputs = [ setuptools ]; build-system = [ setuptools ];
propagatedBuildInputs = [ httpx ]; dependencies = [ 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 = [ nativeCheckInputs = [
pytestCheckHook
anyio anyio
pytest-asyncio pytest-asyncio
pytest-cov-stub
pytest-vcr pytest-vcr
pytestCheckHook
]; ];
pythonImportsCheck = [ "notion_client" ]; pythonImportsCheck = [ "notion_client" ];
disabledTests = [ disabledTests = [
# requires network access # Test requires network access
"test_api_http_response_error" "test_api_http_response_error"
]; ];