Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package python-dmidecode for 
openSUSE:Factory checked in at 2022-05-21 19:06:07
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-dmidecode (Old)
 and      /work/SRC/openSUSE:Factory/.python-dmidecode.new.1538 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-dmidecode"

Sat May 21 19:06:07 2022 rev:4 rq:978319 version:3.12.2+git.1625035095.f0a089a

Changes:
--------
--- /work/SRC/openSUSE:Factory/python-dmidecode/python-dmidecode.changes        
2022-03-07 17:46:03.451135153 +0100
+++ 
/work/SRC/openSUSE:Factory/.python-dmidecode.new.1538/python-dmidecode.changes  
    2022-05-21 19:06:18.115309070 +0200
@@ -1,0 +2,5 @@
+Fri May 20 15:07:23 UTC 2022 - Matej Cepl <mc...@suse.com>
+
+- Synchronize SPEC file to be more like the SLE one.
+
+-------------------------------------------------------------------

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ python-dmidecode.spec ++++++
--- /var/tmp/diff_new_pack.RdL9XI/_old  2022-05-21 19:06:19.111310513 +0200
+++ /var/tmp/diff_new_pack.RdL9XI/_new  2022-05-21 19:06:19.119310524 +0200
@@ -22,13 +22,18 @@
 Version:        3.12.2+git.1625035095.f0a089a
 Release:        0
 Summary:        Python module to access DMI data
-Group:          System/Management
 License:        GPL-2.0-only
+Group:          System/Libraries
 URL:            https://github.com/nima/python-dmidecode
 # Source0:        
https://github.com/nima/python-dmidecode/archive/refs/tags/v%%{version}.tar.gz#/python-dmidecode-%%{version}.tar.gz
 Source0:        python-dmidecode-%{version}.tar.gz
+# use DWORD instead of WORD when calling dmi_memory_device_extended_size
 Patch0:         huge-memory.patch
+# PATCH-FIX-UPSTREAM gcc7-inline.patch gh#nima/python-dmidecode#35 
mc...@suse.com
+# Don't use inline keyword.
 Patch1:         gcc7-inline.patch
+# PATCH-FIX-UPSTREAM detect-lib-with-py3.patch gh#nima/python-dmidecode#36 
mc...@suse.com
+#  Make the code future-proof against removal of distutils module.
 Patch2:         detect-lib-with-py3.patch
 # PATCH-FIX-UPSTREAM 31-version_info-v-version.patch 
gh#nima/python-dmidecode#31 mc...@suse.com
 # use sys.version_info instead of sys.version
@@ -36,15 +41,16 @@
 Obsoletes:      %{oldpython}-dmidecode <= 3.12.2+git.1625035095.f0a089a
 Obsoletes:      python-python-dmidecode <= 3.12.2+git.1625035095.f0a089a
 BuildRequires:  %{python_module devel}
-%if 0%{?sle_version} && 0%{?sle_version} < 150400
+%if 0%{?sle_version} >= 150400 || 0%{?suse_version} >= 1550
+BuildRequires:  %{python_module libxml2}
+%else
 BuildRequires:  python2-libxml2-python
 BuildRequires:  python3-libxml2-python
-%else
-BuildRequires:  %{python_module libxml2}
 %endif
 BuildRequires:  fdupes
 BuildRequires:  libxml2-devel
 BuildRequires:  python-rpm-macros
+Requires:       python
 Requires(post): update-alternatives
 Requires(postun):update-alternatives
 %python_subpackages
@@ -57,8 +63,6 @@
 %prep
 %autosetup -p1
 
