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 ] 61 ++ uvicorn.optional-dependencies.standard; 62 63 pythonImportsCheck = [ "unstructured_api_tools" ]; 64 65 # test require file generation but it complains about a missing file mypy 66 doCheck = false; 67 # preCheck = '' 68 # substituteInPlace Makefile \ 69 # --replace "PYTHONPATH=." "" \ 70 # --replace "mypy" "${mypy}/bin/mypy" 71 # make generate-test-api 72 # ''; 73 74 nativeCheckInputs = [ 75 pytestCheckHook 76 black 77 coverage 78 flake8 79 httpx 80 ipython 81 pytest-cov-stub 82 requests 83 requests-toolbelt 84 nbdev 85 pytest-mock 86 ]; 87 88 meta = with lib; { 89 description = ""; 90 mainProgram = "unstructured_api_tools"; 91 homepage = "https://github.com/Unstructured-IO/unstructured-api-tools"; 92 changelog = "https://github.com/Unstructured-IO/unstructured-api-tools/blob/${version}/CHANGELOG.md"; 93 license = licenses.asl20; 94 maintainers = with maintainers; [ happysalada ]; 95 }; 96}