about summary refs log tree commit diff
path: root/pkgs/development/python-modules/cloudevents/default.nix
blob: d54b20975ca308e5247bd7cba3bcd4e1d44cfe45 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
{ lib
, buildPythonPackage
, fetchFromGitHub
, setuptools
, wheel
, deprecation
, flask
, pydantic
, pytestCheckHook
, requests
, sanic
, sanic-testing
}:

buildPythonPackage rec {
  pname = "cloudevents";
  version = "1.10.1";
  pyproject = true;

  src = fetchFromGitHub {
    owner = "cloudevents";
    repo = "sdk-python";
    rev = "refs/tags/${version}";
    hash = "sha256-YIvEAofWmnUblRd4jV3Zi3VdfocOnD05CMVm/abngyg=";
  };

  build-system = [
    setuptools
    wheel
  ];

  pythonImportsCheck = [ "cloudevents" ];

  nativeCheckInputs = [
    deprecation
    flask
    pydantic
    pytestCheckHook
    requests
    sanic
    sanic-testing
  ];

  disabledTestPaths = [
    "samples/http-image-cloudevents/image_sample_test.py"
  ];

  meta = with lib; {
    description = "Python SDK for CloudEvents";
    homepage = "https://github.com/cloudevents/sdk-python";
    changelog = "https://github.com/cloudevents/sdk-python/blob/${src.rev}/CHANGELOG.md";
    license = licenses.asl20;
    maintainers = with maintainers; [ GaetanLepage ];
  };
}