-sed -i 's/python2/python3/g' Makefile unit-tests/Makefile
-
 %build
 %{python_expand export LDFLAGS="-Wl,-rpath=%{$python_sitearch}"
 %make_build PY_BIN=$python build
@@ -67,31 +71,35 @@
 %install
 %{python_expand rm -f %{buildroot}%{_datadir}/python-dmidecode/pymap.xml
 $python src/setup.py install --root %{buildroot} --prefix=%{_prefix}
-ls -l %{buildroot}%{_datadir}/python-dmidecode/
+
+# prepare alternatives
+install -d %{buildroot}%{_sysconfdir}/alternatives
 mv %{buildroot}%{_datadir}/python-dmidecode/pymap{,-%{$python_bin_suffix}}.xml
-touch %{buildroot}%{_datadir}/python-dmidecode/pymap.xml
+touch %{buildroot}%{_sysconfdir}/alternatives/pymap.xml
+ln -s %{_sysconfdir}/alternatives/pymap.xml \
+      %{buildroot}%{_datadir}/python-dmidecode/pymap.xml
 %fdupes %{buildroot}%{$python_sitearch}
 }
 
 %check
 pushd unit-tests
-%python_expand PYTHON=$python %make_build
+%{python_expand export PYTHONPATH=%{buildroot}%{$python_sitearch}
+make PY_BIN=$python
+}
 popd
 
 %post
 PRIO=$(echo %{python_version}|tr -d '.')
-/usr/sbin/update-alternatives --install %{_datadir}/python-dmidecode/pymap.xml 
pymap.xml \
+%{_sbindir}/update-alternatives --install 
%{_datadir}/python-dmidecode/pymap.xml pymap.xml \
     %{_datadir}/python-dmidecode/pymap-%{python_bin_suffix}.xml ${PRIO}
 
 %postun
 if [ ! -f %{_datadir}/python-dmidecode/pymap-%{python_bin_suffix}.xml ] ; then
    MAJVER=$(ver=%{python_version}; echo ${ver:0:1})
-   /usr/sbin/update-alternatives --remove pymap.xml \
+   %{_sbindir}/update-alternatives --remove pymap.xml \
         %{_datadir}/python-dmidecode/pymap-%{python_bin_suffix}.xml
 fi
 
-%clean
-
 %files %{python_files}
 %license doc/LICENSE
 %doc README doc/README.upstream doc/AUTHORS doc/AUTHORS.upstream
@@ -99,8 +107,9 @@
 %ghost %{_sysconfdir}/alternatives/pymap.xml
 %ghost %{_datadir}/python-dmidecode/pymap.xml
 %{_datadir}/python-dmidecode/pymap-%{python_bin_suffix}.xml
+# %{python_sitearch}/python_dmidecode-%{version}*-info
+%{python_sitearch}/python_dmidecode-3.12.2*-info
 %{python_sitearch}/dmidecode*
-%{python_sitearch}/*.egg-info
-%pycache_only %{python_sitearch}/__pycache__/*
+%pycache_only %{python_sitearch}/__pycache__/dmidecode*.py[co]
 
 %changelog

++++++ detect-lib-with-py3.patch ++++++
--- /var/tmp/diff_new_pack.RdL9XI/_old  2022-05-21 19:06:19.171310600 +0200
+++ /var/tmp/diff_new_pack.RdL9XI/_new  2022-05-21 19:06:19.175310606 +0200
@@ -1,19 +1,33 @@
 ---
- src/setup_common.py |    7 +++++--
- 1 file changed, 5 insertions(+), 2 deletions(-)
+ src/setup_common.py |   14 +++++++++++---
+ 1 file changed, 11 insertions(+), 3 deletions(-)
 
 --- a/src/setup_common.py
 +++ b/src/setup_common.py
-@@ -30,7 +30,7 @@ import subprocess, sys
+@@ -30,7 +30,12 @@ import subprocess, sys
  if sys.version_info[0] < 3:
      import commands as subprocess
  from os import path as os_path
 -from distutils.sysconfig import get_python_lib
-+from distutils.sysconfig import get_python_lib, get_config_var
++try:
++    from distutils.sysconfig import get_python_lib, get_config_var
++    __python_lib = get_python_lib(1)
++except ImportError:
++    from sysconfig import get_config_var, get_path
++    __python_lib = get_path('platlib')
  
  # libxml2 - C flags
  def libxml2_include(incdir):
-@@ -69,7 +69,10 @@ def libxml2_lib(libdir, libs):
+@@ -50,7 +55,7 @@ def libxml2_include(incdir):
+ 
+ # libxml2 - library flags
+ def libxml2_lib(libdir, libs):
+-    libdir.append(get_python_lib(1))
++    libdir.append(__python_lib)
+     if os_path.exists("/etc/debian_version"): #. XXX: Debian Workaround...
+         libdir.append("/usr/lib/pymodules/python%d.%d"%sys.version_info[0:2])
+ 
+@@ -69,7 +74,10 @@ def libxml2_lib(libdir, libs):
              libs.append(l.replace("-l", "", 1))
  
      # this library is not reported and we need it anyway

Reply via email to