Browse Source

pyOpenSSL enable python3

Signed-off-by: basebuilder_pel7x64builder0 <basebuilder@powerel.org>
master
basebuilder_pel7x64builder0 4 years ago
parent
commit
72e057f7e1
  1. 10
      SPECS/pyOpenSSL.spec

10
SPECS/pyOpenSSL.spec

@ -1,6 +1,4 @@ @@ -1,6 +1,4 @@
%if 0%{?fedora} > 12
%global with_python3 1
%endif

Summary: Python wrapper module around the OpenSSL library
Name: pyOpenSSL
@ -82,21 +80,17 @@ Documentation for pyOpenSSL @@ -82,21 +80,17 @@ Documentation for pyOpenSSL
%{__chmod} -x OpenSSL/ssl/connection.c

%build
%if 0%{?with_python3}
rm -rf %{py3dir}
cp -a . %{py3dir}
find %{py3dir} -name '*.py' | xargs sed -i '1s|^#!python|#!%{__python3}|'
%endif

find -name '*.py' | xargs sed -i '1s|^#!python|#!%{__python}|'

CFLAGS="%{optflags} -fno-strict-aliasing" %{__python} setup.py build

%if 0%{?with_python3}
pushd %{py3dir}
CFLAGS="%{optflags} -fno-strict-aliasing" %{__python3} setup.py build
popd
%endif

#%{__make} -C doc ps
#%{__make} -C doc text html
@ -104,21 +98,17 @@ popd @@ -104,21 +98,17 @@ popd
%install
%{__python} setup.py install --skip-build --root %{buildroot}

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

%files
%{python_sitearch}/OpenSSL/
%{python_sitearch}/pyOpenSSL-*.egg-info

%if 0%{?with_python3}
%files -n python3-pyOpenSSL
%{python3_sitearch}/OpenSSL/
%{python3_sitearch}/pyOpenSSL-*.egg-info
%endif

%files doc
%doc README doc/pyOpenSSL.*

Loading…
Cancel
Save