aboutsummaryrefslogtreecommitdiffstats
path: root/testing/py3-cairosvg
diff options
context:
space:
mode:
authorLeo <thinkabit.ukim@gmail.com>2019-09-12 18:49:18 -0300
committerLeo <thinkabit.ukim@gmail.com>2019-09-12 18:58:37 -0300
commitb9e4bbbd43aa9396843e5e87c464d68b49ead91b (patch)
tree3c2b7b61aab83c4117f2583596d067ec4c8abd78 /testing/py3-cairosvg
parent2cdebbfd9d5e1fe32052910b8c7b92349dc2cb70 (diff)
downloadaports-b9e4bbbd43aa9396843e5e87c464d68b49ead91b.tar.bz2
aports-b9e4bbbd43aa9396843e5e87c464d68b49ead91b.tar.xz
testing/py3-cairosvg: upgrade to 2.4.2
Diffstat (limited to 'testing/py3-cairosvg')
-rw-r--r--testing/py3-cairosvg/APKBUILD6
-rw-r--r--testing/py3-cairosvg/fix-flaky-tests.patch71
2 files changed, 2 insertions, 75 deletions
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 <sir@cmpwn.com>
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 <guillaume.ayoub@kozea.fr>
-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)
-