diff --git a/SPECS/python-paramiko.spec b/SPECS/python-paramiko.spec index 0ec78a2a..49191634 100644 --- a/SPECS/python-paramiko.spec +++ b/SPECS/python-paramiko.spec @@ -29,7 +29,7 @@ Requires: python2-pyasn1 BuildRequires: python2-devel BuildRequires: python-setuptools BuildRequires: python-cryptography -BuildRequires: python2-pyasn1 +BuildRequires: python-pyasn1 %global paramiko_desc \ Paramiko (a combination of the esperanto words for "paranoid" and "friend") is\ a module for python 2.3 or greater that implements the SSH2 protocol for secure\ @@ -47,7 +47,6 @@ encrypted tunnel. (This is how sftp works, for example.)\ Recommends: python-gssapi %endif -%if %{with python3} %package -n python%{python3_pkgversion}-%{srcname} Summary: SSH2 protocol library for python %{?python_provide:%python_provide python%{python3_pkgversion}-%{srcname}} @@ -63,7 +62,6 @@ Recommends: python%{python3_pkgversion}-gssapi %{paramiko_desc} Python 3 version. -%endif %package doc Summary: Docs and demo for SSH2 protocol library for python @@ -84,24 +82,18 @@ sed -i -e '/^#!/,1d' demos/* %build CFLAGS="%{optflags}" %{__python} setup.py %{?py_setup_args} build --executable="%{__python2} -s" -%if %{with python3} -%py3_build -%endif +CFLAGS="%{optflags}" %{__python3} setup.py %{?py_setup_args} build --executable="%{__python3} -s" %install -CFLAGS="%{optflags}" %{__python} setup.py %{?py_setup_args} install -O1 --skip-build --root %{buildroot} -%if %{with python3} -%py3_install -%endif +CFLAGS="%{optflags}" %{__python} setup.py %{?py_setup_args} install -O2 --skip-build --root %{buildroot} +CFLAGS="%{optflags}" %{__python3} setup.py %{?py_setup_args} install -O2 --skip-build --root %{buildroot} sphinx-build -b html sites/docs/ html/ rm -f html/.buildinfo %check %{__python2} ./test.py --no-sftp --no-big-file -%if %{with python3} %{__python3} ./test.py --no-sftp --no-big-file -%endif %files -n python-%{srcname} %license LICENSE @@ -109,13 +101,11 @@ rm -f html/.buildinfo %{python2_sitelib}/%{srcname}-*.egg-info/ %{python2_sitelib}/%{srcname}/ -%if %{with python3} %files -n python%{python3_pkgversion}-%{srcname} %license LICENSE %doc NEWS README.rst %{python3_sitelib}/%{srcname}-*.egg-info/ %{python3_sitelib}/%{srcname}/ -%endif %files doc %doc html/ demos/