LogoopenSUSE Build Service > Projects
Sign Up | Log In

View File python-xlib.spec of Package python-xlib (Project X11:RemoteDesktop:x2go)

#
# spec file for package python-xlib
#
# Copyright (c) 2012 SUSE LINUX Products 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/
#


Name:           python-xlib
Version:        0.14
Release:        0
Summary:        Python X11 interface
License:        GPL-2.0+
Group:          Development/Libraries/Python
Url:            http://python-xlib.sourceforge.net/
Source:         python-xlib-%{version}.tar.bz2
# PATCH-FIX-UPSTREAM python-xlib-0.14-fix-unix-socket-in-display.patch deb#324443
Patch0:         python-xlib-0.14-fix-unix-socket-in-display.patch
# PATCH-FIX-UPSTREAM python-xlib-0.14-increase-receiving-buffer.patch deb#357507
Patch1:         python-xlib-0.14-increase-receiving-buffer.patch
# PATCH-FIX-OPENSUSE python-xlib-0.14-xauthlocalhostname.patch bnc#623507
Patch2:         python-xlib-0.14-xauthlocalhostname.patch
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildRequires:  python-devel
%if 0%{?py_requires}
%py_requires
%endif
%if 0%{!?sles_version} || 0%{?sles_version} >= 12
# SLE11 has weird location for python_sitearch
BuildArch:      noarch
%else
%{!?python_sitelib: %global python_sitelib %(python -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
%endif

%description
The Python X Library is intended to be a fully functional X client
library for Python programs.

%prep
%setup
%patch0 -p1
%patch1 -p1
%patch2 -p1

%build
export CFLAGS="%optflags"
python setup.py build

%install
python setup.py install --prefix="%_prefix" --root="%buildroot"

%files
%defattr(-,root,root)
%doc README NEWS TODO COPYING
%python_sitelib/Xlib
%python_sitelib/python_xlib-*py*.egg-info

%changelog