python3-PyFxA: fix tests

Also, needs setuptools for the entry point.
This commit is contained in:
Alessio Sergi 2018-10-15 19:37:53 +02:00
parent 60196bc835
commit cd850d3427
1 changed files with 15 additions and 7 deletions

View File

@ -1,18 +1,17 @@
# Template file for 'python3-PyFxA'
pkgname=python3-PyFxA
version=0.6.0
revision=1
revision=2
noarch=yes
wrksrc="PyFxA-${version}"
build_style=python3-module
pycompile_module="fxa"
hostmakedepends="python3-setuptools"
depends="python3-cryptography python3-six python3-requests python3-hawkauthlib
python3-PyBrowserID"
# Missing packages from dev-requirements.txt
# grequests pyotp responses
checkdepends="$depends python3-requests python3-greenlet python3-pbr"
short_desc="Firefox Accounts client library for Python3"
depends="python3-setuptools python3-cryptography python3-six python3-requests
python3-hawkauthlib python3-PyBrowserID"
# Missing package: responses
checkdepends="$depends"
short_desc="Python3 library for interacting with Firefox Accounts"
maintainer="maxice8 <thinkabit.ukim@gmail.com>"
license="MPL-2.0"
homepage="https://github.com/mozilla/PyFxA"
@ -20,5 +19,14 @@ distfiles="${PYPI_SITE}/P/PyFxA/PyFxA-${version}.tar.gz"
checksum=d511b6f43a9445587c609a138636d378de76661561116e1f4259fcec9d09b42b
do_check() {
# gevent/grequests test is limited to Python 2 by upstream
sed -i '/mock/d;/unittest2/d;/grequests/d' dev-requirements.txt
# use Python 3's mock
sed -i 's/import mock/import unittest.mock as mock/' fxa/tests/mock_utilities.py
# requires network access
rm -f fxa/tests/test_core.py
python3 setup.py test
}