%global _empty_manifest_terminate_build 0 Name: python-pilight Version: 0.1.1 Release: 1 Summary: A pure python module to connect to a pilight daemon to send and receive commands. License: MIT License URL: https://github.com/DavidLP/pilight Source0: https://mirrors.aliyun.com/pypi/web/packages/be/24/bee3980c42d5f82f1cb86e7661fce1acbc19e506a6327f993e12fb98378a/pilight-0.1.1.tar.gz BuildArch: noarch %description # A pure python client to connect to a pilight daemon [![Build Status](https://travis-ci.org/DavidLP/pilight.svg?branch=master)](https://travis-ci.org/DavidLP/pilight) [![Coverage Status](https://coveralls.io/repos/github/DavidLP/pilight/badge.svg?branch=master)](https://coveralls.io/github/DavidLP/pilight?branch=master) This client interfaces with the `pilight-daemon` to send and receive RF codes (https://www.pilight.org/). Sending and receiving is implemented in an asychronous way. A callback function can be defined that reacts on received data. Automatic acknowledge if the send data was transmitted by the pilight-daemon is implemented. All `pilight-send` commands can be used by this client (https://wiki.pilight.org/doku.php/psend). The API is mentioned here: https://manual.pilight.org/en/api. # Installation The latest release is hosted on PyPi. Thus for installation type: ``` pip install pilight ``` Otherwise download the code and ``` python setup.py install ``` You can run the unit tests to check the installation ``` nosetests pilight ``` # Usage ``` from pilight import pilight pilight_connection = pilight.Client() # Connect to the pilight-daemon at localhost:5000 pilight_connection.send_code(data={"protocol": [ "kaku_switch" ], # https://manual.pilight.org/en/api "id": 1, "unit": 0, "off": 1 }) ``` Also check the examples folder. %package -n python3-pilight Summary: A pure python module to connect to a pilight daemon to send and receive commands. Provides: python-pilight BuildRequires: python3-devel BuildRequires: python3-setuptools BuildRequires: python3-pip %description -n python3-pilight # A pure python client to connect to a pilight daemon [![Build Status](https://travis-ci.org/DavidLP/pilight.svg?branch=master)](https://travis-ci.org/DavidLP/pilight) [![Coverage Status](https://coveralls.io/repos/github/DavidLP/pilight/badge.svg?branch=master)](https://coveralls.io/github/DavidLP/pilight?branch=master) This client interfaces with the `pilight-daemon` to send and receive RF codes (https://www.pilight.org/). Sending and receiving is implemented in an asychronous way. A callback function can be defined that reacts on received data. Automatic acknowledge if the send data was transmitted by the pilight-daemon is implemented. All `pilight-send` commands can be used by this client (https://wiki.pilight.org/doku.php/psend). The API is mentioned here: https://manual.pilight.org/en/api. # Installation The latest release is hosted on PyPi. Thus for installation type: ``` pip install pilight ``` Otherwise download the code and ``` python setup.py install ``` You can run the unit tests to check the installation ``` nosetests pilight ``` # Usage ``` from pilight import pilight pilight_connection = pilight.Client() # Connect to the pilight-daemon at localhost:5000 pilight_connection.send_code(data={"protocol": [ "kaku_switch" ], # https://manual.pilight.org/en/api "id": 1, "unit": 0, "off": 1 }) ``` Also check the examples folder. %package help Summary: Development documents and examples for pilight Provides: python3-pilight-doc %description help # A pure python client to connect to a pilight daemon [![Build Status](https://travis-ci.org/DavidLP/pilight.svg?branch=master)](https://travis-ci.org/DavidLP/pilight) [![Coverage Status](https://coveralls.io/repos/github/DavidLP/pilight/badge.svg?branch=master)](https://coveralls.io/github/DavidLP/pilight?branch=master) This client interfaces with the `pilight-daemon` to send and receive RF codes (https://www.pilight.org/). Sending and receiving is implemented in an asychronous way. A callback function can be defined that reacts on received data. Automatic acknowledge if the send data was transmitted by the pilight-daemon is implemented. All `pilight-send` commands can be used by this client (https://wiki.pilight.org/doku.php/psend). The API is mentioned here: https://manual.pilight.org/en/api. # Installation The latest release is hosted on PyPi. Thus for installation type: ``` pip install pilight ``` Otherwise download the code and ``` python setup.py install ``` You can run the unit tests to check the installation ``` nosetests pilight ``` # Usage ``` from pilight import pilight pilight_connection = pilight.Client() # Connect to the pilight-daemon at localhost:5000 pilight_connection.send_code(data={"protocol": [ "kaku_switch" ], # https://manual.pilight.org/en/api "id": 1, "unit": 0, "off": 1 }) ``` Also check the examples folder. %prep %autosetup -n pilight-0.1.1 %build %py3_build %install %py3_install install -d -m755 %{buildroot}/%{_pkgdocdir} if [ -d doc ]; then cp -arf doc %{buildroot}/%{_pkgdocdir}; fi if [ -d docs ]; then cp -arf docs %{buildroot}/%{_pkgdocdir}; fi if [ -d example ]; then cp -arf example %{buildroot}/%{_pkgdocdir}; fi if [ -d examples ]; then cp -arf examples %{buildroot}/%{_pkgdocdir}; fi pushd %{buildroot} if [ -d usr/lib ]; then find usr/lib -type f -printf "\"/%h/%f\"\n" >> filelist.lst fi if [ -d usr/lib64 ]; then find usr/lib64 -type f -printf "\"/%h/%f\"\n" >> filelist.lst fi if [ -d usr/bin ]; then find usr/bin -type f -printf "\"/%h/%f\"\n" >> filelist.lst fi if [ -d usr/sbin ]; then find usr/sbin -type f -printf "\"/%h/%f\"\n" >> filelist.lst fi touch doclist.lst if [ -d usr/share/man ]; then find usr/share/man -type f -printf "\"/%h/%f.gz\"\n" >> doclist.lst fi popd mv %{buildroot}/filelist.lst . mv %{buildroot}/doclist.lst . %files -n python3-pilight -f filelist.lst %dir %{python3_sitelib}/* %files help -f doclist.lst %{_docdir}/* %changelog * Fri Jun 09 2023 Python_Bot - 0.1.1-1 - Package Spec generated