File python-smbus.spec of Package python-smbus

#
# spec file for package python-smbus
#
# Copyright (c) 2018 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
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via https://bugs.opensuse.org/
#


%{?!python_module:%define python_module() python-%{**} python3-%{**}}
%define origname i2c-tools

Name:           python-smbus
Url:            http://www.lm-sensors.org/wiki/I2CTools
Version:        4.1
Release:        0
Summary:        Python wrapper for SMBus access over i2c-dev
License:        GPL-2.0-or-later
Group:          Development/Tools/Other
Requires:       udev
Recommends:     modules
Source0:        %{origname}-%{version}.tar.xz
Source1:        %{origname}-%{version}.tar.sign
BuildRequires:  %{python_module devel}
BuildRequires:  %{python_module setuptools}
BuildRequires:  fdupes
BuildRequires:  libi2c0-devel
BuildRequires:  python-rpm-macros
Recommends:     i2c-tools
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
ExcludeArch:    s390 s390x
%python_subpackages

%description
This package contains the python bindings of I2C tools for Linux.

%prep
%setup -q -n %{origname}-%{version}

%build
# make %{?_smp_mflags} CFLAGS="$RPM_OPT_FLAGS" CC="%{__cc}" EXTRA="py-smbus"
cd py-smbus
%python_build

%install
cd py-smbus
%python_install

%files %{python_files}
%doc py-smbus/README
%{python_sitearch}/*

%changelog
openSUSE Build Service is sponsored by