OBS-URL: https://build.opensuse.org/package/show/system:homeautomation:home-assistant/python-bluepy?expand=0&rev=8
80 lines
2.3 KiB
RPMSpec
80 lines
2.3 KiB
RPMSpec
#
|
|
# 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
|
|
%define skip_python2 1
|
|
|
|
Name: python-bluepy
|
|
Version: 1.1.4
|
|
Release: 0
|
|
License: GPL
|
|
Summary: Python interface to Bluetooth LE on Linux
|
|
Url: http://ianharvey.github.io/bluepy-doc/
|
|
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
|
|
Bluepy is a Python package to allow Bluetooth Low Energy (a.k.a Bluetooth
|
|
Smart) peripherals to be controlled from Python. Installation instructions
|
|
and release notes are in the file README.md.
|
|
|
|
Source code and further documentation is at:
|
|
https://github.com/IanHarvey/bluepy
|
|
http://ianharvey.github.io/bluepy-doc/
|
|
|
|
|
|
%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.txt
|
|
%doc README README.md
|
|
%_bindir/*
|
|
%{python_sitelib}/*
|
|
|
|
%changelog
|