diff --git a/zypp-plugin-0.6.2.tar.bz2 b/zypp-plugin-0.6.2.tar.bz2 deleted file mode 100644 index da4a5d4..0000000 --- a/zypp-plugin-0.6.2.tar.bz2 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:5fe00381e56eba267fe65f9c88fec8954d5ae328a04cdc30c0fa56e1b39d39b3 -size 4233 diff --git a/zypp-plugin-0.6.3.tar.bz2 b/zypp-plugin-0.6.3.tar.bz2 new file mode 100644 index 0000000..fac39b0 --- /dev/null +++ b/zypp-plugin-0.6.3.tar.bz2 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:13c25cd5a251a6a9b730b00309315c171b0bde6f1b0963dba5e98d3749c7616a +size 4240 diff --git a/zypp-plugin.changes b/zypp-plugin.changes index 087f51e..493accd 100644 --- a/zypp-plugin.changes +++ b/zypp-plugin.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Mon Dec 11 14:15:36 UTC 2017 - tchvatal@suse.com + +- Switch to singlespec packaging to make it easy to disable either + python3 or python2 plugin and make sure all is buildable +- version 0.6.3 + ------------------------------------------------------------------- Thu Nov 9 17:46:45 CET 2017 - ma@suse.de diff --git a/zypp-plugin.spec b/zypp-plugin.spec index 31353a4..ea52831 100644 --- a/zypp-plugin.spec +++ b/zypp-plugin.spec @@ -16,74 +16,52 @@ # -%if 0%{?suse_version} >= 1320 -%global build_py3 1 -%endif - +%{?!python_module:%define python_module() python-%{**} python3-%{**}} +%define oldpython python Name: zypp-plugin -Version: 0.6.2 +Version: 0.6.3 Release: 0 -Url: https://gitorious.org/opensuse/zypp-plugin Summary: Helper that makes writing ZYpp plugins easier License: GPL-2.0 Group: System/Packages -BuildRoot: %{_tmppath}/%{name}-%{version}-build +Url: https://github.com/openSUSE/zypp-plugin Source0: %{name}-%{version}.tar.bz2 -%if 0%{?suse_version} >= 1210 +BuildRequires: %{python_module devel} +Requires: python-base BuildArch: noarch +# provide old names for py2 package +%ifpython2 +Obsoletes: %{oldpython}-%{name} < %{version} +Provides: %{oldpython}-%{name} = %{version} +Obsoletes: %{name}-%{oldpython} < %{version} +Provides: %{name}-%{oldpython} = %{version} %endif +%python_subpackages %description -Empty main package. Helper for different languages reside in subpackages. +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. %prep %setup -q -n zypp-plugin %build +: %install -%{__mkdir_p} %{buildroot}%{python_sitelib} -%{__install} python/zypp_plugin.py %{buildroot}%{python_sitelib}/zypp_plugin.py +%ifpython2 +mkdir -p %{buildroot}%{python_sitelib} +install python/zypp_plugin.py %{buildroot}%{python_sitelib}/zypp_plugin.py %py_compile -O %{buildroot}/%{python_sitelib} -%if 0%{?build_py3} -%{__mkdir_p} %{buildroot}%{python3_sitelib} -%{__install} python/zypp_plugin.py %{buildroot}%{python3_sitelib}/zypp_plugin.py +%endif +%if "%{python3_bin_suffix}" != "" +mkdir -p %{buildroot}%{python3_sitelib} +install python/zypp_plugin.py %{buildroot}%{python3_sitelib}/zypp_plugin.py %py3_compile -O %{buildroot}/%{python3_sitelib} %endif -%if 0%{?build_py3} -%package -n python3-%{name} -Summary: Helper that makes writing ZYpp plugins in python easier -Group: System/Packages -Requires: python3 -BuildRequires: python3-devel - -%description -n python3-%{name} -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 - -%package python -Summary: Helper that makes writing ZYpp plugins in python easier -Group: System/Packages -Provides: python2-%{name} -BuildRequires: python-devel -Requires: python - -%description 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. - -%files python -%defattr(-,root,root) +%files %{python_files} %doc COPYING %{python_sitelib}/* -%if 0%{?build_py3} -%files -n python3-%{name} -%defattr(-,root,root) -%doc COPYING -%{python3_sitelib}/* -%endif - %changelog