Skip to content

Commit

Permalink
dev-python/s3transfer: Fix for unbundled six from botocore
Browse files Browse the repository at this point in the history
Signed-off-by: Michał Górny <[email protected]>
  • Loading branch information
mgorny committed Nov 9, 2021
1 parent 87216a6 commit daeae28
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ SLOT="0"
KEYWORDS="amd64 arm arm64 ppc ppc64 sparc x86 ~amd64-linux ~x86-linux"

RDEPEND="
dev-python/botocore[${PYTHON_USEDEP}]
<dev-python/botocore-1.23[${PYTHON_USEDEP}]
"
BDEPEND="
test? (
Expand Down
39 changes: 39 additions & 0 deletions dev-python/s3transfer/s3transfer-0.5.0-r2.ebuild
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}
}

0 comments on commit daeae28

Please sign in to comment.