1{
2 lib,
3 buildPythonPackage,
4 pythonOlder,
5 fetchFromGitHub,
6 requests,
7 pyyaml,
8 setuptools,
9 pytestCheckHook,
10 pytest-asyncio,
11 uvloop,
12 hypercorn,
13 starlette,
14 pydantic,
15}:
16
17buildPythonPackage rec {
18 pname = "openapi3";
19 version = "1.8.2";
20 pyproject = true;
21
22 disabled = pythonOlder "3.8";
23 src = fetchFromGitHub {
24 owner = "Dorthu";
25 repo = "openapi3";
26 rev = version;
27 hash = "sha256-Crn+nRbptRycnWJzH8Tm/BBLcBSRCcNtLX8NoKnSDdA=";
28 };
29
30 # pydantic==1.10.2 only affects checks
31 pythonRelaxDeps = [ "pydantic" ];
32
33 build-system = [ setuptools ];
34
35 dependencies = [
36 requests
37 pyyaml
38 ];
39
40 nativeCheckInputs = [
41 pytestCheckHook
42 pytest-asyncio
43 pydantic
44 uvloop
45 hypercorn
46 starlette
47 ];
48
49 disabledTestPaths = [
50 # tests old fastapi behaviour
51 "tests/fastapi_test.py"
52 ];
53
54 pythonImportsCheck = [ "openapi3" ];
55
56 meta = with lib; {
57 changelog = "https://github.com/Dorthu/openapi3/releases/tag/${version}";
58 description = "Python3 OpenAPI 3 Spec Parser";
59 homepage = "https://github.com/Dorthu/openapi3";
60 license = licenses.bsd3;
61 maintainers = with maintainers; [ techknowlogick ];
62 };
63}