%{?!pybasever:%{expand:%%define pyver %(python -c 'import sys ; print sys.version[:3]')}} %{?!pynext:%{expand:%%define pynext %(python -c 'print %{pyver} + 0.1')}} %{!?python_sitelib: %define python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")} %define srcname pyserial Name: python-serial Version: 2.2 Release: 1%{?dist} Summary: Python module for access to the serial port Group: Development/Languages License: Python URL: http://pyserial.sourceforge.net/ Source: http://download.sf.net/pyserial/pyserial-%{version}.zip BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: python-devel Requires: python >= %{pyver}, python < %{pynext} BuildArch: noarch %description This module capsulates the access for the serial port. It provides backends for standard Python running on Windows, Linux, BSD (possibly any POSIX compilant system) and Jython. The module named "serial" automaticaly selects the appropriate backend. %prep %setup -q -n %{srcname}-%{version} %build env CFLAGS="$RPM_OPT_FLAGS" python setup.py build %install rm -rf $RPM_BUILD_ROOT python setup.py install --root=$RPM_BUILD_ROOT --record=INSTALLED_FILES %clean rm -rf $RPM_BUILD_ROOT %files -f INSTALLED_FILES %defattr(-,root,root) %doc CHANGES.txt LICENSE.txt README.txt %dir %{python_sitelib}/serial/ %{python_sitelib}/serial/*.py %{python_sitelib}/serial/*.pyc %ghost %{python_sitelib}/serial/*.pyo %changelog * Sat Jul 15 2006 Thomas Vander Stichele - 2.2-1 - initial package