File python-python-gammu.spec of Package python-python-gammu

#
# spec file for package python-python-gammu
#
# Copyright (c) 2015 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 http://bugs.opensuse.org/
#


Name:           python-python-gammu
Version:        2.4
Release:        0
Summary:        Python module to communicate with mobile phones
License:        GPL-2.0+
Group:          Development/Languages/Python
Url:            http://wammu.eu/python-gammu/
Source:         https://pypi.python.org/packages/source/p/python-gammu/python-gammu-%{version}.tar.bz2
BuildRequires:  gammu-devel >= 1.34.0
BuildRequires:  libdbi-drivers-dbd-sqlite3
BuildRequires:  pkg-config
BuildRequires:  python-devel
BuildRequires:  python-setuptools
Obsoletes:      python-gammu < %version
Provides:       python-gammu = %version
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
%if 0%{?suse_version} && 0%{?suse_version} <= 1110
%{!?python_sitearch: %global python_sitearch %(python -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")}
%endif

%description
This provides gammu module, that can work with any phone Gammu
supports - many Nokias, Siemens, Alcatel, ...

%prep
%setup -q -n python-gammu-%{version}

%build
CFLAGS="%{optflags}" python setup.py build

%install
python setup.py install --prefix=%{_prefix} --root=%{buildroot}

%check
# Need to limit tests due to brekage of libdbi
python setup.py test \
    -s test.test_errors \
    -s test.test_config \
    -s test.test_dummy \
    -s test.test_sms \
    -s test.test_worker \
    -s test.test_backup \
    -s test.test_data

%files
%defattr(-,root,root,-)
%doc COPYING README.rst AUTHORS examples/
%{python_sitearch}/*

%changelog
openSUSE Build Service is sponsored by