[packages/python-libfdt] - last buildable version of python2 module, copied from dtc.spec

qboosh qboosh at pld-linux.org
Sun Sep 15 16:53:11 CEST 2024


commit e1a17743d31577a99a587632741ce81f8eb470f9
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date:   Sun Sep 15 16:56:00 2024 +0200

    - last buildable version of python2 module, copied from dtc.spec

 dtc-python2.patch  | 11 +++++++++++
 python-libfdt.spec | 55 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 66 insertions(+)
---
diff --git a/python-libfdt.spec b/python-libfdt.spec
new file mode 100644
index 0000000..b06d906
--- /dev/null
+++ b/python-libfdt.spec
@@ -0,0 +1,55 @@
+Summary:	Python 2 binding for fdt library
+Summary(pl.UTF-8):	Wiązanie Pythona 2 do biblioteki fdt
+Name:		python-libfdt
+# keep 1.7.0 here for python2 support
+Version:	1.7.0
+Release:	1
+License:	GPL v2+ or BSD
+Group:		Libraries/Python
+Source0:	https://www.kernel.org/pub/software/utils/dtc/dtc-%{version}.tar.xz
+# Source0-md5:	228576aceed3aa89f54283aa0f1eb820
+Patch0:		dtc-python2.patch
+URL:		https://www.devicetree.org/
+BuildRequires:	python-devel >= 2
+BuildRequires:	python-setuptools
+BuildRequires:	python-setuptools_scm
+BuildRequires:	rpmbuild(macros) >= 1.714
+BuildRequires:	swig-python >= 2.0.10
+BuildRequires:	tar >= 1:1.22
+BuildRequires:	xz
+Requires:	libfdt >= %{version}
+BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+
+%description
+Python 2 binding for fdt library.
+
+%description -l pl.UTF-8
+Wiązanie Pythona 2 do biblioteki fdt.
+
+%prep
+%setup -q -n dtc-%{version}
+%patch0 -p1
+
+%build
+export SETUPTOOLS_SCM_PRETEND_VERSION=%{version}
+
+%py_build
+
+%install
+rm -rf $RPM_BUILD_ROOT
+
+export SETUPTOOLS_SCM_PRETEND_VERSION=%{version}
+
+%py_install
+
+%py_postclean
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%files
+%defattr(644,root,root,755)
+%doc README.license README.md
+%attr(755,root,root) %{py_sitedir}/_libfdt.so
+%{py_sitedir}/libfdt.py[co]
+%{py_sitedir}/libfdt-%{version}-py*.egg-info
diff --git a/dtc-python2.patch b/dtc-python2.patch
new file mode 100644
index 0000000..e0a52aa
--- /dev/null
+++ b/dtc-python2.patch
@@ -0,0 +1,11 @@
+--- dtc-1.7.0/setup.py.orig	2023-02-09 11:01:35.000000000 +0100
++++ dtc-1.7.0/setup.py	2023-03-08 12:58:41.327004674 +0100
+@@ -45,7 +45,7 @@
+ class build_py(_build_py):
+     def run(self):
+         self.run_command("build_ext")
+-        return super().run()
++        return _build_py.run(self)
+ 
+ setup(
+     name='libfdt',
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/python-libfdt.git/commitdiff/e1a17743d31577a99a587632741ce81f8eb470f9



More information about the pld-cvs-commit mailing list