diff --git a/python-python-xlib.changes b/python-python-xlib.changes index 3564a92..37534cc 100644 --- a/python-python-xlib.changes +++ b/python-python-xlib.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Tue Nov 27 11:21:53 UTC 2018 - Tomáš Chvátal + +- Make sure the tests are run + ------------------------------------------------------------------- Tue Nov 27 09:04:39 UTC 2018 - sor.alexei@meowr.ru diff --git a/python-python-xlib.spec b/python-python-xlib.spec index 4919534..393f972 100644 --- a/python-python-xlib.spec +++ b/python-python-xlib.spec @@ -17,9 +17,7 @@ %{?!python_module:%define python_module() python-%{**} python3-%{**}} -%define X_display ":98" %define oldpython python -%bcond_with test Name: python-python-xlib Version: 0.23 Release: 0 @@ -28,17 +26,16 @@ License: LGPL-2.1-or-later Group: Development/Libraries/Python URL: https://github.com/python-xlib/python-xlib Source: https://files.pythonhosted.org/packages/source/p/python-xlib/python-xlib-%{version}.tar.bz2 -BuildRequires: %{python_module devel} +BuildRequires: %{python_module mock} +BuildRequires: %{python_module nose} BuildRequires: %{python_module setuptools_scm} BuildRequires: %{python_module setuptools} BuildRequires: %{python_module six >= 1.10.0} BuildRequires: fdupes BuildRequires: python-rpm-macros +BuildRequires: xvfb-run Requires: python-six >= 1.10.0 BuildArch: noarch -%if %{with test} -BuildRequires: xorg-x11-server -%endif %ifpython2 Provides: %{oldpython}-xlib = %{version} Obsoletes: %{oldpython}-xlib < %{version} @@ -57,21 +54,14 @@ library for Python programs. %setup -q -n python-xlib-%{version} %build -export CFLAGS="%{optflags}" %python_build %install %python_install %python_expand %fdupes %{buildroot}%{$python_sitelib} -%if %{with test} %check -export DISPLAY=%{X_display} -Xvfb %{X_display} >& Xvfb.log & -trap "kill $! || true" EXIT -sleep 10 -%python_exec runtests.py -%endif +%python_expand xvfb-run --server-args "-screen 0 1920x1080x24" $python runtests.py %files %{python_files} %license LICENSE