mirror of
https://github.com/void-linux/void-packages.git
synced 2025-06-05 06:33:50 +02:00
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'
|
# Template file for 'python-iwlib'
|
||||||
pkgname=python-iwlib
|
pkgname=python-iwlib
|
||||||
version=1.5
|
version=1.6.1
|
||||||
revision=1
|
revision=1
|
||||||
wrksrc="${pkgname/python-//}-${version}"
|
wrksrc="${pkgname/python-//}-${version}"
|
||||||
build_style=python-module
|
build_style=python-module
|
||||||
|
pycompile_module="iwlib"
|
||||||
hostmakedepends="python-setuptools python3-setuptools"
|
hostmakedepends="python-setuptools python3-setuptools"
|
||||||
makedepends="python-devel python3-devel wireless_tools-devel"
|
makedepends="python-devel python3-devel wireless_tools-devel"
|
||||||
depends="python wireless_tools"
|
depends="python wireless_tools"
|
||||||
short_desc="Iwlib library for Python2, for interacting with wireless devices"
|
short_desc="Python2 Iwlib wrapper for interacting with wireless devices"
|
||||||
maintainer="maxice8 <thinkabit.ukim@gmail.com>"
|
maintainer="Orphaned <orphan@voidlinux.eu>"
|
||||||
license="GPL-2"
|
license="GPL-2.0-only"
|
||||||
homepage="https://github.com/nathan-hoad/python-iwlib"
|
homepage="https://github.com/nathan-hoad/python-iwlib"
|
||||||
distfiles="${PYPI_SITE}/i/iwlib/iwlib-${version}.tar.gz"
|
distfiles="${PYPI_SITE}/i/iwlib/iwlib-${version}.tar.gz"
|
||||||
checksum=a58dd0da8b03bbd9c91fa0f9e7818362280bf0b7133bae0027f15581ee2e4751
|
checksum=fad120e7e36de1c84df6921333035cdaccd28b20e25ba180e9902e810e8dee21
|
||||||
pycompile_module="iwlib"
|
|
||||||
|
|
||||||
do_check() {
|
do_check() {
|
||||||
python3 test/test_imports.py
|
python3 test/test_imports.py
|
||||||
python2 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() {
|
python3-iwlib_package() {
|
||||||
|
|
Loading…
Add table
Reference in a new issue