mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-07-25 08:58:27 -07:00
dev-python/aws-xray-sdk-python: Enable tests
Signed-off-by: Michał Górny <mgorny@gentoo.org>
This commit is contained in:
@@ -1,2 +1,2 @@
|
||||
DIST aws-xray-sdk-2.4.2.tar.gz 66737 BLAKE2B 5f062299ad28ee12d4f90bbdcb03d691fb9a5888054eae4759b9a0e916f720e71a9b9e01fd4d11106499395c5c1aa1ec90ec4874301a34657cd04b00cb5450e3 SHA512 3d12e96a54a2fc65bd6b6772b1e9cc72c09620d9a8b900780afb6c4051b88f0ada1e2da2e31bf93c37a881514e2ae79692a287a63b44845e0e2b8cb33109f81f
|
||||
DIST aws-xray-sdk-2.6.0.tar.gz 68379 BLAKE2B 6ecb47137c472dd10692f80c0478c0a9933387409a88371c7dedc0d530af82871060bf942b9442a2adb1aed81e11d71d245a12c5a48d462fd882e4962c15d93a SHA512 580853825fb2b02890d60d93d14998715fd70f0fe06b2a694e3c595cd25ff3a00081d657bbd170b247c3d88c1045f8f91ad0dae1de59342818f00fb3b3cd922f
|
||||
DIST aws-xray-sdk-python-2.6.0.gh.tar.gz 255978 BLAKE2B f43204a25027d0ec135222879bf9158aef65ba5ca948e734be0b984d8f2582741bb36d9ae0a874dffae6ffc5209e25fa1c69069c261256c3bee71a4fe717411c SHA512 17a4716467b7f6dc2912d969143e0b7c8c0b9ab15bc57f873ec415876ad2080218c3c526f4aa2c1bbf4d1caaca62eaf122c87debb45c925fd84a1bcf00ab741f
|
||||
|
||||
@@ -6,25 +6,49 @@ PYTHON_COMPAT=( python3_{6,7,8} )
|
||||
|
||||
inherit distutils-r1
|
||||
|
||||
MY_PN=${PN%-python}
|
||||
MY_P=${MY_PN}-${PV}
|
||||
DESCRIPTION="AWS X-Ray SDK for Python"
|
||||
HOMEPAGE="https://github.com/aws/aws-xray-sdk-python https://pypi.org/project/aws-xray-sdk/"
|
||||
SRC_URI="mirror://pypi/${P:0:1}/${MY_PN}/${MY_P}.tar.gz"
|
||||
SRC_URI="
|
||||
https://github.com/aws/aws-xray-sdk-python/archive/${PV}.tar.gz
|
||||
-> ${P}.gh.tar.gz"
|
||||
|
||||
LICENSE="Apache-2.0"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
|
||||
IUSE=""
|
||||
|
||||
RDEPEND=">=dev-python/botocore-1.12.122[${PYTHON_USEDEP}]
|
||||
dev-python/future[${PYTHON_USEDEP}]
|
||||
dev-python/jsonpickle[${PYTHON_USEDEP}]
|
||||
dev-python/wrapt[${PYTHON_USEDEP}]"
|
||||
DEPEND="${RDEPEND}
|
||||
dev-python/setuptools[${PYTHON_USEDEP}]"
|
||||
RESTRICT="test"
|
||||
S=${WORKDIR}/${MY_P}
|
||||
BDEPEND="
|
||||
test? (
|
||||
dev-python/bottle[${PYTHON_USEDEP}]
|
||||
dev-python/flask-sqlalchemy[${PYTHON_USEDEP}]
|
||||
dev-python/flask[${PYTHON_USEDEP}]
|
||||
dev-python/pytest-aiohttp[${PYTHON_USEDEP}]
|
||||
dev-python/webtest[${PYTHON_USEDEP}]
|
||||
)"
|
||||
|
||||
python_test() {
|
||||
esetup.py test || die "tests failed with ${EPYTHON}"
|
||||
distutils_enable_tests pytest
|
||||
|
||||
src_prepare() {
|
||||
# unpackaged deps
|
||||
rm -r tests/ext/{aiobotocore,django,pg8000,psycopg2,pymysql,pynamodb} || die
|
||||
|
||||
# TODO
|
||||
sed -i -e 's:test_external:_&:' tests/test_patcher.py || die
|
||||
# require Internet access
|
||||
rm tests/ext/aiohttp/test_client.py || die
|
||||
rm -r tests/ext/{httplib,requests} || die
|
||||
|
||||
distutils-r1_src_prepare
|
||||
}
|
||||
|
||||
src_test() {
|
||||
local -x DJANGO_SETTINGS_MODULE=tests.ext.django.app.settings
|
||||
local -x AWS_SECRET_ACCESS_KEY=fake_key
|
||||
local -x AWS_ACCESS_KEY_ID=fake_id
|
||||
|
||||
distutils-r1_src_test
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user