Sync from SUSE:SLFO:Main zypp-plugin revision 1b062143e5e4f40a9206b63db86ba6ad

This commit is contained in:
Adrian Schröter 2024-05-04 02:40:32 +02:00
commit a6f6007eb8
4 changed files with 251 additions and 0 deletions

23
.gitattributes vendored Normal file
View File

@ -0,0 +1,23 @@
## Default LFS
*.7z filter=lfs diff=lfs merge=lfs -text
*.bsp filter=lfs diff=lfs merge=lfs -text
*.bz2 filter=lfs diff=lfs merge=lfs -text
*.gem filter=lfs diff=lfs merge=lfs -text
*.gz filter=lfs diff=lfs merge=lfs -text
*.jar filter=lfs diff=lfs merge=lfs -text
*.lz filter=lfs diff=lfs merge=lfs -text
*.lzma filter=lfs diff=lfs merge=lfs -text
*.obscpio filter=lfs diff=lfs merge=lfs -text
*.oxt filter=lfs diff=lfs merge=lfs -text
*.pdf filter=lfs diff=lfs merge=lfs -text
*.png filter=lfs diff=lfs merge=lfs -text
*.rpm filter=lfs diff=lfs merge=lfs -text
*.tbz filter=lfs diff=lfs merge=lfs -text
*.tbz2 filter=lfs diff=lfs merge=lfs -text
*.tgz filter=lfs diff=lfs merge=lfs -text
*.ttf filter=lfs diff=lfs merge=lfs -text
*.txz filter=lfs diff=lfs merge=lfs -text
*.whl filter=lfs diff=lfs merge=lfs -text
*.xz filter=lfs diff=lfs merge=lfs -text
*.zip filter=lfs diff=lfs merge=lfs -text
*.zst filter=lfs diff=lfs merge=lfs -text

BIN
zypp-plugin-0.6.3.tar.bz2 (Stored with Git LFS) Normal file

Binary file not shown.

93
zypp-plugin.changes Normal file
View File

@ -0,0 +1,93 @@
-------------------------------------------------------------------
Fri Oct 23 21:31:23 UTC 2020 - Benjamin Greiner <code@bnavigator.de>
- 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
- Provide python3-zypp-plugin down to SLE12 (bsc#1081596)
-------------------------------------------------------------------
Mon Feb 19 15:53:29 CET 2018 - ma@suse.com
- Provide python3-zypp-plugin in SLE12-SP3 (bsc#1081596)
-------------------------------------------------------------------
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
- Fix a bit the obsoletes/provides to allow migration, previously
was overwritten by macros
- BR python-rpm-macros to build on older distributions
- Fix bit python detection conditions on install phase to be better
readable and uniform
-------------------------------------------------------------------
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
- Don't use a shebang in the module
- version 0.6.2
-------------------------------------------------------------------
Thu Oct 26 17:14:59 CEST 2017 - ma@suse.de
- Let zypp-plugin-python provide python2-zypp-plugin to be
consistent with python3-zypp-plugin.
- version 0.6.1
-------------------------------------------------------------------
Thu Oct 26 12:43:19 CEST 2017 - ma@suse.de
- Fix specfile to be able to build for python3
- version 0.6
-------------------------------------------------------------------
Tue Mar 10 17:18:59 CET 2015 - lchiquitto@suse.de
- Add COPYING file
-------------------------------------------------------------------
Mon Aug 18 13:31:39 CEST 2014 - ma@suse.de
- Force usage of the official python VM; no longer use
"/usr/bin/env python" (bnc#889363)
- version 0.5
-------------------------------------------------------------------
Sat Jan 25 17:21:49 CET 2014 - ma@suse.de
- Add .pyc/.pyo to package
- version 0.4
-------------------------------------------------------------------
Wed May 9 10:01:48 UTC 2012 - coolo@suse.com
- patch license to be in spdx.org format
-------------------------------------------------------------------
Tue Jul 5 12:19:37 CEST 2011 - ma@suse.de
- Fix specfile for factory
-------------------------------------------------------------------
Mon Jul 4 15:16:39 CEST 2011 - ma@suse.de
- Provide zypp-plugin-python as stand alone package so
that it can be used in other zypp plugins like snapper.
(formerly a subpackage of zypp-plugin-spacewalk)
- version 0.3

132
zypp-plugin.spec Normal file
View File

@ -0,0 +1,132 @@
#
# spec file for package zypp-plugin
#
# 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
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
%define singlespec_py3 ( 0%{?suse_version} > 1330 )
Name: zypp-plugin
Version: 0.6.3
Release: 0
Summary: Helper that makes writing ZYpp plugins easier
License: GPL-2.0-only
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: fdupes
BuildRequires: python-rpm-macros
Requires: python-base
# provide old names for py2 package
%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
%if ( 0%{?suse_version} == 1315 )
%define have_python3 1
%else
%define have_python3 0
%endif
%endif
### ----------------------------------------
%description
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
%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
%py_compile -O %{buildroot}/%{python_sitelib}
%endif
%if 0%{?have_python3}
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}/zypp_plugin*
%pycache_only %{python_sitelib}/__pycache__/*
### ----------------------------------------
### 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.
%if 0%{?have_python3}
%package -n python3-%{name}
Summary: Helper that makes writing ZYpp plugins in python easier
Group: System/Packages
Requires: python3
BuildRequires: python3-devel
%files -n python3-%{name}
%defattr(-,root,root)
%doc COPYING
%{python3_sitelib}/*
%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
%endif
### ----------------------------------------
%changelog