summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Schütz <github@dotlambda.de>2024-03-25 17:19:39 -0700
committerGitHub <noreply@github.com>2024-03-25 17:19:39 -0700
commitf2cb5422ac949e2d4187d4f8944a6d843a839463 (patch)
treed5a41917dc5a7d2087231b7b39ff835f7f2dbf12
parentMerge pull request #298018 from noisersup/ferretdb-1.21.0 (diff)
downloadnixpkgs-origin/revert-298992-llama-index-readers-file-bump.tar.gz
Revert "python311Packages.llama-index-readers-file: 0.1.7 -> 0.1.12"origin/revert-298992-llama-index-readers-file-bump
-rw-r--r--pkgs/development/python-modules/llama-index-readers-file/default.nix36
-rw-r--r--pkgs/development/python-modules/pymupdf/default.nix80
2 files changed, 19 insertions, 97 deletions
diff --git a/pkgs/development/python-modules/llama-index-readers-file/default.nix b/pkgs/development/python-modules/llama-index-readers-file/default.nix
index f4b441142bfb..4c5503c66071 100644
--- a/pkgs/development/python-modules/llama-index-readers-file/default.nix
+++ b/pkgs/development/python-modules/llama-index-readers-file/default.nix
@@ -1,30 +1,27 @@
{ lib
, beautifulsoup4
, buildPythonPackage
-, fetchPypi
+, fetchFromGitHub
, llama-index-core
, poetry-core
, pymupdf
, pypdf
-, pythonOlder
+, pytestCheckHook
, pythonRelaxDepsHook
-, striprtf
}:
buildPythonPackage rec {
pname = "llama-index-readers-file";
- version = "0.1.12";
- pyproject = true;
+ version = "0.1.7";
+
+ inherit (llama-index-core) src meta;
- disabled = pythonOlder "3.8";
+ pyproject = true;
- src = fetchPypi {
- pname = "llama_index_readers_file";
- inherit version;
- hash = "sha256-YGXL+AsPtdGJVYuLkK273JKsuGFH/KGS2I/MJwStKvM=";
- };
+ sourceRoot = "${src.name}/llama-index-integrations/readers/${pname}";
pythonRelaxDeps = [
+ "beautifulsoup4"
"pymupdf"
"pypdf"
];
@@ -33,30 +30,23 @@ buildPythonPackage rec {
"bs4"
];
- build-system = [
+ nativeBuildInputs = [
poetry-core
pythonRelaxDepsHook
];
- dependencies = [
+ propagatedBuildInputs = [
beautifulsoup4
llama-index-core
pymupdf
pypdf
- striprtf
];
- # Tests are only available in the mono repo
- doCheck = false;
+ nativeCheckInputs = [
+ pytestCheckHook
+ ];
pythonImportsCheck = [
"llama_index.readers.file"
];
-
- meta = with lib; {
- description = "LlamaIndex Readers Integration for files";
- homepage = "https://github.com/run-llama/llama_index/tree/main/llama-index-integrations/readers/llama-index-readers-file";
- license = licenses.mit;
- maintainers = with maintainers; [ fab ];
- };
}
diff --git a/pkgs/development/python-modules/pymupdf/default.nix b/pkgs/development/python-modules/pymupdf/default.nix
index f225524e7e18..bf40f44732d3 100644
--- a/pkgs/development/python-modules/pymupdf/default.nix
+++ b/pkgs/development/python-modules/pymupdf/default.nix
@@ -30,12 +30,7 @@
let
# PyMuPDF needs the C++ bindings generated
- mupdf-cxx = mupdf.override {
- enableOcr = true;
- enableCxx = true;
- enablePython = true;
- python3 = python;
- };
+ mupdf-cxx = mupdf.override { enableOcr = true; enableCxx = true; enablePython = true; python3 = python; };
in buildPythonPackage rec {
pname = "pymupdf";
version = "1.23.26";
@@ -50,12 +45,12 @@ in buildPythonPackage rec {
hash = "sha256-m2zq04+PDnlzFuqeSt27UhdHXTHxpHdMPIg5RQl/5bQ=";
};
- # swig is not wrapped as Python package
+ # swig is not wrapped as python package
# libclang calls itself just clang in wheel metadata
postPatch = ''
substituteInPlace pyproject.toml \
- --replace-fail '"swig",' "" \
- --replace-fail "libclang" "clang"
+ --replace '"swig",' "" \
+ --replace "libclang" "clang"
'';
nativeBuildInputs = [
@@ -100,79 +95,16 @@ in buildPythonPackage rec {
fonttools
];
- preCheck = ''
- export PATH="$PATH:$out/bin";
- '';
-
disabledTests = [
# fails for indeterminate reasons
- "test_2548"
- "test_2753"
- "test_3020"
- "test_3050"
- "test_3058"
- "test_3177"
- "test_3186"
"test_color_count"
- "test_pilsave"
- "test_fz_write_pixmap_as_jpeg"
- # NotImplementedError
- "test_1824"
- "test_2093"
- "test_2093"
- "test_2108"
- "test_2182"
- "test_2182"
- "test_2246"
- "test_2270"
- "test_2270"
- "test_2391"
- "test_2788"
- "test_2861"
- "test_2871"
- "test_2886"
- "test_2904"
- "test_2922"
- "test_2934"
- "test_2957"
- "test_2969"
- "test_3070"
- "test_3131"
- "test_3140"
- "test_3209"
- "test_3209"
- "test_caret"
- "test_deletion"
- "test_file_info"
- "test_line"
- "test_page_links_generator"
- "test_polyline"
- "test_redact"
- "test_techwriter_append"
- "test_text2"
- # Issue with FzArchive
- "test_htmlbox"
- "test_2246"
- "test_3140"
- "test_fit_springer"
- "test_write_stabilized_with_links"
- "test_textbox"
- "test_delete_image"
- # Fonts not available
- "test_fontarchive"
- "test_subset_fonts"
- # Exclude lint tests
- "test_flake8"
+ "test_2753"
+ "test_2548"
] ++ lib.optionals stdenv.isDarwin [
# darwin does not support OCR right now
"test_tesseract"
];
- disabledTestPaths = [
- # Issue with FzArchive
- "tests/test_docs_samples.py"
- ];
-
pythonImportsCheck = [
"fitz"
"fitz_old"