]> git.pld-linux.org Git - SPECS.git/blob - python-x2go.spec
SPECS updated Wed 28 Jul 14:48:01 CEST 2021
[SPECS.git] / python-x2go.spec
1 #
2 # Conditional build:
3 %bcond_without  doc             # don't build doc
4 %bcond_without  python2 # CPython 2.x module
5 %bcond_with     python3 # CPython 3.x module
6
7 %define         module  x2go
8 Summary:        Python module providing X2Go client API
9 Name:           python-%{module}
10 Version:        0.5.0.3
11 Release:        3
12 License:        AGPLv3+
13 Group:          Development/Languages
14 Source0:        http://code.x2go.org/releases/source/python-%{module}/%{name}-%{version}.tar.gz
15 # Source0-md5:  b5359cd80779b5e50586f6dbf35fd659
16 Patch0:         python-x2go-py3.patch
17 URL:            http://www.x2go.org/
18 BuildRequires:  rpmbuild(macros) >= 1.710
19 BuildRequires:  python-setuptools
20 BuildRequires:  rpm-pythonprov
21 %if %{with python3}
22 BuildRequires:  python3-devel
23 # For 2to3
24 BuildRequires:  python-tools
25 %endif
26 %if %{with doc}
27 # For doc build
28 BuildRequires:  epydoc
29 BuildRequires:  python-gevent
30 BuildRequires:  python-paramiko
31 BuildRequires:  python-requests
32 BuildRequires:  python-simplejson
33 # For docs
34 BuildRequires:  python-Xlib
35 %endif
36 # for nxproxy
37 Requires:       nx
38 Requires:       python-Xlib
39 Requires:       python-gevent
40 Requires:       python-paramiko
41 Requires:       python-requests
42 Requires:       python-simplejson
43 BuildArch:      noarch
44 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
45
46 %description
47 X2Go is a server based computing environment with:
48 - session resuming
49 - low bandwidth support
50 - session brokerage support
51 - client side mass storage mounting support
52 - audio support
53 - authentication by smartcard and USB stick
54
55 This Python module allows you to integrate X2Go client support into
56 your Python applications by providing a Python-based X2Go client API.
57
58 %package doc
59 Summary:        Python X2Go client API documentation
60 Group:          Documentation
61 Requires:       %{name} = %{version}-%{release}
62
63 %description doc
64 This package contains the Python X2Go client API documentation.
65
66 %package -n python3-%{module}
67 Summary:        Python module providing X2Go client API
68 Group:          Development/Languages
69
70 %description -n python3-%{module}
71 X2Go is a server based computing environment with:
72    - session resuming
73    - low bandwidth support
74    - session brokerage support
75    - client side mass storage mounting support
76    - audio support
77    - authentication by smartcard and USB stick
78
79 This Python module allows you to integrate X2Go client support into
80 your Python applications by providing a Python-based X2Go client API.
81
82 %prep
83 %setup -q
84
85 %if %{with python3}
86 rm -rf py3
87 cp -a . py3
88 %endif
89
90 %build
91 %py_build
92
93 %if %{with python3}
94 cd py3
95 2to3 --write --nobackups py3
96 %py3_build
97 cd ..
98 %endif
99
100 %if %{with doc}
101 # Build the docs
102 mkdir -p epydoc/html
103 epydoc --debug -n "Python X2Go" -u http://www.x2go.org -v --html --no-private -o epydoc/html x2go/
104 %endif
105
106 %install
107 rm -rf $RPM_BUILD_ROOT
108 %if %{with python3}
109 cd py3
110 %py3_install
111 cd ..
112 %endif
113
114 %py_install
115
116 %{__rm} -r $RPM_BUILD_ROOT%{py_sitescriptdir}/x2go/tests
117
118 %py_postclean
119
120 %clean
121 rm -rf $RPM_BUILD_ROOT
122
123 %files
124 %defattr(644,root,root,755)
125 %doc COPYING README* TODO
126 %{py_sitescriptdir}/x2go
127 %{py_sitescriptdir}/x2go-%{version}-py*.egg-info
128
129 %if %{with doc}
130 %files doc
131 %defattr(644,root,root,755)
132 %doc epydoc/html/*
133 %endif
134
135 %if %{with python3}
136 %files -n python3-%{module}
137 %defattr(644,root,root,755)
138 %endif
This page took 0.061064 seconds and 3 git commands to generate.