forked from gentoo/gentoo
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
dev-python/s3transfer: Fix for unbundled six from botocore
Signed-off-by: Michał Górny <[email protected]>
- Loading branch information
Showing
2 changed files
with
40 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
# Copyright 1999-2021 Gentoo Authors | ||
# Distributed under the terms of the GNU General Public License v2 | ||
|
||
EAPI=8 | ||
|
||
PYTHON_COMPAT=( python3_{8..10} ) | ||
inherit distutils-r1 | ||
|
||
DESCRIPTION="An Amazon S3 Transfer Manager" | ||
HOMEPAGE="https://github.com/boto/s3transfer" | ||
SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz" | ||
|
||
LICENSE="Apache-2.0" | ||
SLOT="0" | ||
KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~sparc ~x86 ~amd64-linux ~x86-linux" | ||
|
||
RDEPEND=" | ||
dev-python/botocore[${PYTHON_USEDEP}] | ||
" | ||
BDEPEND=" | ||
test? ( | ||
dev-python/mock[${PYTHON_USEDEP}] | ||
) | ||
" | ||
|
||
distutils_enable_tests pytest | ||
|
||
src_prepare() { | ||
# do not rely on bundled deps in botocore (sic!) | ||
find -name '*.py' -exec sed -i \ | ||
-e 's:from botocore[.]vendored import:import:' \ | ||
-e 's:from botocore[.]vendored[.]:from :' \ | ||
{} + || die | ||
distutils-r1_src_prepare | ||
} | ||
|
||
python_test() { | ||
epytest tests/{unit,functional} | ||
} |