From 9f5c01a2ee89089b1e66a9f0a7014c962768ce41 Mon Sep 17 00:00:00 2001 From: Wolfgang Walther Date: Mon, 24 Mar 2025 17:08:01 +0000 Subject: [PATCH 1/4] python3Packages.cssselect2: 0.7.0 -> 0.8.0 --- pkgs/development/python-modules/cssselect2/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/development/python-modules/cssselect2/default.nix b/pkgs/development/python-modules/cssselect2/default.nix index 3f92e6567f13..c024d3a2d680 100644 --- a/pkgs/development/python-modules/cssselect2/default.nix +++ b/pkgs/development/python-modules/cssselect2/default.nix @@ -10,14 +10,14 @@ buildPythonPackage rec { pname = "cssselect2"; - version = "0.7.0"; + version = "0.8.0"; pyproject = true; - disabled = pythonOlder "3.7"; + disabled = pythonOlder "3.10"; src = fetchPypi { inherit pname version; - hash = "sha256-HM2YTauJ/GiVUEOspOGwPgzynK2YgPbijjunp0sUqlo="; + hash = "sha256-dnT/uVSjtGFiOSruKjoK7bLhTs+Z/MKGRJAPTm4+nTo="; }; postPatch = '' From e2f48eb91eb6459726e65a931725ab3ccfd1b1c4 Mon Sep 17 00:00:00 2001 From: Wolfgang Walther Date: Mon, 24 Mar 2025 17:01:36 +0000 Subject: [PATCH 2/4] python3Packages.weasyprint: 64.1 -> 65.0 Changelog: https://github.com/Kozea/WeasyPrint/releases/tag/v65.0 --- pkgs/development/python-modules/weasyprint/default.nix | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/pkgs/development/python-modules/weasyprint/default.nix b/pkgs/development/python-modules/weasyprint/default.nix index 7ef86149c1b3..5e4f75bb2249 100644 --- a/pkgs/development/python-modules/weasyprint/default.nix +++ b/pkgs/development/python-modules/weasyprint/default.nix @@ -25,7 +25,7 @@ buildPythonPackage rec { pname = "weasyprint"; - version = "64.1"; + version = "65.0"; format = "pyproject"; disabled = pythonOlder "3.9"; @@ -33,7 +33,7 @@ buildPythonPackage rec { src = fetchPypi { inherit version; pname = "weasyprint"; - hash = "sha256-KLAvLGQJuvzhsSINnXanNFh1vTvQjE9t+/UQu5KpR1c="; + hash = "sha256-PGed6Wp8hxrgDwjNHncgDzPipJ014gnHIRWTJ1eN+Yg="; }; patches = [ @@ -49,8 +49,6 @@ buildPythonPackage rec { build-system = [ flit-core ]; - pythonRelaxDeps = [ "tinycss2" ]; - dependencies = [ cffi cssselect2 From ba4a513bf309858677b84632fea3ed402147a885 Mon Sep 17 00:00:00 2001 From: Wolfgang Walther Date: Mon, 24 Mar 2025 18:03:50 +0100 Subject: [PATCH 3/4] python3Packages.weasyprint: adopt with apm --- pkgs/development/python-modules/weasyprint/default.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/pkgs/development/python-modules/weasyprint/default.nix b/pkgs/development/python-modules/weasyprint/default.nix index 5e4f75bb2249..dfb40d8b324a 100644 --- a/pkgs/development/python-modules/weasyprint/default.nix +++ b/pkgs/development/python-modules/weasyprint/default.nix @@ -106,5 +106,6 @@ buildPythonPackage rec { mainProgram = "weasyprint"; homepage = "https://weasyprint.org/"; license = licenses.bsd3; + maintainers = lib.teams.apm.members; }; } From 9f804e58e7ec60c8ba94c2c1078654d88fdd1910 Mon Sep 17 00:00:00 2001 From: Wolfgang Walther Date: Mon, 24 Mar 2025 18:06:59 +0100 Subject: [PATCH 4/4] python3Packages.weasyprint: modernize (and sort stuff) --- .../python-modules/weasyprint/default.nix | 32 +++++++++---------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/pkgs/development/python-modules/weasyprint/default.nix b/pkgs/development/python-modules/weasyprint/default.nix index dfb40d8b324a..38984142d4bd 100644 --- a/pkgs/development/python-modules/weasyprint/default.nix +++ b/pkgs/development/python-modules/weasyprint/default.nix @@ -1,6 +1,4 @@ { - lib, - stdenv, buildPythonPackage, cffi, cssselect2, @@ -11,6 +9,7 @@ ghostscript, glib, harfbuzz, + lib, pango, pillow, pydyf, @@ -19,6 +18,7 @@ pytestCheckHook, pythonOlder, replaceVars, + stdenv, tinycss2, tinyhtml5, }: @@ -26,7 +26,7 @@ buildPythonPackage rec { pname = "weasyprint"; version = "65.0"; - format = "pyproject"; + pyproject = true; disabled = pythonOlder "3.9"; @@ -39,11 +39,11 @@ buildPythonPackage rec { patches = [ (replaceVars ./library-paths.patch { fontconfig = "${fontconfig.lib}/lib/libfontconfig${stdenv.hostPlatform.extensions.sharedLibrary}"; - pangoft2 = "${pango.out}/lib/libpangoft2-1.0${stdenv.hostPlatform.extensions.sharedLibrary}"; gobject = "${glib.out}/lib/libgobject-2.0${stdenv.hostPlatform.extensions.sharedLibrary}"; - pango = "${pango.out}/lib/libpango-1.0${stdenv.hostPlatform.extensions.sharedLibrary}"; harfbuzz = "${harfbuzz.out}/lib/libharfbuzz${stdenv.hostPlatform.extensions.sharedLibrary}"; harfbuzz_subset = "${harfbuzz.out}/lib/libharfbuzz-subset${stdenv.hostPlatform.extensions.sharedLibrary}"; + pango = "${pango.out}/lib/libpango-1.0${stdenv.hostPlatform.extensions.sharedLibrary}"; + pangoft2 = "${pango.out}/lib/libpangoft2-1.0${stdenv.hostPlatform.extensions.sharedLibrary}"; }) ]; @@ -61,30 +61,30 @@ buildPythonPackage rec { ] ++ fonttools.optional-dependencies.woff; nativeCheckInputs = [ + ghostscript pytest-cov-stub pytestCheckHook - ghostscript ]; disabledTests = [ # needs the Ahem font (fails on macOS) "test_font_stretch" # sensitive to sandbox environments + "test_linear_gradients_12" + "test_linear_gradients_5" "test_tab_size" "test_tabulation_character" - "test_linear_gradients_5" - "test_linear_gradients_12" # rounding issues in sandbox + "test_empty_inline_auto_margins" "test_images_transparent_text" + "test_layout_table_auto_44" + "test_layout_table_auto_45" + "test_margin_boxes_element" + "test_running_elements" + "test_vertical_align_4" "test_visibility_1" "test_visibility_3" "test_visibility_4" - "test_empty_inline_auto_margins" - "test_vertical_align_4" - "test_margin_boxes_element" - "test_running_elements" - "test_layout_table_auto_44" - "test_layout_table_auto_45" "test_woff_simple" ]; @@ -100,12 +100,12 @@ buildPythonPackage rec { pythonImportsCheck = [ "weasyprint" ]; - meta = with lib; { + meta = { changelog = "https://github.com/Kozea/WeasyPrint/releases/tag/v${version}"; description = "Converts web documents to PDF"; mainProgram = "weasyprint"; homepage = "https://weasyprint.org/"; - license = licenses.bsd3; + license = lib.licenses.bsd3; maintainers = lib.teams.apm.members; }; }