]> git.pld-linux.org Git - packages/python-pyOpenSSL.git/blame - python-pyOpenSSL.spec
automatic change: use py_build/py_install macros
[packages/python-pyOpenSSL.git] / python-pyOpenSSL.spec
CommitLineData
24e3a41e
JB
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#
d6a1b263 7%define module pyOpenSSL
24e3a41e
JB
8Summary: Python 2 interface to the OpenSSL library
9Summary(pl.UTF-8): Interfejs Pythona 2 do biblioteki OpenSSL
d6a1b263 10Name: python-%{module}
24e3a41e 11Version: 0.14
571565ec 12Release: 4
24e3a41e 13License: Apache v2.0
d6a1b263 14Group: Libraries/Python
24e3a41e
JB
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
24e3a41e
JB
20%endif
21%if %{with python3}
22BuildRequires: python3-modules >= 3.2
23%endif
31dc7a1d 24BuildRequires: rpm-pythonprov
5310dd74 25BuildRequires: rpmbuild(macros) >= 1.612
24e3a41e
JB
26%{?with_doc:BuildRequires: sphinx-pdg}
27Requires: python-cryptography >= 0.2.1
28Requires: python-six >= 1.5.2
e5d1f0aa 29Obsoletes: python-OpenSSL
691ea7ee
AM
30Obsoletes: python-pyOpenSSL-doc
31Obsoletes: python-pyOpenSSL-doc-html
d6a1b263
MG
32BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
33
34%description
24e3a41e
JB
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.
d6a1b263 43
f91aab6a 44%description -l pl.UTF-8
24e3a41e
JB
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.
d6a1b263 82
d6a1b263
MG
83%package examples
84Summary: Examples for pyOpenSSL module
def8d3c9 85Summary(pl.UTF-8): Przykłady do modułu pyOpenSSL
d6a1b263
MG
86Group: Libraries/Python
87Requires: %{name} = %{version}-%{release}
88
89%description examples
90This package contains example files for pyOpenSSL Python module.
91
f91aab6a
JR
92%description examples -l pl.UTF-8
93Pakiet zawierający przykładowe skrypty dla modułu Pythona pyOpenSSL.
d6a1b263
MG
94
95%prep
96%setup -q -n %{module}-%{version}
d6a1b263 97
2326286f 98%build
24e3a41e 99%if %{with python2}
ab07431a 100%py_build \
24e3a41e
JB
101 --build-base build-2
102%endif
103%if %{with python3}
ab07431a 104%py3_build \
24e3a41e
JB
105 --build-base build-3
106%endif
107
108%if %{with doc}
109%{__make} -C doc html
110%endif
2326286f 111
d6a1b263
MG
112%install
113rm -rf $RPM_BUILD_ROOT
24e3a41e 114install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
d6a1b263 115
24e3a41e
JB
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
d6a1b263 123
24e3a41e
JB
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
d6a1b263 135
2326286f 136cp -a examples/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
d6a1b263 137
d6a1b263
MG
138%clean
139rm -rf $RPM_BUILD_ROOT
140
24e3a41e 141%if %{with python2}
d6a1b263
MG
142%files
143%defattr(644,root,root,755)
24e3a41e
JB
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
d6a1b263
MG
164
165%files examples
166%defattr(644,root,root,755)
167%{_examplesdir}/%{name}-%{version}
This page took 0.142945 seconds and 4 git commands to generate.