Blob Blame Raw
Name:           python-xlib
Version:        0.17
Release:        3%{?dist}
Summary:        X client library for Python

Group:          Development/Languages
License:        LGPLv2+
URL:            https://github.com/python-xlib/python-xlib
Source0:        https://github.com/%{name}/%{name}/archive/%{version}/%{name}-%{version}.tar.gz
Patch0:         increase-receiving-buffer
Patch1:         fix-unix-socket-in-display
Patch2:         fix-ssh-tunnel-auth 
Patch3:         fix-rhomboid-examples 
Patch4:         python-xlib-0.15rc1-xauthority.patch
# Fix perl usage
# https://sourceforge.net/p/python-xlib/bugs/41/
Patch7:         python-xlib-perl.patch
BuildArch:      noarch
BuildRequires:  texinfo-tex tetex-dvips
# For tests
BuildRequires:  xorg-x11-server-Xvfb

%description
The Python X Library is a complete X11R6 client-side implementation, 
written in pure Python. It can be used to write low-levelish X Windows 
client applications in Python.

%package -n python2-xlib
Summary:        X client library for Python 2
BuildRequires:  python2-devel
BuildRequires:  python2-setuptools_scm
BuildRequires:  python2-six >= 1.10.0
Requires:       python2-six >= 1.10.0
%{?python_provide:%python_provide python2-xlib}

%description -n python2-xlib
The Python X Library is a complete X11R6 client-side implementation, 
written in pure Python. It can be used to write low-levelish X Windows 
client applications in Python 2.

%package -n python%{python3_pkgversion}-xlib
Summary:        X client library for Python 3
BuildRequires:  python%{python3_pkgversion}-devel
BuildRequires:  python%{python3_pkgversion}-setuptools_scm
BuildRequires:  python%{python3_pkgversion}-six >= 1.10.0
Requires:       python%{python3_pkgversion}-six >= 1.10.0
%{?python_provide:%python_provide python%{python3_pkgversion}-xlib}

%description -n python%{python3_pkgversion}-xlib
The Python X Library is a complete X11R6 client-side implementation, 
written in pure Python. It can be used to write low-levelish X Windows 
client applications in Python 3.

%package doc
Summary:        Documentation and examples for python-xlib
Group:          Documentation

%description doc
Install this package if you want the developers' documentation and examples
that tell you how to program with python-xlib.

%prep
%setup -q
%patch0 -p1
%patch1 -p1
%patch2 -p1
%patch3 -p1
%patch4 -p1
%patch7 -p1 -b .perl

%build
%py2_build
%py3_build
cd doc
make html ps
cd html
rm Makefile texi2html

%install
%py2_install
%py3_install
chmod a-x examples/*.py

%check
xvfb-run %__python2 setup.py test
xvfb-run %__python3 setup.py test
 
%files -n python2-xlib
%license LICENSE
%doc NEWS README.rst TODO
%{python2_sitelib}/*

%files -n python%{python3_pkgversion}-xlib
%license LICENSE
%doc NEWS README.rst TODO
%{python3_sitelib}/*

%files doc
%license LICENSE
%doc examples doc/html doc/ps/python-xlib.ps


%changelog
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.17-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild

* Mon Dec 19 2016 Miro HronĨok <mhroncok@redhat.com> - 0.17-2
- Rebuild for Python 3.6

* Fri Sep 30 2016 Orion Poplawski <orion@cora.nwra.com> - 0.17-1
- Update to 0.17
- License changed to LGPLv2+
- Ship python3-xlib (bug #1360713)
- Modernize spec

* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 0.15-0.12.rc1
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild

* Fri Jun 19 2015 Orion Poplawski <orion@cora.nwra.com> - 0.15-0.11.rc1
- Add patch to fix perl usage

* Thu Jun 18 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.15-0.11.rc1
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild

* Sun Jun 08 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.15-0.10.rc1
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild

* Sun Aug 04 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.15-0.9.rc1
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild

* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.15-0.8.rc1
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild

* Sat Jul 21 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.15-0.7.rc1
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild

* Sat Jan 14 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.15-0.6.rc1
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild

* Sat Jun 04 2011 Luke Macken <lmacken@redhat.com> - 0.15-0.5.rc1
- Apply a couple of patches from upstream:
    * r139 - Accept IPv6 addresses in Xlib.display.Display
    * r138 - Remove a stray print statement

* Wed Feb 09 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.15-0.4.rc1
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild

* Fri Sep  3 2010 Thomas Spura <tomspur@fedoraproject.org> - 0.15-0.3.rc1
- try a workaround proposed by upstream for #552491

* Thu Jul 22 2010 David Malcolm <dmalcolm@redhat.com> - 0.15-0.2.rc1
- Rebuilt for https://fedoraproject.org/wiki/Features/Python_2.7/MassRebuild

* Mon Dec 14  2009 Jef Spaleta <jspaleta AT fedoraproject DOT org> - 0.15-0.1.rc1
- New upstream pre-release and some cherry picked patches from Debian from Fedora bug 537264 

* Sun Jul 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.14-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild

* Thu Feb 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.14-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild

* Sat Nov 29 2008 Ignacio Vazquez-Abrams <ivazqueznet+rpm@gmail.com> - 0.14-3
- Rebuild for Python 2.6

* Wed Sep  3 2008 Tom "spot" Callaway <tcallawa@redhat.com> - 0.14-2
- fix license tag

* Tue Jul 1 2008 Jef Spaleta <jspaleta AT fedoraproject DOT org> - 0.14-1
- Latest upstream release

* Tue Apr 10 2007 Jef Spaleta <jspaleta@gmail.com> - 0.13-3
- Created doc subpackage per suggestion in review

* Mon Mar 26 2007 Jef Spaleta <jspaleta@gmail.com> - 0.13-2
- Review Cleanup

* Sat Mar 24 2007 Jef Spaleta <jspaleta@gmail.com> - 0.13-1
- Initial packaging