python3Packages.{pymupdf,pymupdf4llm}, browsr: fix build (#497987)

This commit is contained in:
Michael Daniels
2026-03-09 21:52:49 +00:00
committed by GitHub
3 changed files with 28 additions and 19 deletions
+6 -5
View File
@@ -6,7 +6,7 @@
extras ? [ "all" ],
}:
python3Packages.buildPythonApplication rec {
python3Packages.buildPythonApplication (finalAttrs: {
pname = "browsr";
version = "1.22.1";
pyproject = true;
@@ -14,7 +14,7 @@ python3Packages.buildPythonApplication rec {
src = fetchFromGitHub {
owner = "juftin";
repo = "browsr";
tag = "v${version}";
tag = "v${finalAttrs.version}";
hash = "sha256-eISOADs++ZF62qkWbhFZu6JkEVtTytg3q5nbwS2m+8g=";
};
@@ -46,7 +46,7 @@ python3Packages.buildPythonApplication rec {
textual
textual-universal-directorytree
]
++ lib.attrVals extras optional-dependencies;
++ lib.attrVals extras finalAttrs.passthru.optional-dependencies;
optional-dependencies = with python3Packages; {
all = [
@@ -77,6 +77,7 @@ python3Packages.buildPythonApplication rec {
"rich-pixels"
"rich"
"textual"
"universal-pathlib"
];
pythonImportsCheck = [
@@ -95,8 +96,8 @@ python3Packages.buildPythonApplication rec {
description = "File explorer in your terminal";
mainProgram = "browsr";
homepage = "https://juftin.com/browsr";
changelog = "https://github.com/juftin/browsr/releases/tag/v${version}";
changelog = "https://github.com/juftin/browsr/releases/tag/${finalAttrs.src.tag}";
license = lib.licenses.mit;
maintainers = [ ];
};
}
})
@@ -42,16 +42,16 @@ let
mupdf-cxx-lib = toPythonModule (lib.getLib mupdf-cxx);
mupdf-cxx-dev = lib.getDev mupdf-cxx;
in
buildPythonPackage rec {
buildPythonPackage (finalAttrs: {
pname = "pymupdf";
version = "1.26.7";
version = "1.27.1";
pyproject = true;
src = fetchFromGitHub {
owner = "pymupdf";
repo = "PyMuPDF";
tag = version;
hash = "sha256-7OidTOG3KAx7EaQ3Bu4i1Fw007oXVAipBHeYNkmbIcA=";
tag = finalAttrs.version;
hash = "sha256-Ebvdkvp0y7seG0sciMMnztflIBVRHh/Cowpw/lSLYLE=";
};
patches = [
@@ -122,6 +122,7 @@ buildPythonPackage rec {
"test_codespell"
"test_pylint"
"test_flake8"
"test_4751"
# Upstream recommends disabling these when not using bundled MuPDF build
"test_color_count"
"test_3050"
@@ -140,6 +141,9 @@ buildPythonPackage rec {
disabledTestPaths = [
# mad about markdown table formatting
"tests/test_tables.py::test_markdown"
# Do not lint code
"tests/test_typing.py"
]
++ lib.optional stdenv.hostPlatform.isDarwin [
# Trace/BPT trap: 5 when getting widget options
@@ -164,9 +168,9 @@ buildPythonPackage rec {
meta = {
description = "Python bindings for MuPDF's rendering library";
homepage = "https://github.com/pymupdf/PyMuPDF";
changelog = "https://github.com/pymupdf/PyMuPDF/releases/tag/${src.tag}";
changelog = "https://github.com/pymupdf/PyMuPDF/releases/tag/${finalAttrs.src.tag}";
license = lib.licenses.agpl3Only;
maintainers = with lib.maintainers; [ sarahec ];
platforms = lib.platforms.unix;
};
}
})
@@ -4,25 +4,29 @@
fetchFromGitHub,
setuptools,
pymupdf,
tabulate,
}:
buildPythonPackage rec {
buildPythonPackage (finalAttrs: {
pname = "pymupdf4llm";
version = "0.2.9";
version = "0.3.4";
pyproject = true;
src = fetchFromGitHub {
owner = "pymupdf";
repo = "RAG";
tag = version;
hash = "sha256-iuffv49voZLiuabwhag+YC3j3Oa2IAevZtcJtMVzX/4=";
tag = "v${finalAttrs.version}";
hash = "sha256-SgJ47jkE6GcSXVsOMOx8Hm+Ce6pCAjLEhdxGeJEu6DQ=";
};
sourceRoot = "${src.name}/pymupdf4llm";
sourceRoot = "${finalAttrs.src.name}/pymupdf4llm";
build-system = [ setuptools ];
dependencies = [ pymupdf ];
dependencies = [
pymupdf
tabulate
];
checkPhase = ''
runHook preCheck
@@ -49,8 +53,8 @@ buildPythonPackage rec {
meta = {
description = "PyMuPDF Utilities for LLM/RAG - converts PDF pages to Markdown format for Retrieval-Augmented Generation";
homepage = "https://github.com/pymupdf/RAG";
changelog = "https://github.com/pymupdf/RAG/blob/${src.tag}/CHANGES.md";
changelog = "https://github.com/pymupdf/RAG/blob/${finalAttrs.src.tag}/CHANGES.md";
license = lib.licenses.agpl3Only;
maintainers = with lib.maintainers; [ ryota2357 ];
};
}
})