Files
python-bluepy/python-bluepy.spec

71 lines
2.0 KiB
RPMSpec
Raw Normal View History

#
# spec file for package python-attrs
#
# 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 http://bugs.opensuse.org/
#
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
%bcond_with test
Name: python-bluepy
Version: 1.1.4
Release: 0
Summary: Automation Library for Yamaha Network receivers
License: GPL
Group: Python interface to Bluetooth LE on Linux
Url: https://github.com/wuub/rxv
Source: bluepy-%{version}.tar.xz
BuildRequires: %{python_module devel}
BuildRequires: %{python_module setuptools}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
BuildRequires: glib2-devel
BuildRequires: unzip
%if %{with test}
BuildRequires: %{python_module pytest}
%endif
BuildArch: noarch
%python_subpackages
%description
%prep
%setup -q -n bluepy-%{version}
%build
%python_build
%install
%python_install
%fdupes %{buildroot}%{_prefix}
%if %{with test}
%check
sed -i -e "s/'coveralls'/'python-coveralls'/" setup.py
%{python_expand virtualenv-%$python_bin_suffix --system-site-packages --no-download testvenv-%$python_bin_suffix
testvenv-%$python_bin_suffix/bin/pip install -e .[test,build]
export PYTHONPATH=$PWD/testvenv-%$python_bin_suffix/lib/python%$python_bin_suffix/site-packages/:$PWD
testvenv-%$python_bin_suffix/bin/python -m pytest && rm -Rf testvenv-%$python_bin_suffix
}
%endif
%files %{python_files}
%license LICENSE
%doc README.rst
%{python_sitelib}/*
%changelog