1{ 2 lib, 3 buildPythonPackage, 4 fetchFromGitHub, 5 pythonOlder, 6 # propagated build inputs 7 click, 8 fastapi, 9 jinja2, 10 mypy, 11 nbconvert, 12 python-multipart, 13 pandas, 14 types-requests, 15 types-ujson, 16 uvicorn, 17 autoflake, 18 # native check inputs 19 pytestCheckHook, 20 black, 21 coverage, 22 flake8, 23 httpx, 24 ipython, 25 pytest-cov-stub, 26 requests, 27 requests-toolbelt, 28 nbdev, 29 pytest-mock, 30}: 31let 32 version = "0.10.11"; 33in 34buildPythonPackage { 35 pname = "unstructured-api-tools"; 36 inherit version; 37 format = "setuptools"; 38 39 disabled = pythonOlder "3.8"; 40 41 src = fetchFromGitHub { 42 owner = "Unstructured-IO"; 43 repo = "unstructured-api-tools"; 44 tag = version; 45 hash = "sha256-t1fK40ayR2bxc1iMIwvn/OHuyVlR98Gq+NpIhOmaP+4="; 46 }; 47 48 propagatedBuildInputs = [ 49 click 50 fastapi 51 jinja2 52 mypy 53 nbconvert 54 python-multipart 55 pandas 56 types-requests 57 types-ujson 58 uvicorn 59 autoflake 60 ] ++ uvicorn.optional-dependencies.standard; 61 62 pythonImportsCheck = [ "unstructured_api_tools" ]; 63 64 # test require file generation but it complains about a missing file mypy 65 doCheck = false; 66 # preCheck = '' 67 # substituteInPlace Makefile \ 68 # --replace "PYTHONPATH=." "" \ 69 # --replace "mypy" "${mypy}/bin/mypy" 70 # make generate-test-api 71 # ''; 72 73 nativeCheckInputs = [ 74 pytestCheckHook 75 black 76 coverage 77 flake8 78 httpx 79 ipython 80 pytest-cov-stub 81 requests 82 requests-toolbelt 83 nbdev 84 pytest-mock 85 ]; 86 87 meta = with lib; { 88 description = ""; 89 mainProgram = "unstructured_api_tools"; 90 homepage = "https://github.com/Unstructured-IO/unstructured-api-tools"; 91 changelog = "https://github.com/Unstructured-IO/unstructured-api-tools/blob/${version}/CHANGELOG.md"; 92 license = licenses.asl20; 93 maintainers = with maintainers; [ happysalada ]; 94 }; 95}