summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitignore1
-rw-r--r--python-pyruckus.spec191
-rw-r--r--sources1
3 files changed, 193 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore
index e69de29..93e84cc 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1 @@
+/pyruckus-0.16.tar.gz
diff --git a/python-pyruckus.spec b/python-pyruckus.spec
new file mode 100644
index 0000000..5119ea3
--- /dev/null
+++ b/python-pyruckus.spec
@@ -0,0 +1,191 @@
+%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("<ruckus ip>", "<ruckus user>", "<ruckus password>")
+ 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("<ruckus ip>", "<ruckus user>", "<ruckus password>")
+ 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("<ruckus ip>", "<ruckus user>", "<ruckus password>")
+ 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
+* Wed May 10 2023 Python_Bot <Python_Bot@openeuler.org> - 0.16-1
+- Package Spec generated
diff --git a/sources b/sources
new file mode 100644
index 0000000..ff1f446
--- /dev/null
+++ b/sources
@@ -0,0 +1 @@
+0d55ec80d8032200d663d22b8e60cb36 pyruckus-0.16.tar.gz