alciregi 124b6b7
%global _description %{expand:
alciregi 124b6b7
Python interface to Bluetooth LE on Linux.
alciregi 124b6b7
This is a project to provide an API to allow
alciregi 124b6b7
access to Bluetooth Low Energy devices from Python.}
alciregi 124b6b7
alciregi 124b6b7
Name:           python-bluepy
alciregi 124b6b7
Version:        1.3.0
363a69b
Release:        11%{?dist}
alciregi 124b6b7
Summary:        Python interface to Bluetooth LE
alciregi 124b6b7
alciregi 124b6b7
#bluepy uses code from the bluez project, which is made available under
alciregi 124b6b7
#Version 2 of the GNU Public License, bluepy itself is placed in the
alciregi 124b6b7
#public domain
alciregi 124b6b7
License:        Public Domain and GPLv2
alciregi 124b6b7
URL:            https://github.com/IanHarvey/bluepy
alciregi 124b6b7
Source0:        https://github.com/IanHarvey/bluepy/archive/v/%{version}/bluepy-%{version}.tar.gz
alciregi 124b6b7
alciregi 124b6b7
%description %_description
alciregi 124b6b7
alciregi 124b6b7
%package -n python3-bluepy
alciregi 124b6b7
Summary:        %{summary}
alciregi 124b6b7
BuildRequires:  python3-devel make gcc
alciregi 124b6b7
BuildRequires:  glib2-devel
alciregi 124b6b7
BuildRequires:  %{py3_dist setuptools}
alciregi 124b6b7
BuildRequires:  %{py3_dist sphinx}
alciregi 124b6b7
%{?python_provide:%python_provide python3-bluepy}
alciregi 124b6b7
alciregi 124b6b7
%description -n python3-bluepy %_description
alciregi 124b6b7
alciregi 124b6b7
%package doc
alciregi 124b6b7
Summary:        %{summary}
alciregi 124b6b7
alciregi 124b6b7
%description doc
alciregi 124b6b7
Documentation for %{name}.
alciregi 124b6b7
alciregi 124b6b7
%prep
alciregi 124b6b7
%autosetup -n bluepy-v-%{version}
alciregi 124b6b7
rm -rf bluepy.egg-info
alciregi 124b6b7
find . -type f -name "*.py" -exec sed -i '/^#![  ]*\/usr\/bin\/env.*$/ d' {} 2>/dev/null ';'
alciregi 124b6b7
alciregi 124b6b7
%build
alciregi 124b6b7
%set_build_flags
alciregi 124b6b7
export PYTHONPATH=../
alciregi 124b6b7
sed 's|CFLAGS =|CFLAGS +=|g' -i bluepy/Makefile
alciregi 124b6b7
sed 's|CPPFLAGS =|CPPFLAGS +=|g' -i bluepy/Makefile
alciregi 124b6b7
sed 's| $(LDLIBS)| $(LDFLAGS) $(LDLIBS)|g' -i bluepy/Makefile
alciregi 124b6b7
%py3_build
alciregi 124b6b7
make -C docs SPHINXBUILD=sphinx-build-3 html
alciregi 124b6b7
rm -rf docs/_build/html/{.doctrees,.buildinfo,.nojekyll} -vf
alciregi 124b6b7
alciregi 124b6b7
%install
alciregi 124b6b7
%py3_install
alciregi 124b6b7
pathfix.py -pni "%{__python3} %{py3_shbang_opts}" %{buildroot}%{python3_sitelib}/bluepy/{get_services,scanner}.py
alciregi 124b6b7
for file in %{buildroot}%{_bindir}/{thingy52,sensortag,blescan}; do
alciregi 124b6b7
   chmod a+x $file
alciregi 124b6b7
done
alciregi 124b6b7
for file in %{buildroot}%{python3_sitelib}/bluepy/{get_services,scanner}.py; do
alciregi 124b6b7
   chmod a+x $file
alciregi 124b6b7
done
alciregi 124b6b7
for file in %{buildroot}%{python3_sitelib}/bluepy/{*.c,*.h}; do
alciregi 124b6b7
   rm -rf $file
alciregi 124b6b7
done
alciregi 124b6b7
alciregi 124b6b7
%files -n python3-bluepy
alciregi 124b6b7
%{python3_sitelib}/bluepy/
alciregi 124b6b7
%{python3_sitelib}/bluepy-*.egg-info/
alciregi 124b6b7
%{_bindir}/blescan
alciregi 124b6b7
%{_bindir}/sensortag
alciregi 124b6b7
%{_bindir}/thingy52
alciregi 124b6b7
%license LICENSE.txt
alciregi 124b6b7
%doc README README.md
alciregi 124b6b7
alciregi 124b6b7
%files doc
alciregi 124b6b7
%license LICENSE.txt
alciregi 124b6b7
%doc docs/_build/html
alciregi 124b6b7
alciregi 124b6b7
%changelog
363a69b
* Fri Jan 20 2023 Fedora Release Engineering <releng@fedoraproject.org> - 1.3.0-11
363a69b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
363a69b
7a365fb
* Fri Jul 22 2022 Fedora Release Engineering <releng@fedoraproject.org> - 1.3.0-10
7a365fb
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
7a365fb
9fcc4a8
* Mon Jun 13 2022 Python Maint <python-maint@redhat.com> - 1.3.0-9
9fcc4a8
- Rebuilt for Python 3.11
9fcc4a8
744d7e5
* Fri Jan 21 2022 Fedora Release Engineering <releng@fedoraproject.org> - 1.3.0-8
744d7e5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
744d7e5
319d9d9
* Fri Jul 23 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1.3.0-7
319d9d9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
319d9d9
6e8729e
* Fri Jun 04 2021 Python Maint <python-maint@redhat.com> - 1.3.0-6
6e8729e
- Rebuilt for Python 3.10
6e8729e
ef92d3f
* Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1.3.0-5
ef92d3f
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
ef92d3f
eaea0d6
* Tue Jul 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.3.0-4
eaea0d6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
eaea0d6
ba23dc8
* Tue May 26 2020 Miro HronĨok <mhroncok@redhat.com> - 1.3.0-3
ba23dc8
- Rebuilt for Python 3.9
ba23dc8
306c6f8
* Thu Jan 30 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.3.0-2
306c6f8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
306c6f8
alciregi 124b6b7
* Mon Dec 9 2019 Alessio <alciregi AT fedoraproject DOT org> - 1.3.0-1
alciregi 124b6b7
- Initial package