File python-pitop.spec of Package python-pitop
#
# spec file for package python-pitop
#
# Copyright (c) 2023 SUSE LLC
#
# 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/
#
Name: python-pitop
Version: 0.30.0
Release: 0
Summary: pi-top Python SDK
License: Apache-2.0
Group: System/Management
URL: https://github.com/pi-top/pi-top-Python-SDK
Source0: https://github.com/pi-top/pi-top-Python-SDK/archive/v%{version}-1.tar.gz#/%{name}-%{version}.tar.gz
BuildRequires: %{python_module setuptools}
BuildRequires: fdupes
BuildRequires: python-rpm-generators
BuildRequires: python-rpm-macros
Requires: python-Flask
Requires: python-Flask-Cors
Requires: python-Flask-Sockets
# BuildRequires: python3-Sphinx
Requires: python-Pillow
Requires: python-RPi.GPIO
Requires: python-dlib
Requires: python-gevent
Requires: python-gpiozero
Requires: python-imageio
Requires: python-imutils
Requires: python-isc_dhcp_leases
Requires: python-matplotlib
Requires: python-monotonic
Requires: python-netifaces
Requires: python-onnxruntime
Requires: python-opencv
Requires: python-opencv-python
Requires: python-pygame
Requires: python-pyinotify
Requires: python-pyserial
Requires: python-scipy
Requires: python-wget
Requires(post): update-alternatives
Requires(postun): update-alternatives
BuildArch: noarch
%python_subpackages
%description
A simple, modular interface for interacting with a pi-top and its related accessories and components.
%prep
%autosetup -p1 -n pi-top-Python-SDK-%{version}-1
sed -i -e 's/,<[0-9.]*//' packages/*/setup.py tests/requirements.txt
%build
for i in packages/* ; do
pushd $i
%python_build
popd
done
# sphinx-build -W -v -bhtml docs/ build/html
# sphinx-build -W -v -bhtml docs/ build/man
%install
for i in packages/* ; do
pushd $i
%python_install
popd
done
%python_expand %fdupes %{buildroot}%{$python_sitelib}
%python_clone -a %{buildroot}%{_bindir}/pi-top
%python_clone -a %{buildroot}%{_bindir}/pt
%post
%python_install_alternative pi-top pt
%postun
%python_uninstall_alternative pi-top pt
%files %{python_files}
%license LICENSE
%doc README.rst docs examples
%{python_sitelib}/pitop*
%python_alternative %{_bindir}/pi-top
%python_alternative %{_bindir}/pt
%changelog