]> git.pld-linux.org Git - packages/python-pyOpenSSL.git/blame_incremental - python-pyOpenSSL.spec
automatic change: use py_build/py_install macros
[packages/python-pyOpenSSL.git] / python-pyOpenSSL.spec
... / ...
CommitLineData
1#
2# Conditional build:
3%bcond_without python2 # CPython 2.x module
4%bcond_without python3 # CPython 3.x module
5%bcond_without doc # HTML documentation (sphinx-based)
6#
7%define module pyOpenSSL
8Summary: Python 2 interface to the OpenSSL library
9Summary(pl.UTF-8): Interfejs Pythona 2 do biblioteki OpenSSL
10Name: python-%{module}
11Version: 0.14
12Release: 4
13License: Apache v2.0
14Group: Libraries/Python
15Source0: https://pypi.python.org/packages/source/p/pyOpenSSL/%{module}-%{version}.tar.gz
16# Source0-md5: 8579ff3a1d858858acfba5f046a4ddf7
17URL: https://github.com/pyca/pyopenssl
18%if %{with python2}
19BuildRequires: python-modules >= 1:2.6
20%endif
21%if %{with python3}
22BuildRequires: python3-modules >= 3.2
23%endif
24BuildRequires: rpm-pythonprov
25BuildRequires: rpmbuild(macros) >= 1.612
26%{?with_doc:BuildRequires: sphinx-pdg}
27Requires: python-cryptography >= 0.2.1
28Requires: python-six >= 1.5.2
29Obsoletes: python-OpenSSL
30Obsoletes: python-pyOpenSSL-doc
31Obsoletes: python-pyOpenSSL-doc-html
32BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
33
34%description
35High-level wrapper around a subset of the OpenSSL library, includes:
36 - SSL.Connection objects, wrapping the methods of Python's portable
37 sockets
38 - Callbacks written in Python
39 - Extensive error-handling mechanism, mirroring OpenSSL's error codes
40...and much more.
41
42This package contains Python 2 modules.
43
44%description -l pl.UTF-8
45Wysokopoziomowe obudowanie podzbioru biblioteki OpenSSL, zawierające:
46 - obiekty SSL.Connection, obudowujący metody przenośnych gniazd
47 Pythona
48 - wywołania zwrotne napisane w Pythonie
49 - obszerny mechanizm obsługi błędów odzwierciedlający kody błędów
50 OpenSSL-a
51...i wiele więcej.
52
53Ten pakiet zawiera moduły Pythona 2.
54
55%package -n python3-pyOpenSSL
56Summary: Python 2 interface to the OpenSSL library
57Summary(pl.UTF-8): Interfejs Pythona 2 do biblioteki OpenSSL
58Group: Libraries/Python
59Requires: python3-cryptography >= 0.2.1
60Requires: python3-six >= 1.5.2
61
62%description -n python3-pyOpenSSL
63High-level wrapper around a subset of the OpenSSL library, includes:
64 - SSL.Connection objects, wrapping the methods of Python's portable
65 sockets
66 - Callbacks written in Python
67 - Extensive error-handling mechanism, mirroring OpenSSL's error codes
68...and much more.
69
70This package contains Python 3 modules.
71
72%description -n python3-pyOpenSSL -l pl.UTF-8
73Wysokopoziomowe obudowanie podzbioru biblioteki OpenSSL, zawierające:
74 - obiekty SSL.Connection, obudowujący metody przenośnych gniazd
75 Pythona
76 - wywołania zwrotne napisane w Pythonie
77 - obszerny mechanizm obsługi błędów odzwierciedlający kody błędów
78 OpenSSL-a
79...i wiele więcej.
80
81Ten pakiet zawiera moduły Pythona 3.
82
83%package examples
84Summary: Examples for pyOpenSSL module
85Summary(pl.UTF-8): Przykłady do modułu pyOpenSSL
86Group: Libraries/Python
87Requires: %{name} = %{version}-%{release}
88
89%description examples
90This package contains example files for pyOpenSSL Python module.
91
92%description examples -l pl.UTF-8
93Pakiet zawierający przykładowe skrypty dla modułu Pythona pyOpenSSL.
94
95%prep
96%setup -q -n %{module}-%{version}
97
98%build
99%if %{with python2}
100%py_build \
101 --build-base build-2
102%endif
103%if %{with python3}
104%py3_build \
105 --build-base build-3
106%endif
107
108%if %{with doc}
109%{__make} -C doc html
110%endif
111
112%install
113rm -rf $RPM_BUILD_ROOT
114install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
115
116%if %{with python2}
117%{__python} setup.py \
118 build \
119 --build-base build-2 \
120 install \
121 --optimize=2 \
122 --root=$RPM_BUILD_ROOT
123
124%py_postclean
125%endif
126
127%if %{with python3}
128%{__python3} setup.py \
129 build \
130 --build-base build-3 \
131 install \
132 --optimize=2 \
133 --root=$RPM_BUILD_ROOT
134%endif
135
136cp -a examples/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
137
138%clean
139rm -rf $RPM_BUILD_ROOT
140
141%if %{with python2}
142%files
143%defattr(644,root,root,755)
144%doc ChangeLog README TODO %{?with_doc:doc/_build/html/{*.html,_static,api}}
145%dir %{py_sitescriptdir}/OpenSSL
146%{py_sitescriptdir}/OpenSSL/*.py[co]
147%dir %{py_sitescriptdir}/OpenSSL/test
148%{py_sitescriptdir}/OpenSSL/test/*.py[co]
149%{py_sitescriptdir}/pyOpenSSL-%{version}-py*.egg-info
150%endif
151
152%if %{with python3}
153%files -n python3-pyOpenSSL
154%defattr(644,root,root,755)
155%doc ChangeLog README TODO %{?with_doc:doc/_build/html/{*.html,_static,api}}
156%dir %{py3_sitescriptdir}/OpenSSL
157%{py3_sitescriptdir}/OpenSSL/*.py
158%{py3_sitescriptdir}/OpenSSL/__pycache__
159%dir %{py3_sitescriptdir}/OpenSSL/test
160%{py3_sitescriptdir}/OpenSSL/test/*.py
161%{py3_sitescriptdir}/OpenSSL/test/__pycache__
162%{py3_sitescriptdir}/pyOpenSSL-%{version}-py*.egg-info
163%endif
164
165%files examples
166%defattr(644,root,root,755)
167%{_examplesdir}/%{name}-%{version}
This page took 0.147237 seconds and 4 git commands to generate.