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.4.11";
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-GyHLZteN1fYOhxZgfZpHzNgbs5EG1FlmW+HKd5npWXs=";
26 };
27
28 pythonRelaxDeps = [
29 "pymupdf"
30 "pypdf"
31 "striprtf"
32 ];
33
34 build-system = [ hatchling ];
35
36 dependencies = [
37 beautifulsoup4
38 defusedxml
39 llama-index-core
40 pymupdf
41 pypdf
42 striprtf
43 ];
44
45 # Tests are only available in the mono repo
46 doCheck = false;
47
48 pythonImportsCheck = [ "llama_index.readers.file" ];
49
50 meta = with lib; {
51 description = "LlamaIndex Readers Integration for files";
52 homepage = "https://github.com/run-llama/llama_index/tree/main/llama-index-integrations/readers/llama-index-readers-file";
53 license = licenses.mit;
54 maintainers = with maintainers; [ fab ];
55 };
56}