2019-03-15 21:26:29 +00:00
|
|
|
#
|
2023-05-10 07:45:05 +00:00
|
|
|
# spec file for package python-bluepy
|
2019-03-15 21:26:29 +00:00
|
|
|
#
|
2023-05-09 20:49:59 +00:00
|
|
|
# Copyright (c) 2023 SUSE LLC
|
2019-03-15 21:26:29 +00:00
|
|
|
#
|
|
|
|
|
# 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.
|
|
|
|
|
|
2023-05-09 20:49:59 +00:00
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
2019-03-15 21:26:29 +00:00
|
|
|
#
|
|
|
|
|
|
|
|
|
|
|
2019-03-16 07:36:10 +00:00
|
|
|
%define skip_python2 1
|
2021-01-20 10:12:24 +00:00
|
|
|
%define skip_python36 1
|
2023-05-10 07:45:05 +00:00
|
|
|
%bcond_with test
|
2019-03-15 21:26:29 +00:00
|
|
|
Name: python-bluepy
|
2020-01-15 21:14:23 +00:00
|
|
|
Version: 1.3.0
|
2019-03-15 21:26:29 +00:00
|
|
|
Release: 0
|
2023-05-10 07:45:05 +00:00
|
|
|
Summary: Python interface to Bluetooth LE on Linux
|
2023-05-09 20:49:59 +00:00
|
|
|
# according to LICENSE.txt:
|
|
|
|
|
# - bluez-x.yz is under GPLv2 & LGPLv2
|
|
|
|
|
# - everything else is public domain
|
2023-05-10 07:45:05 +00:00
|
|
|
License: GPL-2.0-or-later AND LGPL-2.1-or-later AND SUSE-Public-Domain
|
|
|
|
|
URL: https://ianharvey.github.io/bluepy-doc/
|
2019-03-15 21:26:29 +00:00
|
|
|
Source: bluepy-%{version}.tar.xz
|
|
|
|
|
BuildRequires: %{python_module devel}
|
|
|
|
|
BuildRequires: %{python_module setuptools}
|
|
|
|
|
BuildRequires: fdupes
|
2019-03-15 21:33:47 +00:00
|
|
|
BuildRequires: glib2-devel
|
2023-05-10 07:45:05 +00:00
|
|
|
BuildRequires: python-rpm-macros
|
2019-03-15 21:26:29 +00:00
|
|
|
BuildRequires: unzip
|
|
|
|
|
%if %{with test}
|
|
|
|
|
BuildRequires: %{python_module pytest}
|
|
|
|
|
%endif
|
|
|
|
|
%python_subpackages
|
|
|
|
|
|
|
|
|
|
%description
|
2019-03-16 07:47:16 +00:00
|
|
|
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/
|
|
|
|
|
|
2019-03-15 21:26:29 +00:00
|
|
|
%prep
|
2019-03-15 21:31:20 +00:00
|
|
|
%setup -q -n bluepy-%{version}
|
2019-03-15 21:26:29 +00:00
|
|
|
|
|
|
|
|
%build
|
|
|
|
|
%python_build
|
|
|
|
|
|
|
|
|
|
%install
|
|
|
|
|
%python_install
|
|
|
|
|
%fdupes %{buildroot}%{_prefix}
|
2021-05-04 08:38:06 +00:00
|
|
|
%python_clone -a %{buildroot}%{_bindir}/blescan
|
|
|
|
|
%python_clone -a %{buildroot}%{_bindir}/sensortag
|
|
|
|
|
%python_clone -a %{buildroot}%{_bindir}/thingy52
|
|
|
|
|
|
2019-03-15 21:26:29 +00:00
|
|
|
%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}
|
2023-05-09 20:49:59 +00:00
|
|
|
%license LICENSE.txt
|
2023-05-10 07:45:05 +00:00
|
|
|
%doc README README.md
|
2021-05-04 08:38:06 +00:00
|
|
|
%python_alternative %{_bindir}/blescan
|
|
|
|
|
%python_alternative %{_bindir}/sensortag
|
|
|
|
|
%python_alternative %{_bindir}/thingy52
|
2023-05-10 07:45:05 +00:00
|
|
|
%{python_sitelib}/bluepy
|
|
|
|
|
%{python_sitelib}/bluepy-%{version}*-info
|
2019-03-15 21:26:29 +00:00
|
|
|
|
|
|
|
|
%changelog
|