diff options
| author | CoprDistGit <infra@openeuler.org> | 2023-05-29 13:43:16 +0000 | 
|---|---|---|
| committer | CoprDistGit <infra@openeuler.org> | 2023-05-29 13:43:16 +0000 | 
| commit | 143891db611728f09cd4844e26dd6fed03f20980 (patch) | |
| tree | 50cfbee36b31c9ad769611714349d1a08d85d215 /python-pilight.spec | |
| parent | b43e975e38fb10c526be3be7204b325b3c51bdb5 (diff) | |
automatic import of python-pilight
Diffstat (limited to 'python-pilight.spec')
| -rw-r--r-- | python-pilight.spec | 207 | 
1 files changed, 207 insertions, 0 deletions
diff --git a/python-pilight.spec b/python-pilight.spec new file mode 100644 index 0000000..9249be7 --- /dev/null +++ b/python-pilight.spec @@ -0,0 +1,207 @@ +%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.nju.edu.cn/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 +[](https://travis-ci.org/DavidLP/pilight) +[](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 +[](https://travis-ci.org/DavidLP/pilight) +[](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 +[](https://travis-ci.org/DavidLP/pilight) +[](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 +* Mon May 29 2023 Python_Bot <Python_Bot@openeuler.org> - 0.1.1-1 +- Package Spec generated  | 
