diff options
author | Natanael Copa <ncopa@alpinelinux.org> | 2021-12-14 15:57:55 +0100 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2021-12-15 20:18:17 +0100 |
commit | ed316a82b931571d627c65c166ecc6827b3d3f15 (patch) | |
tree | 7616ed74ccd2ca04d49cce4a0e142fbde31b20f6 | |
parent | fa970603890ce62afae87423021cff342ff6997a (diff) |
community/py3-cairosvg: fix tests
-rw-r--r-- | community/py3-cairosvg/APKBUILD | 17 | ||||
-rw-r--r-- | community/py3-cairosvg/python-cairosvg-disable-flake8-isort.patch | 22 |
2 files changed, 35 insertions, 4 deletions
diff --git a/community/py3-cairosvg/APKBUILD b/community/py3-cairosvg/APKBUILD index 75d706e6936..8d7fa4cbabb 100644 --- a/community/py3-cairosvg/APKBUILD +++ b/community/py3-cairosvg/APKBUILD @@ -12,24 +12,33 @@ depends=" py3-webencodings " checkdepends="py3-pytest py3-pillow py3-pytest-flake8 py3-pytest-isort - py3-pytest-runner" + py3-pytest-cov py3-pytest-runner" makedepends="python3-dev py3-setuptools cairo-dev py3-pytest-runner" _pypiprefix="${_pyname%${_pyname#?}}" -source="https://files.pythonhosted.org/packages/source/$_pypiprefix/$_pyname/$_pyname-$pkgver.tar.gz" +source="https://files.pythonhosted.org/packages/source/$_pypiprefix/$_pyname/$_pyname-$pkgver.tar.gz + python-cairosvg-disable-flake8-isort.patch" builddir="$srcdir"/CairoSVG-$pkgver replaces="py-cairosvg" # Backwards compat provides="py-cairosvg=$pkgver-r$pkgrel" # Backwards compat +prepare() { + mkdir test_non_regression/cairosvg_reference/ + cp -a $(ls -1 . | grep -v test_non_regression) test_non_regression/cairosvg_reference/ +} + build() { python3 setup.py build } check() { - pytest-3 cairosvg/test_api.py + python3 setup.py pytest -v } package() { python3 setup.py install --prefix=/usr --root="$pkgdir" } -sha512sums="070fbb549614401a7d8290497b0eb7702330ee264c5f625cd1e7aac4aea7d71ee7d2d8899297212e1a3c11c93903b191c0c699336d9000796318b11f4e075576 CairoSVG-2.5.2.tar.gz" +sha512sums=" +070fbb549614401a7d8290497b0eb7702330ee264c5f625cd1e7aac4aea7d71ee7d2d8899297212e1a3c11c93903b191c0c699336d9000796318b11f4e075576 CairoSVG-2.5.2.tar.gz +842790d398ff200cdc0f148d61bff69b90c79e2da135fe2158fe250aeeeee04567fe7ff645ad9a7c0d6a0b2fcbe58a64eecf4c9f62bb5d8cc39cf57628d135c6 python-cairosvg-disable-flake8-isort.patch +" diff --git a/community/py3-cairosvg/python-cairosvg-disable-flake8-isort.patch b/community/py3-cairosvg/python-cairosvg-disable-flake8-isort.patch new file mode 100644 index 00000000000..7833beaa68c --- /dev/null +++ b/community/py3-cairosvg/python-cairosvg-disable-flake8-isort.patch @@ -0,0 +1,22 @@ +diff --git a/setup.cfg b/setup.cfg +index d489d7f..04b19b6 100644 +--- a/setup.cfg ++++ b/setup.cfg +@@ -50,8 +50,6 @@ install_requires = + tinycss2 + tests_require = + pytest-cov +- pytest-flake8 +- pytest-isort + pytest-runner + python_requires = >= 3.5 + +@@ -80,8 +78,6 @@ test = pytest + + [tool:pytest] + addopts = +- --flake8 +- --isort + --ignore=test_regression/cairosvg_reference + norecursedirs = + build |