forked from pool/python-python-xlib
- Make sure the tests are run
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-python-xlib?expand=0&rev=4
This commit is contained in:
committed by
Git OBS Bridge
parent
8c63a81e0d
commit
96f1ccb47f
@@ -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
|
||||
|
Reference in New Issue
Block a user