Blob Blame History Raw
#if 0%{?fedora}
#global with_python3 1
#endif

Name:           python-x2go
Version:        0.5.0.3
Release:        1%{?dist}
Summary:        Python module providing X2Go client API

Group:          Development/Languages
License:        AGPLv3+
URL:            http://www.x2go.org/
Source0:        http://code.x2go.org/releases/source/%{name}/%{name}-%{version}.tar.gz
Patch0:         python-x2go-py3.patch

BuildArch:      noarch
BuildRequires:  python2-devel
BuildRequires:  python-setuptools
%if 0%{?with_python3}
BuildRequires:  python3-devel
# For 2to3
BuildRequires:  python-tools
%endif # if with_python3
# For doc build
BuildRequires:  epydoc
BuildRequires:  python-gevent
BuildRequires:  python-paramiko
BuildRequires:  python-requests
BuildRequires:  python-simplejson
# For docs
BuildRequires:  python-xlib
Requires:       nxproxy
Requires:       python-gevent
Requires:       python-paramiko
Requires:       python-requests
Requires:       python-simplejson
Requires:       python-xlib

%description
X2Go is a server based computing environment with:
   - session resuming
   - low bandwidth support
   - session brokerage support
   - client side mass storage mounting support
   - audio support
   - authentication by smartcard and USB stick

This Python module allows you to integrate X2Go client support into your
Python applications by providing a Python-based X2Go client API.


%package        doc
Summary:        Python X2Go client API documentation
Group:          Documentation
Requires:       %{name} = %{version}-%{release}

%description    doc
This package contains the Python X2Go client API documentation.


%if 0%{?with_python3}
%package -n python3-x2go
Summary:        Python module providing X2Go client API
Group:          Development/Languages

%description -n python3-x2go
X2Go is a server based computing environment with:
   - session resuming
   - low bandwidth support
   - session brokerage support
   - client side mass storage mounting support
   - audio support
   - authentication by smartcard and USB stick

This Python module allows you to integrate X2Go client support into your
Python applications by providing a Python-based X2Go client API.
%endif # with_python3


%prep
%setup -q
# Python3
%if 0%{?with_python3}
rm -rf %{py3dir}
cp -a . %{py3dir}
2to3 --write --nobackups %{py3dir}
%endif # with_python3


%build
%{__python} setup.py build
%if 0%{?with_python3}
pushd %{py3dir}
%{__python3} setup.py build
popd
%endif # with_python3

# Build the docs
mkdir -p epydoc/html
epydoc --debug -n "Python X2Go" -u http://www.x2go.org -v --html --no-private -o epydoc/html x2go/


%install
%if 0%{?with_python3}
pushd %{py3dir}
%{__python3} setup.py install --skip-build --root %{buildroot}
popd
%endif # with_python3
%{__python} setup.py install --skip-build --root %{buildroot}


%files
%doc COPYING README* TODO
%{python_sitelib}/*

%files doc
%doc epydoc/html


%changelog
* Mon Jan 26 2015 Orion Poplawski <orion@cora.nwra.com> - 0.5.0.3-1
- Update to 0.5.0.3

* Thu Nov 27 2014 Orion Poplawski <orion@cora.nwra.com> - 0.5.0.2-1
- Update to 0.5.0.2

* Mon Oct 20 2014 Orion Poplawski <orion@cora.nwra.com> - 0.5.0.1-1
- Update to 0.5.0.1

* Mon Oct 20 2014 Orion Poplawski <orion@cora.nwra.com> - 0.5.0.0-1
- Update to 0.5.0.0

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

* Wed Jan 8 2014 Orion Poplawski <orion@cora.nwra.com> - 0.4.0.9-1
- Update to 0.4.0.9
- Drop python-cups requires

* Wed Dec 11 2013 Orion Poplawski <orion@cora.nwra.com> - 0.4.0.8-1
- Update to 0.4.0.8

* Tue Aug 6 2013 Orion Poplawski <orion@cora.nwra.com> - 0.4.0.7-1
- Update to 0.4.0.7

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

* Fri Aug 2 2013 Orion Poplawski <orion@cora.nwra.com> - 0.4.0.6-3
- Add requires nxproxy and python-cups
- Build the documentation and ship in -doc sub-package

* Thu Aug 1 2013 Orion Poplawski <orion@cora.nwra.com> - 0.4.0.6-2
- Remove python shbangs from library scripts

* Wed Jul 31 2013 Orion Poplawski <orion@cora.nwra.com> - 0.4.0.6-1
- Update to 0.4.0.6

* Wed Jul 10 2013 Orion Poplawski <orion@cora.nwra.com> - 0.4.0.4-1
- Update to 0.4.0.4

* Tue Feb 12 2013 Orion Poplawski <orion@cora.nwra.com> - 0.4.0.0-1
- Update to 0.4.0.0

* Tue Dec 18 2012 Orion Poplawski <orion@cora.nwra.com> - 0.2.1.1-1
- Initial Fedora package