python-iwlib: update to 1.6.1.
This commit is contained in:
parent
a4f5a1d936
commit
1e5eea184f
1 changed files with 6 additions and 25 deletions
|
@ -1,42 +1,23 @@
|
|||
# Template file for 'python-iwlib'
|
||||
pkgname=python-iwlib
|
||||
version=1.5
|
||||
version=1.6.1
|
||||
revision=1
|
||||
wrksrc="${pkgname/python-//}-${version}"
|
||||
build_style=python-module
|
||||
pycompile_module="iwlib"
|
||||
hostmakedepends="python-setuptools python3-setuptools"
|
||||
makedepends="python-devel python3-devel wireless_tools-devel"
|
||||
depends="python wireless_tools"
|
||||
short_desc="Iwlib library for Python2, for interacting with wireless devices"
|
||||
maintainer="maxice8 <thinkabit.ukim@gmail.com>"
|
||||
license="GPL-2"
|
||||
short_desc="Python2 Iwlib wrapper for interacting with wireless devices"
|
||||
maintainer="Orphaned <orphan@voidlinux.eu>"
|
||||
license="GPL-2.0-only"
|
||||
homepage="https://github.com/nathan-hoad/python-iwlib"
|
||||
distfiles="${PYPI_SITE}/i/iwlib/iwlib-${version}.tar.gz"
|
||||
checksum=a58dd0da8b03bbd9c91fa0f9e7818362280bf0b7133bae0027f15581ee2e4751
|
||||
pycompile_module="iwlib"
|
||||
checksum=fad120e7e36de1c84df6921333035cdaccd28b20e25ba180e9902e810e8dee21
|
||||
|
||||
do_check() {
|
||||
python3 test/test_imports.py
|
||||
python2 test/test_imports.py
|
||||
|
||||
# The test tries to scan a interface but hardcodees 'wlan0' which is not always the name
|
||||
# so we query /proc/net/wireless and get the WiFi interface and replace the file in the test
|
||||
_wirelessinterface="$(cat /proc/net/wireless | grep : | cut -d: -f1)"
|
||||
|
||||
if [ -z "${_wirelessinterface}" ]; then
|
||||
echo "no wifi interface found for test.py, ignoring the tests"
|
||||
return
|
||||
fi
|
||||
|
||||
sed -i "s|wlan0|${_wirelessinterface}|g" test/test.py
|
||||
|
||||
PYTHONPATH="${PWD}/build-2.7/lib.linux-${XBPS_TARGET_MACHINE}-2.7" python2 test/test.py
|
||||
|
||||
# The test uses python2 print statement so we edit it
|
||||
sed -i "s|print|print(|g" test/test.py
|
||||
sed -i '/print(/s/$/ )/' test/test.py
|
||||
|
||||
PYTHONPATH="${PWD}/build-3.6/lib.linux-${XBPS_TARGET_MACHINE}-3.6" python3 test/test.py
|
||||
}
|
||||
|
||||
python3-iwlib_package() {
|
||||
|
|
Loading…
Reference in a new issue