diff --git a/zypp-plugin-0.6.3.tar.bz2 b/zypp-plugin-0.6.3.tar.bz2 index 65b4e2d..0145718 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:10eafc38a9fd5a9688e56ad38193b591d6301232d22dff78c106a42092b402e7 -size 4727 +oid sha256:3836f2676494de3a61a99a9592b29a02ae34339b29058774ade9a5f90586874d +size 4951 diff --git a/zypp-plugin.changes b/zypp-plugin.changes index b1fbe4a..af7479a 100644 --- a/zypp-plugin.changes +++ b/zypp-plugin.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Fri Oct 23 21:31:23 UTC 2020 - Benjamin Greiner + +- singlespec in Tumbleweed must support multiple python3 flavors + in the future gh#openSUSE/python-rpm-macros#66 + ------------------------------------------------------------------- Tue Mar 13 14:51:18 CET 2018 - ma@suse.com diff --git a/zypp-plugin.spec b/zypp-plugin.spec index 8fab375..ff583f0 100644 --- a/zypp-plugin.spec +++ b/zypp-plugin.spec @@ -1,7 +1,7 @@ # # spec file for package zypp-plugin # -# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2020 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -12,7 +12,7 @@ # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. -# Please submit bugfixes or comments via http://bugs.opensuse.org/ +# Please submit bugfixes or comments via https://bugs.opensuse.org/ # @@ -22,15 +22,16 @@ Name: zypp-plugin Version: 0.6.3 Release: 0 Summary: Helper that makes writing ZYpp plugins easier -License: GPL-2.0 +License: GPL-2.0-only Group: System/Packages -Url: https://github.com/openSUSE/zypp-plugin +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: fdupes BuildRequires: python-rpm-macros Requires: python-base # provide old names for py2 package @@ -62,6 +63,16 @@ and implementing the commands you want to respond to as python methods. : %install +%if %{singlespec_py3} +%{python_expand # +mkdir -p %{buildroot}%{$python_sitelib} +install -m 0644 python/zypp_plugin.py %{buildroot}%{$python_sitelib}/zypp_plugin.py +# TODO: replace by $python_compileall as soon as it is available sr#843481 +$python -m compileall %{buildroot}%{$python_sitelib} +$python -O -m compileall %{buildroot}%{$python_sitelib} +%fdupes %{buildroot}%{$python_sitelib} +} +%else %if 0%{?have_python2} mkdir -p %{buildroot}%{python_sitelib} install -m 0644 python/zypp_plugin.py %{buildroot}%{python_sitelib}/zypp_plugin.py @@ -72,11 +83,13 @@ mkdir -p %{buildroot}%{python3_sitelib} install -m 0644 python/zypp_plugin.py %{buildroot}%{python3_sitelib}/zypp_plugin.py %py3_compile -O %{buildroot}/%{python3_sitelib} %endif +%endif %if %{singlespec_py3} %files %{python_files} %doc COPYING -%{python_sitelib}/* +%{python_sitelib}/zypp_plugin* +%pycache_only %{python_sitelib}/__pycache__/* ### ---------------------------------------- ### SLE-12* and even older