1{
2 lib,
3 beautifulsoup4,
4 buildPythonPackage,
5 defusedxml,
6 fetchPypi,
7 hatchling,
8 llama-index-core,
9 pymupdf,
10 pypdf,
11 pythonOlder,
12 striprtf,
13}:
14
15buildPythonPackage rec {
16 pname = "llama-index-readers-file";
17 version = "0.5.4";
18 pyproject = true;
19
20 disabled = pythonOlder "3.8";
21
22 src = fetchPypi {
23 pname = "llama_index_readers_file";
24 inherit version;
25 hash = "sha256-XnZvMll2IuZlKUZBAZFFSK1oN3CgpdK9ye6E6zoRAzI=";
26 };
27
28 pythonRelaxDeps = [
29 "pymupdf"
30 "pypdf"
31 "striprtf"
32 "pandas"
33 ];
34
35 build-system = [ hatchling ];
36
37 dependencies = [
38 beautifulsoup4
39 defusedxml
40 llama-index-core
41 pymupdf
42 pypdf
43 striprtf
44 ];
45
46 # Tests are only available in the mono repo
47 doCheck = false;
48
49 pythonImportsCheck = [ "llama_index.readers.file" ];
50
51 meta = with lib; {
52 description = "LlamaIndex Readers Integration for files";
53 homepage = "https://github.com/run-llama/llama_index/tree/main/llama-index-integrations/readers/llama-index-readers-file";
54 license = licenses.mit;
55 maintainers = with maintainers; [ fab ];
56 };
57}