public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Michał Górny" <mgorny@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-python/aws-xray-sdk-python/
Date: Fri, 12 Jun 2020 13:20:22 +0000 (UTC)	[thread overview]
Message-ID: <1591968018.bef44a80d439c49623978779c94925f1cb6c18f2.mgorny@gentoo> (raw)

commit:     bef44a80d439c49623978779c94925f1cb6c18f2
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Fri Jun 12 12:41:35 2020 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Fri Jun 12 13:20:18 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=bef44a80

dev-python/aws-xray-sdk-python: Enable tests

Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>

 dev-python/aws-xray-sdk-python/Manifest            |  2 +-
 .../aws-xray-sdk-python-2.6.0.ebuild               | 42 +++++++++++++++++-----
 2 files changed, 34 insertions(+), 10 deletions(-)

diff --git a/dev-python/aws-xray-sdk-python/Manifest b/dev-python/aws-xray-sdk-python/Manifest
index a5a5bfc761e..a34662f6fa4 100644
--- a/dev-python/aws-xray-sdk-python/Manifest
+++ b/dev-python/aws-xray-sdk-python/Manifest
@@ -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

diff --git a/dev-python/aws-xray-sdk-python/aws-xray-sdk-python-2.6.0.ebuild b/dev-python/aws-xray-sdk-python/aws-xray-sdk-python-2.6.0.ebuild
index 715bda323da..d378ad8cef7 100644
--- a/dev-python/aws-xray-sdk-python/aws-xray-sdk-python-2.6.0.ebuild
+++ b/dev-python/aws-xray-sdk-python/aws-xray-sdk-python-2.6.0.ebuild
@@ -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}]
+	)"
+
+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
 
-python_test() {
-	esetup.py test || die "tests failed with ${EPYTHON}"
+	distutils-r1_src_test
 }


             reply	other threads:[~2020-06-12 13:20 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-12 13:20 Michał Górny [this message]
  -- strict thread matches above, loose matches on Subject: below --
2023-05-05 13:43 [gentoo-commits] repo/gentoo:master commit in: dev-python/aws-xray-sdk-python/ Michał Górny
2023-05-05  7:39 Arthur Zamarin
2023-04-03 18:37 Arthur Zamarin
2023-01-10 14:50 Michał Górny
2022-12-21  6:46 Michał Górny
2022-12-17  7:08 Michał Górny
2022-12-16 21:22 Arthur Zamarin
2022-11-11 14:31 Michał Górny
2022-10-15 14:31 Andrew Ammerlaan
2022-08-03  7:55 Michał Górny
2022-08-02 20:27 Sam James
2022-07-01  6:53 Michał Górny
2022-06-04 17:48 Michał Górny
2022-01-28 18:41 Arthur Zamarin
2021-06-05 21:01 Michał Górny
2021-04-29  7:18 Michał Górny
2021-04-28  8:16 Michał Górny
2021-04-27 21:42 Sam James
2021-03-24 22:29 Michał Górny
2021-03-24 18:38 Michał Górny
2020-07-30 20:46 Michał Górny
2020-07-30 20:03 Sam James
2020-06-13 22:26 Zac Medico
2020-06-12 15:40 Michał Górny
2020-06-11  4:50 Zac Medico
2020-04-29  6:54 Patrick McLean
2020-02-04 13:32 Michał Górny
2019-06-25  1:57 Zac Medico
2019-06-25  1:35 Zac Medico

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1591968018.bef44a80d439c49623978779c94925f1cb6c18f2.mgorny@gentoo \
    --to=mgorny@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox