From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id sJvNHRvyw1+DRAAA0tVLHw (envelope-from ) for ; Sun, 29 Nov 2020 19:10:19 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id 6DyZGRvyw1+3WwAAB5/wlQ (envelope-from ) for ; Sun, 29 Nov 2020 19:10:19 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 75AB1940437 for ; Sun, 29 Nov 2020 19:10:18 +0000 (UTC) Received: from localhost ([::1]:56674 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kjS5R-0004Ez-DG for larch@yhetil.org; Sun, 29 Nov 2020 14:10:17 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:34264) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kjS5C-0004EO-24 for bug-guix@gnu.org; Sun, 29 Nov 2020 14:10:02 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:41092) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kjS5B-0004AQ-Qn for bug-guix@gnu.org; Sun, 29 Nov 2020 14:10:01 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kjS5B-0003yc-Le for bug-guix@gnu.org; Sun, 29 Nov 2020 14:10:01 -0500 Subject: bug#42409: weasyprint fails to build Resent-From: Maxim Cournoyer Original-Sender: "Debbugs-submit" Resent-To: bug-guix@gnu.org Resent-Date: Sun, 29 Nov 2020 19:10:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: cc-closed 42409 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: Michael Rohleder Mail-Followup-To: 42409@debbugs.gnu.org, maxim.cournoyer@gmail.com, mike@rohleder.de Received: via spool by 42409-done@debbugs.gnu.org id=D42409.160667696515236 (code D ref 42409); Sun, 29 Nov 2020 19:10:01 +0000 Received: (at 42409-done) by debbugs.gnu.org; 29 Nov 2020 19:09:25 +0000 Received: from localhost ([127.0.0.1]:52636 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kjS4X-0003xa-BN for submit@debbugs.gnu.org; Sun, 29 Nov 2020 14:09:25 -0500 Received: from mail-qk1-f174.google.com ([209.85.222.174]:38514) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kjS4U-0003xN-Tj for 42409-done@debbugs.gnu.org; Sun, 29 Nov 2020 14:09:19 -0500 Received: by mail-qk1-f174.google.com with SMTP id i199so9023892qke.5 for <42409-done@debbugs.gnu.org>; Sun, 29 Nov 2020 11:09:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-transfer-encoding; bh=iWZklOf74k2yfDBfYLcaey50QEL4qd2UWdWhGS2qUNg=; b=jIgXZud2vyKhxdSPkhpDE92i1C13mb37jTW8DFkuj4TgJqS66q0F3YG8OwmI0F3514 cnueMzTsVTVZ7KfoL5lzP4unlSGdIS4n520K5rGd9LACsJfgqBs7np24Q9zgO0yiN3Ls w28a8WcmEUtEdN2pUnnrhpJmHjh3BA5zHdD0guRIn/0wNMqnCuWBAV8C5hLxJFjQNeZI wz4sF8UZsWr/6W88cEJA14uywm6Z45vTSGTWGdcVUTzA33fiq0lNokLSKq/zWLN2PO1N +sVDN0e4bEzDPs5sHwY76Tod6yy9rG/B3/ORMRoqM6ByzSWHJPFh5lypGeWVa5YwJ/m+ O0fQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version:content-transfer-encoding; bh=iWZklOf74k2yfDBfYLcaey50QEL4qd2UWdWhGS2qUNg=; b=bzavBQZi+ZnGyu2tYh8+CQw7LYIqm6jkqRUtU/58FXUMsLVKi0b5FA+S8B+tJmMujv MIvlM+tMntCFArGSbyaZSfZ+EGHmlkmnBcazBHh3lHZI9RQfZO69IJdUzPDL72p5/eCE BwE+MQR1wc+fZmUAkPRxK0Il4Ze4IeR1HIndpg0toKFY0+vFAP50KptYnWiA3Z4IxG5D zvxR1wvQypm74L54/aYcVeqN3HjulE2cJTdOQ/BkvNhP8JbSibpsZJ35UsB7oGN677hu fQOsjLch1cNdC37nZr35mKphkBXIceacGfjxkevi3FqU7STPIa8l5eCM1Wrye2hJLDsN BOBQ== X-Gm-Message-State: AOAM532lPxtjhHywtW7Np17Wp3n31T+wh14KLo00OsqMJyuAkoEf5VtB 08o9Ebp5i6WFi4CrzNqwNPXyMebKsMoYbA== X-Google-Smtp-Source: ABdhPJyhGB41AJq1QIWYzIcwQjsi/BJLJBpN03ZJWqLX0jv8oF1ie786pZTy7bSUiY4jFqW/xzymgg== X-Received: by 2002:a37:d0c:: with SMTP id 12mr19321493qkn.418.1606676953217; Sun, 29 Nov 2020 11:09:13 -0800 (PST) Received: from hurd (dsl-150-82.b2b2c.ca. [66.158.150.82]) by smtp.gmail.com with ESMTPSA id i84sm13109735qke.33.2020.11.29.11.09.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 29 Nov 2020 11:09:12 -0800 (PST) From: Maxim Cournoyer References: <87o8oem3n7.fsf@rohleder.de> Date: Sun, 29 Nov 2020 14:09:11 -0500 In-Reply-To: <87o8oem3n7.fsf@rohleder.de> (Michael Rohleder's message of "Fri, 17 Jul 2020 19:51:08 +0200") Message-ID: <87a6v0nfoo.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-Spam-Score: -1.0 (-) X-BeenThere: bug-guix@gnu.org List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: 42409-done@debbugs.gnu.org Errors-To: bug-guix-bounces+larch=yhetil.org@gnu.org Sender: "bug-Guix" X-Migadu-Flow: FLOW_IN X-Migadu-Spam-Score: -1.18 X-Scanner: ns3122888.ip-94-23-21.eu Authentication-Results: aspmx1.migadu.com; dkim=fail (headers rsa verify failed) header.d=gmail.com header.s=20161025 header.b=jIgXZud2; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of bug-guix-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=bug-guix-bounces@gnu.org X-TUID: TRgUgrCRW9J0 Hello, Michael Rohleder writes: > weasyprint fails in tests: > > ... > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D FAILURES =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > > > @assert_no_logs > @requires('cairo', (1, 12, 0)) > def test_acid2(): > def render(filename): > return HTML(resource_filename(filename)).render(enable_hintin= g=3DTrue) >=20=20=20=20=20 > with capture_logs(): > # This is a copy of http://www.webstandards.org/files/acid2/t= est.html > document =3D render('acid2-test.html') > intro_page, test_page =3D document.pages > # Ignore the intro page: it is not in the reference > test_image, width, height =3D document.copy( > [test_page]).write_image_surface() >=20=20=20=20=20 > # This is a copy of http://www.webstandards.org/files/acid2/refer= ence.html > ref_image, ref_width, ref_height =3D render( > 'acid2-reference.html').write_image_surface() >=20=20=20=20=20 > assert (width, height) =3D=3D (ref_width, ref_height) >> assert_pixels_equal( > 'acid2', width, height, image_to_pixels(test_image, width, he= ight), > image_to_pixels(ref_image, width, height), tolerance=3D2) > > weasyprint/tests/test_acid2.py:37:=20 > _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _= _ _ _=20 > > name =3D 'acid2', width =3D 794, height =3D 1123 > raw =3D b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0= 0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00...00\x00\x00\x00\x00\= x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00= \x00\x00\x00\x00\x00\x00' > expected_raw =3D b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x= 00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00...00\x00\x00= \x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0= 0\x00\x00\x00\x00\x00\x00\x00\x00' > tolerance =3D 2 > > def assert_pixels_equal(name, width, height, raw, expected_raw, toler= ance=3D0): > """Take 2 matrices of pixels and assert that they are the same.""" > if raw !=3D expected_raw: # pragma: no cover > for i, (value, expected) in enumerate(zip(raw, expected_raw)): > if abs(value - expected) > tolerance: > write_png(name, raw, width, height) > write_png(name + '.expected', expected_raw, > width, height) > pixel_n =3D i // 4 > x =3D pixel_n // width > y =3D pixel_n % width > i % 4 > pixel =3D tuple(list(raw[i:i + 4])) > expected_pixel =3D tuple(list( > expected_raw[i:i + 4])) >> assert 0, ( > 'Pixel (%i, %i) in %s: expected rgba%s, got rgba%= s' > % (x, y, name, expected_pixel, pixel)) > E AssertionError: Pixel (124, 160) in acid2: expected r= gba(191, 127, 127, 255), got rgba(128, 0, 0, 255) > > weasyprint/tests/test_draw/__init__.py:163: AssertionError > > INFO weasyprint.progress:__init__.py:106 Step 1 - Fetching and parsing > HTML - > /tmp/guix-build-weasyprint-51.drv-0/WeasyPrint-51/weasyprint/tests/resour= ces/acid2-test.html > INFO weasyprint.progress:__init__.py:315 Step 2 - Fetching and parsin= g CSS - CSS string > WARNING weasyprint:__init__.py:825 Invalid or unsupported selector > '[class=3Dsecond two] ', (, 'expected ], got ident') > WARNING weasyprint:__init__.py:86 Ignored `error: \}` at 90:74, unknown = property. > WARNING weasyprint:__init__.py:86 Ignored `m > rgin: 2em` at 93:14, unknown property. > WARNING weasyprint:__init__.py:825 Invalid or unsupported selector '; > .parser ', (, 'expected a compound selector, got liter= al') > WARNING weasyprint:__init__.py:86 Ignored `width: 200` at 95:14, invalid= value. > WARNING weasyprint:__init__.py:86 Ignored `border: 5em solid red ! error= ` at 96:14, invalid value. > WARNING weasyprint:__init__.py:86 Ignored `background: red pink` at 97:1= 4, invalid value. > INFO weasyprint.progress:__init__.py:315 Step 2 - Fetching and parsing > CSS - data:text/css,.picture%20%7B%20background%3A%20none%3B%20%7D > INFO weasyprint.progress:__init__.py:67 Step 3 - Applying CSS > INFO weasyprint.progress:document.py:371 Step 4 - Creating formatting= structure > ERROR weasyprint:images.py:231 Failed to load image at > "file:///tmp/guix-build-weasyprint-51.drv-0/WeasyPrint-51/weasyprint/test= s/resources/404" > (URLError: '/tmp/guix-build-weasyprint-51.drv-0/WeasyPrint-51/weasyprint/tests/resou= rces/404'>) > ERROR weasyprint:images.py:231 Failed to load image at > "data:application/x-unknown,ERROR" (Pixbuf error: Unrecognized image > file format) > INFO weasyprint.progress:pages.py:798 Step 5 - Creating layout - Page= 1 > INFO weasyprint.progress:pages.py:798 Step 5 - Creating layout - Page= 2 > INFO weasyprint.progress:document.py:751 Step 6 - Drawing > INFO weasyprint.progress:__init__.py:106 Step 1 - Fetching and parsing > HTML - > /tmp/guix-build-weasyprint-51.drv-0/WeasyPrint-51/weasyprint/tests/resour= ces/acid2-reference.html > INFO weasyprint.progress:__init__.py:315 Step 2 - Fetching and parsin= g CSS - CSS string > INFO weasyprint.progress:__init__.py:67 Step 3 - Applying CSS > INFO weasyprint.progress:document.py:371 Step 4 - Creating formatting= structure > INFO weasyprint.progress:pages.py:798 Step 5 - Creating layout - Page= 1 > INFO weasyprint.progress:document.py:751 Step 6 - Drawing > > > @assert_no_logs > def test_line_content(): > for width, remaining in [(100, 'text for test'), > (45, 'is a text for test')]: > text =3D 'This is a text for test' > _, length, resume_at, _, _, _ =3D make_text( > text, width, font_family=3DSANS_FONTS.split(','), font_si= ze=3D19) >> assert text[resume_at:] =3D=3D remaining > E AssertionError: assert 'a text for test' =3D=3D 'text for tes= t' > E - a text for test > E ? -- > E + text for test > > ../../../WeasyPrint-51/weasyprint/tests/test_text.py:37: AssertionError > > @assert_no_logs > def test_line_breaking(): > string =3D 'Th=C3=AFs is a text for test' >=20=20=20=20=20 > # These two tests do not really rely on installed fonts > _, _, resume_at, _, _, _ =3D make_text(string, 90, font_size=3D1) > assert resume_at is None >=20=20=20=20=20 > _, _, resume_at, _, _, _ =3D make_text(string, 90, font_size=3D10= 0) > assert string.encode('utf-8')[resume_at:].decode('utf-8') =3D=3D ( > 'is a text for test') >=20=20=20=20=20 > _, _, resume_at, _, _, _ =3D make_text( > string, 100, font_family=3DSANS_FONTS.split(','), font_size= =3D19) >> assert string.encode('utf-8')[resume_at:].decode('utf-8') =3D=3D ( > 'text for test') > E AssertionError: assert 'a text for test' =3D=3D 'text for test' > E - a text for test > E ? -- > E + text for test > > ../../../WeasyPrint-51/weasyprint/tests/test_text.py:62: AssertionError > > ... > > =3D 41 failed, 1132 passed, 1 deselected, 7 xfailed, 1 warning in 84.56s = (0:01:24) =3D > command "pytest" "-k" "not test_flex_column_wrap_reverse" failed with sta= tus 1 > builder for `/gnu/store/5c9h7c9pnrbpmk1015vrckrwsf5hd5xr-weasyprint-51.dr= v' failed with exit code 1 These failures were due to the 'DejaVu Sans' font not being available. This is now fixed, along with an updated Weasyprint and some of its dependencies, as of commit c601e2bf9adb05dc9dd9f3a565f693e968eb785c. Thank you for the report! Closing. Maxim