From e83e86382d75d1e29f67fd4f212b26d9ebe4e3879aa634496ec17080878b878c Mon Sep 17 00:00:00 2001 From: Dirk Mueller Date: Wed, 30 Oct 2019 15:38:49 +0000 Subject: [PATCH] - switch to building python3 bindings using setuptools to avoid patching - update to 1.5.1: OBS-URL: https://build.opensuse.org/package/show/Base:System/dtc?expand=0&rev=41 --- dtc-fix_python_install.patch | 12 ------------ dtc.changes | 10 +++++++--- dtc.spec | 5 ++++- 3 files changed, 11 insertions(+), 16 deletions(-) delete mode 100644 dtc-fix_python_install.patch diff --git a/dtc-fix_python_install.patch b/dtc-fix_python_install.patch deleted file mode 100644 index 147ff70..0000000 --- a/dtc-fix_python_install.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -purN dtc-1.5.1.orig/pylibfdt/Makefile.pylibfdt dtc-1.5.1/pylibfdt/Makefile.pylibfdt ---- dtc-1.5.1.orig/pylibfdt/Makefile.pylibfdt 2019-10-30 14:47:48.135793334 +0100 -+++ dtc-1.5.1/pylibfdt/Makefile.pylibfdt 2019-10-30 14:48:17.019978313 +0100 -@@ -22,7 +22,7 @@ $(PYMODULE): $(PYLIBFDT_srcs) $(LIBFDT_a - - install_pylibfdt: $(PYMODULE) - @$(VECHO) INSTALL-PYLIB -- $(PYTHON) $(SETUP) $(SETUPFLAGS) install --prefix=$(PREFIX) -+ $(PYTHON) $(SETUP) $(SETUPFLAGS) install --prefix=$(DESTDIR)$(PREFIX) - - pylibfdt_clean: - @$(VECHO) CLEAN "(pylibfdt)" diff --git a/dtc.changes b/dtc.changes index fa869d6..1a08ba6 100644 --- a/dtc.changes +++ b/dtc.changes @@ -1,14 +1,18 @@ +------------------------------------------------------------------- +Wed Oct 30 15:38:12 UTC 2019 - Dirk Mueller + +- switch to building python3 bindings using setuptools to avoid + patching + ------------------------------------------------------------------- Wed Oct 30 13:24:05 UTC 2019 - Guillaume GARDET - Enable python3 binding in python3-libfdt -- Fix python installation with patch: - * dtc-fix_python_install.patch ------------------------------------------------------------------- Wed Oct 30 13:23:32 UTC 2019 - Dirk Mueller -- update to 1.5.1: +- update to 1.5.1: * Numerous assorted bugfixes * Add a new fdt_create_with_flags() function, and a FDT_CREATE_FLAG_NO_NAME_DEDUP flag which improves speed at the diff --git a/dtc.spec b/dtc.spec index 2a471db..02d15df 100644 --- a/dtc.spec +++ b/dtc.spec @@ -31,6 +31,7 @@ BuildRequires: bison BuildRequires: flex BuildRequires: libyaml-devel BuildRequires: python3-devel +BuildRequires: python3-setuptools BuildRequires: swig %description @@ -74,12 +75,14 @@ Python binding part. %patch1 -p1 %build -make %{?_smp_mflags} V=1 +make %{?_smp_mflags} V=1 NO_PYTHON=1 +python3 pylibfdt/setup.py build '--executable=/usr/bin/python3 -s' %install %make_install PREFIX=%{_prefix} LIBDIR=%{_libdir} install -p -m 644 libfdt/libfdt_env.h %{buildroot}/%{_includedir} rm -f %{buildroot}/%{_libdir}/*.a +python3 pylibfdt/setup.py install -O1 --skip-build --force --root %{buildroot} --prefix %{_prefix} %check make %{?_smp_mflags} check