From: Michael Schroeder Date: Tue, 8 Nov 2016 13:58:06 +0000 (+0100) Subject: Build both python2 and python3 bindings X-Git-Tag: 0.6.24~5 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=089017bd30720ed5c4da6fd5bbd6f4bffa93c025;p=thirdparty%2Flibsolv.git Build both python2 and python3 bindings --- diff --git a/package/libsolv.spec.in b/package/libsolv.spec.in index 236ec37f..165196bc 100644 --- a/package/libsolv.spec.in +++ b/package/libsolv.spec.in @@ -26,7 +26,7 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-build %bcond_without disable_shared %bcond_without perl_binding %bcond_without python_binding -%bcond_with python3_binding +%bcond_without python3_binding %bcond_without ruby_binding %bcond_with zypp @@ -71,12 +71,12 @@ BuildRequires: ruby-devel BuildRequires: swig %endif %if %{with python_binding} -%global python_sitearch %(python -c "from distutils.sysconfig import get_python_lib; print get_python_lib(True);") +%global python_sitearch %(python -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(True))") BuildRequires: python-devel BuildRequires: swig %endif %if %{with python3_binding} -%global python3_sitearch %(python3 -c "from distutils.sysconfig import get_python_lib; print get_python_lib(True);") +%global python3_sitearch %(python3 -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(True))") BuildRequires: python3-devel %endif @@ -295,7 +295,10 @@ rm -rf "$RPM_BUILD_ROOT" %if %{with python3_binding} %files -n python3-solv %defattr(-,root,root) -%{python3_sitearch}/* +%{python3_sitearch}/*solv* +%if 0%{?suse_version} +%{python3_sitearch}/*/*solv* +%endif %endif %changelog