summaryrefslogtreecommitdiff
path: root/pkgs/development/python-modules/openapi3/default.nix
blob: bffc7d02e4e8d84386e87ab0096c52725ec09a78 (plain)
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
56
57
58
59
60
61
{
  lib,
  buildPythonPackage,
  fetchFromGitHub,
  requests,
  pyyaml,
  setuptools,
  pytestCheckHook,
  pytest-asyncio,
  uvloop,
  hypercorn,
  starlette,
  pydantic,
}:

buildPythonPackage rec {
  pname = "openapi3";
  version = "1.8.2";
  pyproject = true;

  src = fetchFromGitHub {
    owner = "Dorthu";
    repo = "openapi3";
    rev = version;
    hash = "sha256-Crn+nRbptRycnWJzH8Tm/BBLcBSRCcNtLX8NoKnSDdA=";
  };

  # pydantic==1.10.2 only affects checks
  pythonRelaxDeps = [ "pydantic" ];

  build-system = [ setuptools ];

  dependencies = [
    requests
    pyyaml
  ];

  nativeCheckInputs = [
    pytestCheckHook
    pytest-asyncio
    pydantic
    uvloop
    hypercorn
    starlette
  ];

  disabledTestPaths = [
    # tests old fastapi behaviour
    "tests/fastapi_test.py"
  ];

  pythonImportsCheck = [ "openapi3" ];

  meta = {
    changelog = "https://github.com/Dorthu/openapi3/releases/tag/${version}";
    description = "Python3 OpenAPI 3 Spec Parser";
    homepage = "https://github.com/Dorthu/openapi3";
    license = lib.licenses.bsd3;
    maintainers = with lib.maintainers; [ techknowlogick ];
  };
}