summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCoprDistGit <infra@openeuler.org>2023-05-05 08:38:10 +0000
committerCoprDistGit <infra@openeuler.org>2023-05-05 08:38:10 +0000
commit730b0f392ed8792036e98ff35b9a0355fd88d069 (patch)
treea35b049c80a5e9921f858f0d1f41f31946f6719e
parent53984dbb8c70426fca52f4b9016f9f7c5f6c225e (diff)
automatic import of python-pywifiopeneuler20.03
-rw-r--r--.gitignore1
-rw-r--r--python-pywifi.spec285
-rw-r--r--sources1
3 files changed, 287 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore
index e69de29..c6d404d 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1 @@
+/pywifi-1.1.12.tar.gz
diff --git a/python-pywifi.spec b/python-pywifi.spec
new file mode 100644
index 0000000..51b70ef
--- /dev/null
+++ b/python-pywifi.spec
@@ -0,0 +1,285 @@
+%global _empty_manifest_terminate_build 0
+Name: python-pywifi
+Version: 1.1.12
+Release: 1
+Summary: A cross-platform module for manipulating WiFi devices.
+License: MIT
+URL: https://github.com/awkman/pywifi
+Source0: https://mirrors.nju.edu.cn/pypi/web/packages/b4/83/af4c284db4a9c87af92525f1d755426e9dc04aef80be8c54b0ae6628105d/pywifi-1.1.12.tar.gz
+BuildArch: noarch
+
+
+%description
+# pywifi
+
+![](https://img.shields.io/pypi/pyversions/pywifi.svg)
+[![Build Status](https://travis-ci.com/awkman/pywifi.svg?branch=master)](https://travis-ci.com/awkman/pywifi)
+[![PyPI version](https://badge.fury.io/py/pywifi.svg)](https://badge.fury.io/py/pywifi)
+
+pywifi provides a cross-platform Python module for manipulating wireless
+interfaces.
+
+* Easy to use
+* Supports Windows and Linux
+
+## Prerequisites
+
+On Linux, you will need to run wpa_supplicant to manipulate the wifi devices,
+and then pywifi can communicate with wpa_supplicant through socket.
+
+On Windows, the [Native Wifi] component comes with Windows versions greater
+than Windows XP SP2.
+
+## Installation
+
+After installing the prerequisites listed above for your platform, you can
+use pip to install from source:
+
+ cd pywifi/
+ pip install .
+
+## Documentation
+
+For the details of pywifi, please refer to [Documentation].
+
+## Example
+
+ import pywifi
+
+ wifi = pywifi.PyWiFi()
+
+ iface = wifi.interfaces()[0]
+
+ iface.disconnect()
+ time.sleep(1)
+ assert iface.status() in\
+ [const.IFACE_DISCONNECTED, const.IFACE_INACTIVE]
+
+ profile = pywifi.Profile()
+ profile.ssid = 'testap'
+ profile.auth = const.AUTH_ALG_OPEN
+ profile.akm.append(const.AKM_TYPE_WPA2PSK)
+ profile.cipher = const.CIPHER_TYPE_CCMP
+ profile.key = '12345678'
+
+ iface.remove_all_network_profiles()
+ tmp_profile = iface.add_network_profile(profile)
+
+ iface.connect(tmp_profile)
+ time.sleep(30)
+ assert iface.status() == const.IFACE_CONNECTED
+
+ iface.disconnect()
+ time.sleep(1)
+ assert iface.status() in\
+ [const.IFACE_DISCONNECTED, const.IFACE_INACTIVE]
+
+(C) Jiang Sheng-Jhih 2019, [MIT License].
+
+[Native Wifi]: https://msdn.microsoft.com/en-us/library/windows/desktop/ms706556.aspx
+[MIT License]: https://opensource.org/licenses/MIT
+[Documentation]: https://github.com/awkman/pywifi/blob/master/DOC.md
+
+
+
+
+%package -n python3-pywifi
+Summary: A cross-platform module for manipulating WiFi devices.
+Provides: python-pywifi
+BuildRequires: python3-devel
+BuildRequires: python3-setuptools
+BuildRequires: python3-pip
+%description -n python3-pywifi
+# pywifi
+
+![](https://img.shields.io/pypi/pyversions/pywifi.svg)
+[![Build Status](https://travis-ci.com/awkman/pywifi.svg?branch=master)](https://travis-ci.com/awkman/pywifi)
+[![PyPI version](https://badge.fury.io/py/pywifi.svg)](https://badge.fury.io/py/pywifi)
+
+pywifi provides a cross-platform Python module for manipulating wireless
+interfaces.
+
+* Easy to use
+* Supports Windows and Linux
+
+## Prerequisites
+
+On Linux, you will need to run wpa_supplicant to manipulate the wifi devices,
+and then pywifi can communicate with wpa_supplicant through socket.
+
+On Windows, the [Native Wifi] component comes with Windows versions greater
+than Windows XP SP2.
+
+## Installation
+
+After installing the prerequisites listed above for your platform, you can
+use pip to install from source:
+
+ cd pywifi/
+ pip install .
+
+## Documentation
+
+For the details of pywifi, please refer to [Documentation].
+
+## Example
+
+ import pywifi
+
+ wifi = pywifi.PyWiFi()
+
+ iface = wifi.interfaces()[0]
+
+ iface.disconnect()
+ time.sleep(1)
+ assert iface.status() in\
+ [const.IFACE_DISCONNECTED, const.IFACE_INACTIVE]
+
+ profile = pywifi.Profile()
+ profile.ssid = 'testap'
+ profile.auth = const.AUTH_ALG_OPEN
+ profile.akm.append(const.AKM_TYPE_WPA2PSK)
+ profile.cipher = const.CIPHER_TYPE_CCMP
+ profile.key = '12345678'
+
+ iface.remove_all_network_profiles()
+ tmp_profile = iface.add_network_profile(profile)
+
+ iface.connect(tmp_profile)
+ time.sleep(30)
+ assert iface.status() == const.IFACE_CONNECTED
+
+ iface.disconnect()
+ time.sleep(1)
+ assert iface.status() in\
+ [const.IFACE_DISCONNECTED, const.IFACE_INACTIVE]
+
+(C) Jiang Sheng-Jhih 2019, [MIT License].
+
+[Native Wifi]: https://msdn.microsoft.com/en-us/library/windows/desktop/ms706556.aspx
+[MIT License]: https://opensource.org/licenses/MIT
+[Documentation]: https://github.com/awkman/pywifi/blob/master/DOC.md
+
+
+
+
+%package help
+Summary: Development documents and examples for pywifi
+Provides: python3-pywifi-doc
+%description help
+# pywifi
+
+![](https://img.shields.io/pypi/pyversions/pywifi.svg)
+[![Build Status](https://travis-ci.com/awkman/pywifi.svg?branch=master)](https://travis-ci.com/awkman/pywifi)
+[![PyPI version](https://badge.fury.io/py/pywifi.svg)](https://badge.fury.io/py/pywifi)
+
+pywifi provides a cross-platform Python module for manipulating wireless
+interfaces.
+
+* Easy to use
+* Supports Windows and Linux
+
+## Prerequisites
+
+On Linux, you will need to run wpa_supplicant to manipulate the wifi devices,
+and then pywifi can communicate with wpa_supplicant through socket.
+
+On Windows, the [Native Wifi] component comes with Windows versions greater
+than Windows XP SP2.
+
+## Installation
+
+After installing the prerequisites listed above for your platform, you can
+use pip to install from source:
+
+ cd pywifi/
+ pip install .
+
+## Documentation
+
+For the details of pywifi, please refer to [Documentation].
+
+## Example
+
+ import pywifi
+
+ wifi = pywifi.PyWiFi()
+
+ iface = wifi.interfaces()[0]
+
+ iface.disconnect()
+ time.sleep(1)
+ assert iface.status() in\
+ [const.IFACE_DISCONNECTED, const.IFACE_INACTIVE]
+
+ profile = pywifi.Profile()
+ profile.ssid = 'testap'
+ profile.auth = const.AUTH_ALG_OPEN
+ profile.akm.append(const.AKM_TYPE_WPA2PSK)
+ profile.cipher = const.CIPHER_TYPE_CCMP
+ profile.key = '12345678'
+
+ iface.remove_all_network_profiles()
+ tmp_profile = iface.add_network_profile(profile)
+
+ iface.connect(tmp_profile)
+ time.sleep(30)
+ assert iface.status() == const.IFACE_CONNECTED
+
+ iface.disconnect()
+ time.sleep(1)
+ assert iface.status() in\
+ [const.IFACE_DISCONNECTED, const.IFACE_INACTIVE]
+
+(C) Jiang Sheng-Jhih 2019, [MIT License].
+
+[Native Wifi]: https://msdn.microsoft.com/en-us/library/windows/desktop/ms706556.aspx
+[MIT License]: https://opensource.org/licenses/MIT
+[Documentation]: https://github.com/awkman/pywifi/blob/master/DOC.md
+
+
+
+
+%prep
+%autosetup -n pywifi-1.1.12
+
+%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-pywifi -f filelist.lst
+%dir %{python3_sitelib}/*
+
+%files help -f doclist.lst
+%{_docdir}/*
+
+%changelog
+* Fri May 05 2023 Python_Bot <Python_Bot@openeuler.org> - 1.1.12-1
+- Package Spec generated
diff --git a/sources b/sources
new file mode 100644
index 0000000..570b88f
--- /dev/null
+++ b/sources
@@ -0,0 +1 @@
+81d53b68a7150608d4fd968233a2f867 pywifi-1.1.12.tar.gz