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 @@
%if 0%{?fedora} > 12
%global with_python3 1 %global with_python3 1
%endif


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


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


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


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


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


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


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


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


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


%files doc %files doc
%doc README doc/pyOpenSSL.* %doc README doc/pyOpenSSL.*

Loading…
Cancel
Save