Fix BuildRequires packages for Python-3.12
This commit is contained in:
parent
ac778ded49
commit
3b6be7844b
@ -47,22 +47,6 @@ plain sysconfig works even on 2.7.
|
||||
src/setup_common.py | 9 ++-------
|
||||
2 files changed, 4 insertions(+), 8 deletions(-)
|
||||
|
||||
diff --git a/Makefile b/Makefile
|
||||
index 2f47a75..6a12073 100644
|
||||
--- 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
|
||||
diff --git a/src/setup_common.py b/src/setup_common.py
|
||||
index 3fb9086..97ece95 100644
|
||||
--- a/src/setup_common.py
|
||||
@ -104,18 +88,13 @@ find command.
|
||||
Makefile | 12 +++++-------
|
||||
1 file changed, 5 insertions(+), 7 deletions(-)
|
||||
|
||||
diff --git a/Makefile b/Makefile
|
||||
index 6a12073..06e83f0 100644
|
||||
--- a/Makefile
|
||||
+++ b/Makefile
|
||||
@@ -42,15 +42,13 @@ PY_BIN := python3
|
||||
VERSION := $(shell cd src;$(PY_BIN) -c "from setup_common import *; print(get_version());")
|
||||
PACKAGE := python-dmidecode
|
||||
--- a/Makefile.backup 2022-11-17 06:51:28.000000000 +0100
|
||||
+++ b/Makefile 2023-05-20 12:56:07.590575539 +0200
|
||||
@@ -44,12 +44,11 @@
|
||||
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)-cpython-$(PY_VER_DL)
|
||||
-SO_PATH := build/lib.linux-$(shell uname -m)-$(PY_VER)
|
||||
ifeq ($(PY_MV),2)
|
||||
- SO := $(SO_PATH)/dmidecodemod.so
|
||||
+ SOLIB := dmidecodemod.so
|
||||
@ -126,7 +105,7 @@ index 6a12073..06e83f0 100644
|
||||
endif
|
||||
SHELL := /bin/bash
|
||||
|
||||
@@ -60,10 +58,10 @@ SHELL := /bin/bash
|
||||
@@ -59,13 +58,13 @@
|
||||
all : build dmidump
|
||||
|
||||
build: $(PY)-dmidecodemod.so
|
||||
@ -139,4 +118,8 @@ index 6a12073..06e83f0 100644
|
||||
+ cp $$(find build -name $(SOLIB)) $@
|
||||
|
||||
dmidump : src/util.o src/efi.o src/dmilog.o
|
||||
$(CC) -o $@ src/dmidump.c $^ -g -Wall -D_DMIDUMP_MAIN_
|
||||
- $(CC) -o $@ src/dmidump.c $^ -g -Wall -D_DMIDUMP_MAIN_
|
||||
+ $(CC) -o $@ src/dmidump.c $^ ${CFLAGS} -D_DMIDUMP_MAIN_
|
||||
|
||||
install:
|
||||
$(PY) src/setup.py install
|
||||
|
@ -13,7 +13,7 @@
|
||||
Name: python-dmidecode
|
||||
Summary: Python module to access DMI data
|
||||
Version: 3.12.3
|
||||
Release: 2%{date}%{shortcommit}%{?dist}
|
||||
Release: 3%{date}%{shortcommit}%{?dist}
|
||||
License: GPLv2
|
||||
URL: https://github.com/nima/python-dmidecode
|
||||
Source0: %{url}/archive/%{version}/%{name}-%{version}.tar.gz
|
||||
@ -25,9 +25,8 @@ BuildRequires: gcc
|
||||
BuildRequires: libxml2-devel
|
||||
BuildRequires: python3-devel
|
||||
BuildRequires: libxml2-python3
|
||||
%if 0%{?python3_version_nodots} >= 312
|
||||
BuildRequires: python3-setuptools
|
||||
%endif
|
||||
BuildRequires: python-distutils-extra
|
||||
|
||||
%global _description\
|
||||
python-dmidecode is a python extension module that uses the\
|
||||
@ -47,7 +46,7 @@ Requires: libxml2-python3
|
||||
|
||||
%prep
|
||||
%autosetup -n %{name}-%{version} -N
|
||||
%patch0 -p1 -b .backup
|
||||
%patch 0 -p1 -b .backup
|
||||
|
||||
%build
|
||||
# -std=gnu89 is there to avoid `undefined symbol: dmixml_GetContent`
|
||||
@ -77,6 +76,9 @@ make -C unit-tests
|
||||
%{_datadir}/%{name}/
|
||||
|
||||
%changelog
|
||||
* Sat May 20 2023 Antonio Trande <sagitter@fedoraproject.org> - 3.12.3-3
|
||||
- Fix BuildRequires packages for Python-3.12
|
||||
|
||||
* Fri Jan 20 2023 Fedora Release Engineering <releng@fedoraproject.org> - 3.12.3-2
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user