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-10-18 12:44:55
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-dmidecode (Old)
and /work/SRC/openSUSE:Factory/.python-dmidecode.new.2275 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-dmidecode"
Tue Oct 18 12:44:55 2022 rev:5 rq:1029603 version:3.12.2+git.1625035095.f0a089a
Changes:
--------
--- /work/SRC/openSUSE:Factory/python-dmidecode/python-dmidecode.changes
2022-05-21 19:06:18.115309070 +0200
+++
/work/SRC/openSUSE:Factory/.python-dmidecode.new.2275/python-dmidecode.changes
2022-10-18 12:45:19.237767550 +0200
@@ -1,0 +2,6 @@
+Mon Oct 17 18:05:41 UTC 2022 - Matej Cepl <[email protected]>
+
+- Add Makefile_libdir.patch to make package building even with
+ faulty distutils.sysconfig (bsc#1204395).
+
+-------------------------------------------------------------------
New:
----
Makefile_libdir.patch
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-dmidecode.spec ++++++
--- /var/tmp/diff_new_pack.QBflwR/_old 2022-10-18 12:45:19.757768733 +0200
+++ /var/tmp/diff_new_pack.QBflwR/_new 2022-10-18 12:45:19.761768743 +0200
@@ -38,8 +38,11 @@
# PATCH-FIX-UPSTREAM 31-version_info-v-version.patch
gh#nima/python-dmidecode#31 [email protected]
# use sys.version_info instead of sys.version
Patch3: 31-version_info-v-version.patch
-Obsoletes: %{oldpython}-dmidecode <= 3.12.2+git.1625035095.f0a089a
-Obsoletes: python-python-dmidecode <= 3.12.2+git.1625035095.f0a089a
+# PATCH-FIX-UPSTREAM Makefile_libdir.patch bsc#[0-9]+ [email protected]
+# Something's wrong with finding libdirs
+Patch4: Makefile_libdir.patch
+Obsoletes: %{oldpython}-dmidecode <= %{version}
+Obsoletes: python-python-dmidecode <= %{version}
BuildRequires: %{python_module devel}
%if 0%{?sle_version} >= 150400 || 0%{?suse_version} >= 1550
BuildRequires: %{python_module libxml2}
@@ -107,7 +110,7 @@
%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-%%{version}*-info
%{python_sitearch}/python_dmidecode-3.12.2*-info
%{python_sitearch}/dmidecode*
%pycache_only %{python_sitearch}/__pycache__/dmidecode*.py[co]
++++++ Makefile_libdir.patch ++++++
---
Makefile | 3 ++-
src/setup_common.py | 9 ++-------
2 files changed, 4 insertions(+), 8 deletions(-)
--- a/Makefile
+++ b/Makefile
@@ -42,9 +42,10 @@ PY_BIN := python3
VERSION := $(shell cd src;$(PY_BIN) -c "from setup_common import *;
print(get_version());")
PACKAGE := python-dmidecode
PY_VER := $(shell $(PY_BIN) -c 'import sys;
print("%d.%d"%sys.version_info[0:2])')
+PY_VER_DL := $(shell echo $(PY_VER) | tr -d '.')
PY_MV := $(shell echo $(PY_VER) | cut -b 1)
PY := python$(PY_VER)
-SO_PATH := build/lib.linux-$(shell uname -m)-$(PY_VER)
+SO_PATH := build/lib.linux-$(shell uname -m)-cpython-$(PY_VER_DL)
ifeq ($(PY_MV),2)
SO := $(SO_PATH)/dmidecodemod.so
else
--- a/src/setup_common.py
+++ b/src/setup_common.py
@@ -30,12 +30,7 @@ import subprocess, sys
if sys.version_info[0] < 3:
import commands as subprocess
from os import path as os_path
-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')
+from sysconfig import get_config_var, get_path
# libxml2 - C flags
def libxml2_include(incdir):
@@ -55,7 +50,7 @@ def libxml2_include(incdir):
# libxml2 - library flags
def libxml2_lib(libdir, libs):
- libdir.append(__python_lib)
+ libdir.append(get_path('platlib'))
if os_path.exists("/etc/debian_version"): #. XXX: Debian Workaround...
libdir.append("/usr/lib/pymodules/python%d.%d"%sys.version_info[0:2])