From b9e4bbbd43aa9396843e5e87c464d68b49ead91b Mon Sep 17 00:00:00 2001 From: Leo Date: Thu, 12 Sep 2019 18:49:18 -0300 Subject: testing/py3-cairosvg: upgrade to 2.4.2 --- testing/py3-cairosvg/APKBUILD | 6 +-- testing/py3-cairosvg/fix-flaky-tests.patch | 71 ------------------------------ 2 files changed, 2 insertions(+), 75 deletions(-) delete mode 100644 testing/py3-cairosvg/fix-flaky-tests.patch (limited to 'testing/py3-cairosvg') diff --git a/testing/py3-cairosvg/APKBUILD b/testing/py3-cairosvg/APKBUILD index cf6a39ce78..488ffba21a 100644 --- a/testing/py3-cairosvg/APKBUILD +++ b/testing/py3-cairosvg/APKBUILD @@ -1,7 +1,7 @@ # Maintainer: Drew DeVault pkgname=py3-cairosvg _pyname=CairoSVG -pkgver=2.4.1 +pkgver=2.4.2 pkgrel=0 pkgdesc="Cairo-based SVG renderer for python" url="https://cairosvg.org" @@ -13,7 +13,6 @@ makedepends="python3-dev py3-setuptools cairo-dev" _pypiprefix="${_pyname%${_pyname#?}}" source=" https://files.pythonhosted.org/packages/source/$_pypiprefix/$_pyname/$_pyname-$pkgver.tar.gz - fix-flaky-tests.patch " builddir="$srcdir"/CairoSVG-$pkgver replaces="py-cairosvg" # Backwards compat @@ -31,5 +30,4 @@ package() { python3 setup.py install --prefix=/usr --root="$pkgdir" } -sha512sums="bccc4f5aeccede49fa62d4384869d5d5602a368f6dc034c9c00217f4b527bd60beecd4026aac763551d6ec03bc951014042bfd96602b9a78d9c66f87270a8ac6 CairoSVG-2.4.1.tar.gz -007b99675ed0ad01a30b59e4bdc58fff9e31b1e8966aac758ffbf1c29526cceeda6b239ee35e239ee44ad216111a2e0d70471ac458907a445169888f5124c72c fix-flaky-tests.patch" +sha512sums="0d6dd22d9569fd3849cf7f6594c86bed719169dac1f0f3219e88d82f9d245bf29d51715159085cb26c0340c8f0dcb88412d141ec0ee3710b1477626f5a578441 CairoSVG-2.4.2.tar.gz" diff --git a/testing/py3-cairosvg/fix-flaky-tests.patch b/testing/py3-cairosvg/fix-flaky-tests.patch deleted file mode 100644 index 3a974d7ca6..0000000000 --- a/testing/py3-cairosvg/fix-flaky-tests.patch +++ /dev/null @@ -1,71 +0,0 @@ -From 1b9542f941dad041a16e49b732d8f2ba9fe28e7d Mon Sep 17 00:00:00 2001 -From: Guillaume Ayoub -Date: Thu, 22 Aug 2019 12:11:21 +0200 -Subject: [PATCH] Only use 100 bytes of generated documents for API testing - -As we mainly test the format here (and not the content), using the whole file -is useless. It also allows small differences between reference and tested -documents, like the generation date for PDF files. - -Fix #247. ---- - cairosvg/test_api.py | 16 ++++++++-------- - 1 file changed, 8 insertions(+), 8 deletions(-) - -diff --git a/cairosvg/test_api.py b/cairosvg/test_api.py -index f29db80..7d8835f 100644 ---- a/cairosvg/test_api.py -+++ b/cairosvg/test_api.py -@@ -144,10 +144,10 @@ def test_low_level_api(): - - def test_script(): - """Test the ``cairosvg`` script and the ``main`` function.""" -- expected_png = svg2png(SVG_SAMPLE) -- expected_pdf = svg2pdf(SVG_SAMPLE) -+ expected_png = svg2png(SVG_SAMPLE)[:100] -+ expected_pdf = svg2pdf(SVG_SAMPLE)[:100] - -- def test_main(args, exit_=False, input_=None): -+ def test_main(args, exit_=False, input_=None, full=False): - """Test main called with given ``args``. - - If ``exit_`` is ``True``, check that ``SystemExit`` is raised. We then -@@ -179,7 +179,7 @@ def test_main(args, exit_=False, input_=None): - sys.stdout.flush() - output = output_buffer.getvalue() - sys.stdin, sys.stdout = old_stdin, old_stdout -- return output -+ return output if full else output[:100] - - with tempfile.NamedTemporaryFile(delete=False) as file_object: - file_object.write(SVG_SAMPLE) -@@ -198,7 +198,7 @@ def test_main(args, exit_=False, input_=None): - assert test_main(['-'], input_=svg_filename) == expected_pdf - - # Test DPI -- output = test_main([svg_filename, '-d', '10', '-f', 'png']) -+ output = test_main([svg_filename, '-d', '10', '-f', 'png'], full=True) - image = cairo.ImageSurface.create_from_png(io.BytesIO(output)) - assert image.get_width() == 40 - assert image.get_height() == 50 -@@ -208,17 +208,17 @@ def test_main(args, exit_=False, input_=None): - temp_1 = os.path.join(temp, 'result_1') - # Default to PDF - assert not test_main([svg_filename, '-o', temp_1]) -- assert read_file(temp_1) == expected_pdf -+ assert read_file(temp_1)[:100] == expected_pdf - - temp_2 = os.path.join(temp, 'result_2.png') - # Guess from the file extension - assert not test_main([svg_filename, '-o', temp_2]) -- assert read_file(temp_2) == expected_png -+ assert read_file(temp_2)[:100] == expected_png - - temp_3 = os.path.join(temp, 'result_3.png') - # Explicit -f wins - assert not test_main([svg_filename, '-o', temp_3, '-f', 'pdf']) -- assert read_file(temp_3) == expected_pdf -+ assert read_file(temp_3)[:100] == expected_pdf - finally: - shutil.rmtree(temp) - -- cgit v1.2.3