mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-06-08 22:33:52 +00:00
63 lines
1.3 KiB
Nix
63 lines
1.3 KiB
Nix
{
|
|
lib,
|
|
buildPythonPackage,
|
|
fetchFromGitHub,
|
|
pythonAtLeast,
|
|
setuptools,
|
|
deprecation,
|
|
flask,
|
|
pydantic,
|
|
pytestCheckHook,
|
|
requests,
|
|
sanic,
|
|
sanic-testing,
|
|
}:
|
|
|
|
buildPythonPackage (finalAttrs: {
|
|
pname = "cloudevents";
|
|
version = "1.12.0";
|
|
pyproject = true;
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "cloudevents";
|
|
repo = "sdk-python";
|
|
tag = finalAttrs.version;
|
|
hash = "sha256-0WdCBwYz3XJWjUP0gf+IWdF4ZgPHFvUZFoQp9taqNz8=";
|
|
};
|
|
|
|
build-system = [ setuptools ];
|
|
|
|
dependencies = [ deprecation ];
|
|
|
|
pythonImportsCheck = [ "cloudevents" ];
|
|
|
|
nativeCheckInputs = [
|
|
flask
|
|
pydantic
|
|
pytestCheckHook
|
|
requests
|
|
sanic
|
|
sanic-testing
|
|
];
|
|
|
|
disabledTestPaths = [
|
|
"samples/http-image-cloudevents/image_sample_test.py"
|
|
]
|
|
# pydantic v1 doesn't work on python 3.14
|
|
++ lib.optionals (pythonAtLeast "3.14") [
|
|
"cloudevents/tests/test_pydantic_cloudevent.py"
|
|
"cloudevents/tests/test_pydantic_conversions.py"
|
|
"cloudevents/tests/test_pydantic_events.py"
|
|
];
|
|
|
|
__darwinAllowLocalNetworking = true;
|
|
|
|
meta = {
|
|
description = "Python SDK for CloudEvents";
|
|
homepage = "https://github.com/cloudevents/sdk-python";
|
|
changelog = "https://github.com/cloudevents/sdk-python/blob/${finalAttrs.src.rev}/CHANGELOG.md";
|
|
license = lib.licenses.asl20;
|
|
maintainers = with lib.maintainers; [ GaetanLepage ];
|
|
};
|
|
})
|