File python-gatt.spec of Package python-gatt
#
# spec file for package python-gatt
#
# Copyright (c) 2021, Martin Hauke <mardnh@gmx.de>
#
# 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 https://bugs.opensuse.org/
#
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
Name: python-gatt
Version: 0.2.7
Release: 0
Summary: Bluetooth GATT SDK for Python
License: MIT
URL: https://github.com/getsenic/gatt-python
#Git-Clone: https://github.com/getsenic/gatt-python.git
Source: https://files.pythonhosted.org/packages/source/g/gatt/gatt-%{version}.tar.gz
BuildRequires: python-rpm-macros
BuildRequires: %{python_module setuptools}
BuildRequires: fdupes
BuildArch: noarch
%python_subpackages
%description
Bluetooth GATT SDK for Python.
%prep
%setup -q -n gatt-%{version}
sed -i 's|#!/usr/bin/env python3|#!/usr/bin/python3|g' gattctl.py
%build
%python_build
%install
%python_install
%python_clone -a %{buildroot}%{_bindir}/gattctl
%python_expand %fdupes %{buildroot}%{$python_sitelib}
%post
%python_install_alternative gattctl
%postun
%python_uninstall_alternative gattctl
%check
#Upstream doesn't have any tests yet
%files %{python_files}
#%%license upstream does not include a dedicadet license file
%python_alternative %{_bindir}/gattctl
%{python_sitelib}/*
%changelog