Merged update from upstream sources
This is an automated DistroBaker update from upstream sources. If you do not know what this is about or would like to opt out, contact the OSCI team. Source: https://src.fedoraproject.org/rpms/python-dmidecode.git#d826fb9119f5a6d8d7cac98111aa465a313e22ef
This commit is contained in:
parent
f7c2511e97
commit
a9fcfe5214
31
python-dmidecode-use_python3.patch
Normal file
31
python-dmidecode-use_python3.patch
Normal file
@ -0,0 +1,31 @@
|
||||
--- a/Makefile.orig 2020-11-26 17:05:32.097857000 +0100
|
||||
+++ b/Makefile 2020-11-26 17:09:31.660779877 +0100
|
||||
@@ -38,8 +38,8 @@
|
||||
#. $AutoHeaderSerial::20100225 $
|
||||
#. ******* AUTOHEADER END v1.2 *******
|
||||
|
||||
-PY_BIN := python2
|
||||
-VERSION := $(shell cd src;$(PY_BIN) -c "from setup_common import *; print(get_version());")
|
||||
+PY_BIN := $(PYTHON_BIN)
|
||||
+VERSION := $(PYTHON_VERSION)
|
||||
PACKAGE := python-dmidecode
|
||||
PY_VER := $(shell $(PY_BIN) -c 'import sys; print("%d.%d"%sys.version_info[0:2])')
|
||||
PY_MV := $(shell echo $(PY_VER) | cut -b 1)
|
||||
@@ -65,7 +65,7 @@
|
||||
$(PY) src/setup.py build
|
||||
|
||||
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 $^ $(CFLAGS) -D_DMIDUMP_MAIN_
|
||||
|
||||
install:
|
||||
$(PY) src/setup.py install
|
||||
--- a/unit-tests/Makefile.orig 2015-06-08 17:19:45.000000000 +0200
|
||||
+++ b/unit-tests/Makefile 2020-11-26 17:12:15.222361106 +0100
|
||||
@@ -1,5 +1,5 @@
|
||||
-PY_BIN := python2
|
||||
+PY_BIN := $(PYTHON_BIN)
|
||||
|
||||
test :
|
||||
$(PY_BIN) unit -vv
|
||||
|
@ -1,10 +1,12 @@
|
||||
Name: python-dmidecode
|
||||
Summary: Python module to access DMI data
|
||||
Version: 3.12.2
|
||||
Release: 21%{?dist}
|
||||
Release: 22%{?dist}
|
||||
License: GPLv2
|
||||
URL: http://projects.autonomy.net.au/python-dmidecode/
|
||||
Source0: https://fedorahosted.org/releases/p/y/%{name}/%{name}-%{version}.tar.gz
|
||||
URL: https://github.com/nima/python-dmidecode
|
||||
Source0: https://github.com/nima/python-dmidecode/archive/v%{version}/%{name}/%{name}-%{version}.tar.gz
|
||||
|
||||
Patch0: python-dmidecode-use_python3.patch
|
||||
|
||||
BuildRequires: gcc
|
||||
BuildRequires: libxml2-devel
|
||||
@ -29,28 +31,29 @@ Requires: libxml2-python3
|
||||
|
||||
|
||||
%prep
|
||||
%setup -q
|
||||
sed -i 's/python2/python3/g' Makefile unit-tests/Makefile
|
||||
|
||||
%autosetup -p1
|
||||
|
||||
%build
|
||||
# Not to get undefined symbol: dmixml_GetContent
|
||||
export CFLAGS="${CFLAGS-} -std=gnu89"
|
||||
make build
|
||||
# -std=gnu89 is there to avoid `undefined symbol: dmixml_GetContent`
|
||||
export PYTHON_BIN=%{__python3}
|
||||
export PYTHON_VERSION=%{python3_version}
|
||||
export CFLAGS="%{build_cflags} -std=gnu89"
|
||||
export CC=gcc
|
||||
%make_build
|
||||
|
||||
%install
|
||||
%{__python3} src/setup.py install --root %{buildroot} --prefix=%{_prefix}
|
||||
|
||||
|
||||
%check
|
||||
pushd unit-tests
|
||||
make
|
||||
popd
|
||||
export PYTHONPATH=%{buildroot}%{python3_sitearch}
|
||||
export PYTHON_BIN=%{__python3}
|
||||
make -C unit-tests
|
||||
|
||||
|
||||
%files -n python3-dmidecode
|
||||
%license doc/LICENSE doc/AUTHORS doc/AUTHORS.upstream
|
||||
%doc README doc/README.upstream
|
||||
%license doc/LICENSE
|
||||
%doc README doc/AUTHORS doc/AUTHORS.upstream
|
||||
%{python3_sitearch}/dmidecodemod.cpython-%{python3_version_nodots}*.so
|
||||
%{python3_sitearch}/__pycache__/dmidecode.cpython-%{python3_version_nodots}*.py[co]
|
||||
%{python3_sitearch}/dmidecode.py
|
||||
@ -58,6 +61,10 @@ popd
|
||||
%{_datadir}/python-dmidecode/
|
||||
|
||||
%changelog
|
||||
* Thu Nov 26 2020 Antonio Trande <sagitter@fedoraproject.org> - 3.12.2-22
|
||||
- Refresh SPEC file
|
||||
- Fixed for Python-3.10 (rhbz#1898981)
|
||||
|
||||
* Wed Jul 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 3.12.2-21
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user