diff --git a/zypp-plugin-0.6.3.tar.bz2 b/zypp-plugin-0.6.3.tar.bz2 index da60a7e..8cf56f0 100644 --- a/zypp-plugin-0.6.3.tar.bz2 +++ b/zypp-plugin-0.6.3.tar.bz2 @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:3fcb552f0de583797e2a2e70e7a585c589e9f98155a6e6fb1facfbe90433496e -size 4360 +oid sha256:3c3b094137fc9e06fb5b40548fc356ebfe668be488076322cace16a59e74c3a6 +size 4598 diff --git a/zypp-plugin.changes b/zypp-plugin.changes index 9819477..3131444 100644 --- a/zypp-plugin.changes +++ b/zypp-plugin.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Fri Jan 19 15:15:38 CET 2018 - ma@suse.de + +- Disable singlespec packaging in SLE12* and older distros while it's + not working there. They provide python2 packages only. + ------------------------------------------------------------------- Wed Jan 3 15:53:28 UTC 2018 - tchvatal@suse.com diff --git a/zypp-plugin.spec b/zypp-plugin.spec index 63a0325..23d3d3c 100644 --- a/zypp-plugin.spec +++ b/zypp-plugin.spec @@ -16,8 +16,8 @@ # -%{?!python_module:%define python_module() python-%{**} python3-%{**}} -%define oldpython python +%define singlespec_py3 ( 0%{?suse_version} > 1330 ) + Name: zypp-plugin Version: 0.6.3 Release: 0 @@ -26,18 +26,26 @@ License: GPL-2.0 Group: System/Packages Url: https://github.com/openSUSE/zypp-plugin Source0: %{name}-%{version}.tar.bz2 +BuildArch: noarch + +%if %{singlespec_py3} +%{?!python_module:%define python_module() python-%{**} python3-%{**}} BuildRequires: %{python_module devel} BuildRequires: python-rpm-macros Requires: python-base -BuildArch: noarch # provide old names for py2 package -%ifpython2 -Obsoletes: %{oldpython}-zypp-plugin < %{version} -Provides: %{oldpython}-zypp-plugin = %{version} -Obsoletes: zypp-plugin-python < %{version} -Provides: zypp-plugin-python = %{version} +%if "%{python_flavor}" == "python2" +Obsoletes: zypp-plugin-python < %{version}-%{release} +Provides: zypp-plugin-python = %{version}-%{release} %endif %python_subpackages +### ---------------------------------------- +### SLE-12* and even older +%else +%define have_python2 1 +%define have_python3 0 +%endif +### ---------------------------------------- %description This API allows writing ZYpp plugins by just subclassing from a python class @@ -61,8 +69,31 @@ install python/zypp_plugin.py %{buildroot}%{python3_sitelib}/zypp_plugin.py %py3_compile -O %{buildroot}/%{python3_sitelib} %endif +%if %{singlespec_py3} %files %{python_files} %doc COPYING %{python_sitelib}/* +### ---------------------------------------- +### SLE-12* and even older +%else +%package -n %{name}-python +Summary: Helper that makes writing ZYpp plugins in python easier +Group: System/Packages +Provides: python2-%{name} = %{version}-%{release} +BuildRequires: python-devel +Requires: python + +%files -n %{name}-python +%defattr(-,root,root) +%doc COPYING +%{python_sitelib}/* + +%description -n %{name}-python +This API allows writing ZYpp plugins by just subclassing from a python class +and implementing the commands you want to respond to as python methods. + +%endif +### ---------------------------------------- + %changelog