From fab570848f8cd057d2a64828e119f7725953aeab Mon Sep 17 00:00:00 2001 From: Henrik Nordstrom Date: Jun 03 2013 15:11:09 +0000 Subject: Package Python interface --- diff --git a/i2c-tools.spec b/i2c-tools.spec index 1979e60..1415a25 100644 --- a/i2c-tools.spec +++ b/i2c-tools.spec @@ -14,6 +14,7 @@ URL: http://www.lm-sensors.org/wiki/I2CTools Source0: http://dl.lm-sensors.org/i2c-tools/releases/%{name}-%{version}.tar.bz2 # for /etc/udev/makedev.d resp /etc/modprobe.d ownership Requires: udev module-init-tools +BuildRequires: python-devel ExcludeArch: s390 s390x %description @@ -34,9 +35,14 @@ eeproms in your system is very dangerous and is likely to render your system unusable. Do not install, let alone use this, unless you really, _really_ know what you are doing. +%package python +Summary: Python bindings for Linux SMBus access through i2c-dev +Group: Applications/System + +%description python %prep -%setup -q +%setup -q %build @@ -44,6 +50,9 @@ make CFLAGS="$RPM_OPT_FLAGS" pushd eepromer make CFLAGS="$RPM_OPT_FLAGS -I../include" popd +pushd py-smbus +CFLAGS="$RPM_OPT_FLAGS -I../include" %{__python} setup.py build +popd %install @@ -51,6 +60,9 @@ rm -rf $RPM_BUILD_ROOT make install DESTDIR=$RPM_BUILD_ROOT prefix=%{_prefix} install -m 755 eepromer/{eepromer,eeprom,eeprog} \ $RPM_BUILD_ROOT%{_sbindir} +pushd py-smbus +%{__python} setup.py install --skip-build --root=$RPM_BUILD_ROOT +popd # cleanup rm -f $RPM_BUILD_ROOT%{_bindir}/decode-edid.pl # Remove userland kernel headers, belong in glibc-kernheaders. @@ -88,8 +100,19 @@ rm -rf $RPM_BUILD_ROOT %doc eepromer/README* %{_sbindir}/eepro* +%files python +%defattr(-,root,root,-) +%doc py-smbus/README +#/usr/lib64/python2.7/site-packages/smbus-1.1-py2.7.egg-info +#/usr/lib64/python2.7/site-packages/smbus.so +%{python_sitearch}/* + + %changelog +* Sat Jun 1 2013 Henrik Nordstrom - 3.1.0-4 +- Package python interface + * Thu Feb 14 2013 Fedora Release Engineering - 3.1.0-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild