diff --git a/python-cairocffi-disable-flake8-isort-for-pytest.patch b/python-cairocffi-disable-flake8-isort-for-pytest.patch new file mode 100644 index 0000000..49d5437 --- /dev/null +++ b/python-cairocffi-disable-flake8-isort-for-pytest.patch @@ -0,0 +1,30 @@ +diff --git a/setup.cfg b/setup.cfg +index 46330f3..40ae504 100644 +--- a/setup.cfg ++++ b/setup.cfg +@@ -43,8 +43,6 @@ install_requires = + setuptools >= 39.2.0 + tests_require = + pytest-cov +- pytest-flake8 +- pytest-isort + pytest-runner + python_requires = >= 3.5 + +@@ -61,8 +59,6 @@ doc = + test = + pytest-runner + pytest-cov +- pytest-flake8 +- pytest-isort + xcb = + xcffib >= 0.3.2 + +@@ -74,7 +70,6 @@ build-dir = docs/_build + test = pytest + + [tool:pytest] +-addopts = --flake8 --isort + norecursedirs = build dist .cache .eggs .git + + [flake8] diff --git a/python-cairocffi.spec b/python-cairocffi.spec index af41bc8..7118bb6 100644 --- a/python-cairocffi.spec +++ b/python-cairocffi.spec @@ -7,6 +7,7 @@ Summary: cffi-based cairo bindings for Python License: BSD URL: https://pypi.python.org/pypi/cairocffi/ Source0: %{pypi_source} +Patch0: python-cairocffi-disable-flake8-isort-for-pytest.patch BuildArch: noarch @@ -18,6 +19,9 @@ BuildRequires: python3-pytest-cov BuildRequires: python3-pytest-runner BuildRequires: python3-xcffib >= 0.3.2 BuildRequires: cairo-devel +# required to run the test suite +BuildRequires: gdk-pixbuf2 +BuildRequires: gdk-pixbuf2-modules %global _description\ cairocffi is a CFFI-based drop-in replacement for Pycairo, a set of\ @@ -39,6 +43,7 @@ Requires: python3-xcffib >= 0.3.2 %prep %autosetup -n cairocffi-%{version} +rm -rf %{srcname}.egg-info %build %py3_build @@ -46,6 +51,10 @@ Requires: python3-xcffib >= 0.3.2 %install %py3_install +%check +%{__python3} setup.py test + + %files -n python3-cairocffi %license LICENSE %doc README.rst