File python-PyVirtualDisplay.spec of Package python-PyVirtualDisplay
#
# spec file for package python-PyVirtualDisplay
#
# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
%bcond_without test
Name: python-PyVirtualDisplay
Version: 0.2.1
Release: 0
Url: https://github.com/ponty/PyVirtualDisplay
Summary: Python wrapper for Xvfb, Xephyr and Xvnc
License: BSD-2-Clause
Group: Development/Languages/Python
Source: https://files.pythonhosted.org/packages/source/P/PyVirtualDisplay/PyVirtualDisplay-%{version}.tar.gz
BuildRequires: fdupes
BuildRequires: python-rpm-macros
BuildRequires: python3-2to3
BuildRequires: %{python_module devel}
BuildRequires: %{python_module setuptools}
%if %{with test}
BuildRequires: %{python_module EasyProcess}
BuildRequires: %{python_module nose}
%endif
Requires: python-EasyProcess
Requires: xorg-x11-Xvfb
Recommends: xorg-x11-Xvnc
Suggests: xorg-x11-server-extra
BuildArch: noarch
%python_subpackages
%description
PyVirtualDisplay is a python wrapper for Xvfb, Xephyr and Xvnc
%prep
%setup -q -n PyVirtualDisplay-%{version}
%build
%python_build
%install
%python_install
%python_expand %fdupes %{buildroot}%{$python_sitelib}
%if %{with test}
%check
mkdir tester
pushd tester
%{python_expand export PYTHONPATH=%{buildroot}%{$python_sitelib}
$python -B -m nose pyvirtualdisplay
}
popd
%endif
%files %{python_files}
%defattr(-,root,root,-)
%doc README.rst LICENSE.txt
%{python_sitelib}/*
%changelog