From 84b67470942bd8016d0a0a1d8d4879ddd5b740a6 Mon Sep 17 00:00:00 2001 From: Chris Lalancette Date: Sep 12 2017 12:34:18 +0000 Subject: Enable the Python3 subpackage. Signed-off-by: Chris Lalancette --- diff --git a/libssh2-python.spec b/libssh2-python.spec index 73e8cd9..8546265 100644 --- a/libssh2-python.spec +++ b/libssh2-python.spec @@ -1,22 +1,20 @@ -%{!?python_sitearch: %define python_sitearch %(python -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")} - -Summary: Python binding for the libssh2 library -Name: libssh2-python -Version: 0.7.1 -Release: 17%{?dist} -License: LGPLv2+ -Group: Development/Libraries -URL: https://github.com/wallunit/ssh4py +Summary: Python binding for the libssh2 library +Name: libssh2-python +Version: 0.7.1 +Release: 18%{?dist} +License: LGPLv2+ +URL: https://github.com/wallunit/ssh4py # The source for the package was pulled from upstream's vcs. Use the # following commands to generate the tarball: # git clone git://github.com/wallunit/ssh4py.git # cd ssh4py ; python setup.py sdist -Source0: https://github.com/wallunit/ssh4py/zipball/0.7.1/%{name}-%{version}.tar.gz +Source0: https://github.com/wallunit/ssh4py/zipball/0.7.1/%{name}-%{version}.tar.gz -BuildRequires: python-devel -BuildRequires: libssh2-devel -BuildRequires: openssl-devel -BuildRequires: zlib-devel +BuildRequires: python2-devel +BuildRequires: python3-devel +BuildRequires: libssh2-devel +BuildRequires: openssl-devel +BuildRequires: zlib-devel %global _description\ libssh2-python is a python binding for the libssh2 library\ @@ -25,34 +23,57 @@ libssh2-python is a python binding for the libssh2 library\ %description %_description %package -n python2-libssh2 -Summary: %summary +Summary: %summary %{?python_provide:%python_provide python2-libssh2} # Remove before F30 -Provides: libssh2-python = %{version}-%{release} -Provides: libssh2-python%{?_isa} = %{version}-%{release} -Obsoletes: libssh2-python < %{version}-%{release} +Provides: libssh2-python = %{version}-%{release} +Provides: libssh2-python%{?_isa} = %{version}-%{release} +Obsoletes: libssh2-python < %{version}-%{release} %description -n python2-libssh2 %_description + +%package -n python3-libssh2 +Summary: %summary +%{?python_provide:%python_provide python3-libssh2} +# Remove before F30 +Provides: libssh2-python = %{version}-%{release} +Provides: libssh2-python%{?_isa} = %{version}-%{release} +Obsoletes: libssh2-python < %{version}-%{release} + +%description -n python3-libssh2 %_description + + %prep %setup -q %build -python setup.py build +%py2_build +%py3_build %install -rm -rf $RPM_BUILD_ROOT -python setup.py install -O1 --root=$RPM_BUILD_ROOT +%py2_install +%py3_install +mv %{buildroot}%{python3_sitearch}/libssh2.*.so %{buildroot}%{python3_sitearch}/libssh2.so %files -n python2-libssh2 %doc README.txt COPYING -%{python_sitearch}/libssh2.so -%{python_sitearch}/libssh2*-*.egg-info +%{python2_sitearch}/libssh2.so +%{python2_sitearch}/libssh2*-*.egg-info + +%files -n python3-libssh2 +%doc README.txt COPYING +%{python3_sitearch}/libssh2.so +%{python3_sitearch}/libssh2*-*.egg-info + %changelog +*Thu Aug 24 2017 Jan Beran - 0.7.1-18 +- Python 3 subpackage + * Sun Aug 20 2017 Zbigniew Jędrzejewski-Szmek - 0.7.1-17 - Add Provides for the old name without %%_isa