Hello community, here is the log from the commit of package i2c-tools for openSUSE:Factory checked in at 2019-11-08 15:21:17 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/i2c-tools (Old) and /work/SRC/openSUSE:Factory/.i2c-tools.new.2990 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "i2c-tools" Fri Nov 8 15:21:17 2019 rev:36 rq:745121 version:4.1 Changes: -------- --- /work/SRC/openSUSE:Factory/i2c-tools/i2c-tools.changes 2018-12-10 12:26:45.742621430 +0100 +++ /work/SRC/openSUSE:Factory/.i2c-tools.new.2990/i2c-tools.changes 2019-11-08 15:21:18.634714541 +0100 @@ -1,0 +2,6 @@ +Thu Oct 31 09:23:26 UTC 2019 - Guillaume GARDET <guillaume.gar...@opensuse.org> + +- Enable python binding python3-smbus for openSUSE Leap 15+ + and SLE15+ + +------------------------------------------------------------------- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ i2c-tools.spec ++++++ --- /var/tmp/diff_new_pack.FjZlre/_old 2019-11-08 15:21:19.162715100 +0100 +++ /var/tmp/diff_new_pack.FjZlre/_new 2019-11-08 15:21:19.162715100 +0100 @@ -1,7 +1,7 @@ # # spec file for package i2c-tools # -# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -16,6 +16,13 @@ # +# Python build is broken on SLE12 / Leap 42.x +%if 0%{?sle_version} >= 150000 || 0%{?suse_version} >= 1500 +%bcond_without i2ctools_python_binding +%else +%bcond_with i2ctools_python_binding +%endif + Name: i2c-tools Version: 4.1 Release: 0 @@ -28,6 +35,8 @@ Source0: https://www.kernel.org/pub/software/utils/i2c-tools/%{name}-%{version}.tar.xz Source1: https://www.kernel.org/pub/software/utils/i2c-tools/%{name}-%{version}.tar.sign BuildRoot: %{_tmppath}/%{name}-%{version}-build +BuildRequires: python3-devel +BuildRequires: python3-setuptools ExcludeArch: s390 s390x %description @@ -56,16 +65,40 @@ libi2c offers a way for applications to interact with the devices connected to the I2C or SMBus buses of the system. +%if %{with i2ctools_python_binding} +%package -n python3-smbus +Summary: Python binding for Device Tree +License: GPL-2.0-or-later +Group: Development/Tools/Other + +%description -n python3-smbus +libi2c offers a way for applications to interact with the devices +connected to the I2C or SMBus buses of the system. + +Python binding part. +%endif + %prep %setup -q %build make %{?_smp_mflags} CFLAGS="%{optflags}" CC="%{__cc}" BUILD_STATIC_LIB:=0 +%if %{with i2ctools_python_binding} +cd py-smbus +python3 setup.py build_ext +%py3_build +cd .. +%endif %install %make_install PREFIX=/usr libdir=%{_libdir} BUILD_STATIC_LIB:=0 # cleanup rm -f "%{buildroot}/usr/bin/decode-edid" +%if %{with i2ctools_python_binding} +cd py-smbus +%python3_install +cd .. +%endif %post -n libi2c0 -p /sbin/ldconfig @@ -86,4 +119,10 @@ %dir %{_includedir}/i2c %{_includedir}/i2c/smbus.h +%if %{with i2ctools_python_binding} +%files -n python3-smbus +%{python3_sitearch}/*.so +%{python3_sitearch}/*.egg-info +%endif + %changelog