python310Packages.weasyprint: 54.3 -> 57.0
This commit is contained in:
@@ -1,39 +1,38 @@
|
||||
{ buildPythonPackage
|
||||
, fetchPypi
|
||||
, fetchpatch
|
||||
, pytestCheckHook
|
||||
{ lib
|
||||
, stdenv
|
||||
, buildPythonPackage
|
||||
, cairosvg
|
||||
, flit-core
|
||||
, fonttools
|
||||
, pydyf
|
||||
, pyphen
|
||||
, cffi
|
||||
, cssselect2
|
||||
, html5lib
|
||||
, tinycss2
|
||||
, fetchPypi
|
||||
, flit-core
|
||||
, fontconfig
|
||||
, fonttools
|
||||
, ghostscript
|
||||
, glib
|
||||
, harfbuzz
|
||||
, html5lib
|
||||
, pango
|
||||
, fontconfig
|
||||
, lib
|
||||
, stdenv
|
||||
, ghostscript
|
||||
, isPy3k
|
||||
, substituteAll
|
||||
, pillow
|
||||
, pydyf
|
||||
, pyphen
|
||||
, pytestCheckHook
|
||||
, pythonOlder
|
||||
, substituteAll
|
||||
, tinycss2
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "weasyprint";
|
||||
version = "54.3";
|
||||
disabled = !isPy3k;
|
||||
|
||||
version = "57.0";
|
||||
format = "pyproject";
|
||||
|
||||
disabled = pythonOlder "3.7";
|
||||
|
||||
src = fetchPypi {
|
||||
inherit version;
|
||||
pname = "weasyprint";
|
||||
sha256 = "sha256-4E2gQGMFZsRMqiAgM/B/hYdl9TZwkEWoCXOfPQSOidY=";
|
||||
hash = "sha256-e29cwTgZ6afYdIwdvw6NJET3pIGKmDOfgtzKqCK/kRs=";
|
||||
};
|
||||
|
||||
patches = [
|
||||
@@ -46,12 +45,6 @@ buildPythonPackage rec {
|
||||
pangocairo = "${pango.out}/lib/libpangocairo-1.0${stdenv.hostPlatform.extensions.sharedLibrary}";
|
||||
harfbuzz = "${harfbuzz.out}/lib/libharfbuzz${stdenv.hostPlatform.extensions.sharedLibrary}";
|
||||
})
|
||||
# Disable tests for new Ghostscript
|
||||
# Remove when next version is released
|
||||
(fetchpatch {
|
||||
url = "https://github.com/Kozea/WeasyPrint/commit/e544398b00d76bc0317ea7e2abe40dc46b380910.patch";
|
||||
sha256 = "sha256-oQO3j9Mo1x98WaLPROxsOn0qkeYRJrCx5QWWKoHvabE=";
|
||||
})
|
||||
];
|
||||
|
||||
nativeBuildInputs = [
|
||||
@@ -96,9 +89,13 @@ buildPythonPackage rec {
|
||||
export HOME=$TMPDIR
|
||||
'';
|
||||
|
||||
pythonImportsCheck = [
|
||||
"weasyprint"
|
||||
];
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "https://weasyprint.org/";
|
||||
description = "Converts web documents to PDF";
|
||||
homepage = "https://weasyprint.org/";
|
||||
license = licenses.bsd3;
|
||||
maintainers = with maintainers; [ elohmeier ];
|
||||
};
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
diff --git a/weasyprint/text/ffi.py b/weasyprint/text/ffi.py
|
||||
index 0734cbea..22e31a5e 100644
|
||||
index 09f614aad..cbe9a73dd 100644
|
||||
--- a/weasyprint/text/ffi.py
|
||||
+++ b/weasyprint/text/ffi.py
|
||||
@@ -387,22 +387,11 @@ def _dlopen(ffi, *names):
|
||||
return ffi.dlopen(names[0]) # pragma: no cover
|
||||
|
||||
@@ -415,22 +415,11 @@ def _dlopen(ffi, *names):
|
||||
with suppress((OSError, FileNotFoundError)):
|
||||
os.add_dll_directory(dll_directory)
|
||||
|
||||
-gobject = _dlopen(
|
||||
- ffi, 'gobject-2.0-0', 'gobject-2.0', 'libgobject-2.0-0',
|
||||
@@ -18,7 +18,7 @@ index 0734cbea..22e31a5e 100644
|
||||
- 'libharfbuzz-0.dll')
|
||||
-fontconfig = _dlopen(
|
||||
- ffi, 'fontconfig-1', 'fontconfig', 'libfontconfig', 'libfontconfig.so.1',
|
||||
- 'libfontconfig-1.dylib', 'libfontconfig-1.dll')
|
||||
- 'libfontconfig.1.dylib', 'libfontconfig-1.dll')
|
||||
-pangoft2 = _dlopen(
|
||||
- ffi, 'pangoft2-1.0-0', 'pangoft2-1.0', 'libpangoft2-1.0-0',
|
||||
- 'libpangoft2-1.0.so.0', 'libpangoft2-1.0.dylib', 'libpangoft2-1.0-0.dll')
|
||||
@@ -28,5 +28,4 @@ index 0734cbea..22e31a5e 100644
|
||||
+fontconfig = _dlopen(ffi, '@fontconfig@')
|
||||
+pangoft2 = _dlopen(ffi, '@pangoft2@')
|
||||
|
||||
gobject.g_type_init()
|
||||
|
||||
gobject.g_type_init()
|
||||
Reference in New Issue
Block a user