]> git.pld-linux.org Git - packages/python-paramiko.git/blob - python-paramiko.spec
up to 2.4.2
[packages/python-paramiko.git] / python-paramiko.spec
1 #
2 # Conditional build:
3 %bcond_with     apidocs # API docs packaging   # Docs gone since 2.0.1 ?
4 %bcond_with     tests   # unit tests
5 %bcond_without  python2 # CPython 2.x module
6 %bcond_without  python3 # CPython 3.x module
7
8 %define         module  paramiko
9 Summary:        SSH2 protocol for Python 2
10 Summary(pl.UTF-8):      Obsługa protokołu SSH2 w Pythonie 2
11 Name:           python-%{module}
12 Version:        2.4.2
13 Release:        1
14 License:        LGPL v2.1+
15 Group:          Libraries/Python
16 #Source0Download: https://pypi.python.org/simple/paramiko/
17
18 Source0:        https://github.com/paramiko/paramiko/archive/%{version}.tar.gz
19 # Source0-md5:  7de566f1b0a65c59c635ccce7469604b
20 URL:            https://github.com/paramiko/paramiko/
21 BuildRequires:  rpm-pythonprov
22 BuildRequires:  rpmbuild(macros) >= 1.710
23 %if %{with python2}
24 BuildRequires:  python-PyNaCl >= 1.0.1
25 BuildRequires:  python-bcrypt >= 3.1.3
26 BuildRequires:  python-cryptography >= 1.5
27 BuildRequires:  python-devel >= 1:2.6
28 BuildRequires:  python-pyasn1 >= 0.1.7
29 %{?with_tests:BuildRequires:    python-pytest}
30 %endif
31 %if %{with python3}
32 BuildRequires:  python3-PyNaCl >= 1.0.1
33 BuildRequires:  python3-bcrypt >= 3.1.3
34 BuildRequires:  python3-cryptography >= 1.5
35 BuildRequires:  python3-devel >= 1:3.2
36 BuildRequires:  python3-pyasn1 >= 0.1.7
37 %{?with_tests:BuildRequires:    python3-pytest}
38 %endif
39 Requires:       python-PyNaCl >= 1.0.1
40 Requires:       python-bcrypt >= 3.1.3
41 Requires:       python-cryptography >= 1.5
42 Requires:       python-pyasn1 >= 0.1.7
43
44 BuildArch:      noarch
45 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
46
47 %description
48 A module for Python 2.6 (or higher) that implements the SSH2 protocol
49 for secure (encrypted and authenticated) connections to remote
50 machines.
51
52 %description -l pl.UTF-8
53 Moduł dla języka Python 2.6 (lub wyższego) implementujący protokół
54 SSH2 dla uzyskania bezpiecznych (szyfrowanych i autoryzowanych)
55 połączeń ze zdalnymi maszynami.
56
57 %package -n python3-%{module}
58 Summary:        SSH2 protocol for Python 3
59 Summary(pl.UTF-8):      Obsługa protokołu SSH2 w Pythonie 3
60 Group:          Libraries/Python
61 Requires:       python3-PyNaCl >= 1.0.1
62 Requires:       python3-bcrypt >= 3.1.3
63 Requires:       python3-cryptography >= 1.1
64 Requires:       python3-modules >= 1:3.2
65 Requires:       python3-pyasn1 >= 0.1.7
66
67 %description -n python3-%{module}
68 A module for Python 3.2 (or higher) that implements the SSH2 protocol
69 for secure (encrypted and authenticated) connections to remote
70 machines.
71
72 %description -n python3-%{module} -l pl.UTF-8
73 Moduł dla języka Python 3.2 (lub wyższego) implementujący protokół
74 SSH2 dla uzyskania bezpiecznych (szyfrowanych i autoryzowanych)
75 połączeń ze zdalnymi maszynami.
76
77 %package apidocs
78 Summary:        API documentation for paramiko module
79 Summary(pl.UTF-8):      Dokumentacja API modułu paramiko
80 Group:          Documentation
81
82 %description apidocs
83 API documentation for paramiko module.
84
85 %description apidocs -l pl.UTF-8
86 Dokumentacja API modułu paramiko.
87
88 %prep
89 %setup -q -n %{module}-%{version}
90
91 find demos -name '*.py' -type f | xargs sed -i -e '1s|#!.*python.*|#!%{_bindir}/python|'
92
93 # Windows-specific modules, break tests by using Windows-specific ctypes API
94 %{__rm} paramiko/{win_pageant,_winapi}.py
95
96 %build
97 %if %{with python2}
98 %py_build %{?with_tests:test}
99 %endif
100
101 %if %{with python3}
102 %py3_build %{?with_tests:test}
103 %endif
104
105 %install
106 rm -rf $RPM_BUILD_ROOT
107
108 %if %{with python2}
109 %py_install
110
111 %py_postclean
112 %endif
113
114 %if %{with python3}
115 %py3_install
116 %endif
117
118 %if %{with python2}
119 install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
120 cp -a demos/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
121 %endif
122 %if %{with python3}
123 install -d $RPM_BUILD_ROOT%{_examplesdir}/python3-%{module}-%{version}
124 cp -a demos/* $RPM_BUILD_ROOT%{_examplesdir}/python3-%{module}-%{version}
125 find $RPM_BUILD_ROOT%{_examplesdir}/python3-%{module}-%{version} -name '*.py' \
126         | xargs sed -i '1s|^#!.*python\b|#!%{__python3}|'
127 %endif
128
129 %clean
130 rm -rf $RPM_BUILD_ROOT
131
132 %if %{with python2}
133 %files
134 %defattr(644,root,root,755)
135 %doc README.rst
136 %{py_sitescriptdir}/%{module}
137 %{py_sitescriptdir}/%{module}-*.egg-info
138 %{_examplesdir}/%{name}-%{version}
139 %endif
140
141 %if %{with python3}
142 %files -n python3-%{module}
143 %defattr(644,root,root,755)
144 %doc README.rst
145 %{py3_sitescriptdir}/%{module}
146 %{py3_sitescriptdir}/%{module}-%{version}-py*.egg-info
147 %{_examplesdir}/python3-%{module}-%{version}
148 %endif
149
150 %if %{with apidocs}
151 %files apidocs
152 %defattr(644,root,root,755)
153 %doc docs/{_static,api,*.html,*.js}
154 %endif
This page took 0.089039 seconds and 3 git commands to generate.