Blob Blame History Raw
Name:           python-xlib
Version:        0.19
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
# tests need to import tohex
# https://github.com/python-xlib/python-xlib/pull/75
Patch1:         python-xlib-tohex.patch
Patch2:         fix-ssh-tunnel-auth 
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 -b .tohex
%patch2 -p1

%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
# Note - tests fail on big-endian, see https://github.com/python-xlib/python-xlib/issues/76
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
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.19-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild

* Wed Mar 1 2017 Orion Poplawski <orion@cora.nwra.com> - 0.19-2
- Add patch to fix test error

* Tue Feb 28 2017 Orion Poplawski <orion@cora.nwra.com> - 0.19-1
- Update to 0.19
- Drop upstreamed patches

* 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