From 37891e01f7540251e02bfdd0899ccd2d38606976 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= Date: Fri, 10 Feb 2023 14:02:14 +0100 Subject: [PATCH] dev-python/pyrate-limiter: Workaround stray file in site-packages MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Closes: https://bugs.gentoo.org/893818 Signed-off-by: Michał Górny --- .../pyrate-limiter-2.8.2.ebuild | 36 +++++++++++++------ 1 file changed, 25 insertions(+), 11 deletions(-) diff --git a/dev-python/pyrate-limiter/pyrate-limiter-2.8.2.ebuild b/dev-python/pyrate-limiter/pyrate-limiter-2.8.2.ebuild index 3d5ec115929c3..b8c9c6a33c68f 100644 --- a/dev-python/pyrate-limiter/pyrate-limiter-2.8.2.ebuild +++ b/dev-python/pyrate-limiter/pyrate-limiter-2.8.2.ebuild @@ -9,8 +9,14 @@ PYTHON_COMPAT=( python3_{9..11} ) inherit distutils-r1 DESCRIPTION="Python Rate-Limiter using Leaky-Bucket Algorimth Family" -HOMEPAGE="https://github.com/vutran1710/PyrateLimiter" -SRC_URI="https://github.com/vutran1710/PyrateLimiter/archive/refs/tags/v${PV}.tar.gz -> ${P}.gh.tar.gz" +HOMEPAGE=" + https://github.com/vutran1710/PyrateLimiter/ + https://pypi.org/project/pyrate-limiter/ +" +SRC_URI=" + https://github.com/vutran1710/PyrateLimiter/archive/refs/tags/v${PV}.tar.gz + -> ${P}.gh.tar.gz +" S="${WORKDIR}/PyrateLimiter-${PV}" LICENSE="MIT" @@ -22,15 +28,17 @@ RDEPEND=" dev-python/redis[${PYTHON_USEDEP}] " -BDEPEND="test? ( - dev-python/pytest-asyncio[${PYTHON_USEDEP}] - dev-python/django[${PYTHON_USEDEP}] - dev-python/django-redis[${PYTHON_USEDEP}] - dev-python/fakeredis[${PYTHON_USEDEP}] - dev-python/pytest-asyncio[${PYTHON_USEDEP}] - dev-python/pytest-xdist[${PYTHON_USEDEP}] - dev-python/pyyaml[${PYTHON_USEDEP}] -)" +BDEPEND=" + test? ( + dev-python/pytest-asyncio[${PYTHON_USEDEP}] + dev-python/django[${PYTHON_USEDEP}] + dev-python/django-redis[${PYTHON_USEDEP}] + dev-python/fakeredis[${PYTHON_USEDEP}] + dev-python/pytest-asyncio[${PYTHON_USEDEP}] + dev-python/pytest-xdist[${PYTHON_USEDEP}] + dev-python/pyyaml[${PYTHON_USEDEP}] + ) +" EPYTEST_DESELECT=( # Optional dependency redis-py-cluster not packaged @@ -46,3 +54,9 @@ EPYTEST_DESELECT=( # dev-python/myst_parser \ # dev-python/sphinxcontrib-apidoc distutils_enable_tests pytest + +src_prepare() { + # workaround installing LICENSE into site-packages + sed -i -e 's:^include:exclude:' pyproject.toml || die + distutils-r1_src_prepare +}