%global _empty_manifest_terminate_build 0 Name: python-pyruckus Version: 0.16 Release: 1 Summary: Python API to interact with a Ruckus Unleashed device. License: MIT URL: https://github.com/gabe565/pyruckus Source0: https://mirrors.nju.edu.cn/pypi/web/packages/7e/ed/e982ec4ad1ab8e64ca0ea709585786faba2bc4a855a150ed9d941187272e/pyruckus-0.16.tar.gz BuildArch: noarch Requires: python3-pexpect Requires: python3-slugify %description # pyruckus A Python API which interacts with a Ruckus Unleashed device. ## Setup To install the `pyruckus` package: ```sh pip3 install pyruckus ``` ## Usage Each function is defined as an [async](https://docs.python.org/3/library/asyncio.html) function, so you will have to create an event loop instead of calling the functions directly in a shell. ```python from pyruckus import Ruckus import asyncio async def test_pyruckus(): ruckus = Ruckus("", "", "") await ruckus.connect() ap_info = await ruckus.ap_info() mesh_info = await ruckus.mesh_info() system_info = await ruckus.system_info() config = await ruckus.config() clients = await ruckus.current_active_clients() wlan_info = await ruckus.wlan_info() ruckus.disconnect() loop = asyncio.get_event_loop() loop.run_until_complete(test_pyruckus()) ``` %package -n python3-pyruckus Summary: Python API to interact with a Ruckus Unleashed device. Provides: python-pyruckus BuildRequires: python3-devel BuildRequires: python3-setuptools BuildRequires: python3-pip %description -n python3-pyruckus # pyruckus A Python API which interacts with a Ruckus Unleashed device. ## Setup To install the `pyruckus` package: ```sh pip3 install pyruckus ``` ## Usage Each function is defined as an [async](https://docs.python.org/3/library/asyncio.html) function, so you will have to create an event loop instead of calling the functions directly in a shell. ```python from pyruckus import Ruckus import asyncio async def test_pyruckus(): ruckus = Ruckus("", "", "") await ruckus.connect() ap_info = await ruckus.ap_info() mesh_info = await ruckus.mesh_info() system_info = await ruckus.system_info() config = await ruckus.config() clients = await ruckus.current_active_clients() wlan_info = await ruckus.wlan_info() ruckus.disconnect() loop = asyncio.get_event_loop() loop.run_until_complete(test_pyruckus()) ``` %package help Summary: Development documents and examples for pyruckus Provides: python3-pyruckus-doc %description help # pyruckus A Python API which interacts with a Ruckus Unleashed device. ## Setup To install the `pyruckus` package: ```sh pip3 install pyruckus ``` ## Usage Each function is defined as an [async](https://docs.python.org/3/library/asyncio.html) function, so you will have to create an event loop instead of calling the functions directly in a shell. ```python from pyruckus import Ruckus import asyncio async def test_pyruckus(): ruckus = Ruckus("", "", "") await ruckus.connect() ap_info = await ruckus.ap_info() mesh_info = await ruckus.mesh_info() system_info = await ruckus.system_info() config = await ruckus.config() clients = await ruckus.current_active_clients() wlan_info = await ruckus.wlan_info() ruckus.disconnect() loop = asyncio.get_event_loop() loop.run_until_complete(test_pyruckus()) ``` %prep %autosetup -n pyruckus-0.16 %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-pyruckus -f filelist.lst %dir %{python3_sitelib}/* %files help -f doclist.lst %{_docdir}/* %changelog * Tue May 30 2023 Python_Bot - 0.16-1 - Package Spec generated