From dfd4989272f6f56650541febb23bccec1ff0045b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= Date: Thu, 16 Jun 2022 06:30:55 +0200 Subject: [PATCH] dev-python/Babel: Simplify the regen logic MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Rather than using any-r1 approach to the regen with "slightly wrong" BDEPEND, just do it as a part of normal phase. The end result is pretty much the same, and it avoids having to define python_check_deps(). Signed-off-by: Michał Górny --- dev-python/Babel/Babel-2.10.2.ebuild | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/dev-python/Babel/Babel-2.10.2.ebuild b/dev-python/Babel/Babel-2.10.2.ebuild index af5ed2211ba1c..02e77dc3bc66f 100644 --- a/dev-python/Babel/Babel-2.10.2.ebuild +++ b/dev-python/Babel/Babel-2.10.2.ebuild @@ -44,18 +44,16 @@ BDEPEND=" distutils_enable_sphinx docs distutils_enable_tests pytest -python_check_deps() { - if [[ ${EPYTHON} == python3.8 ]] ; then - python_has_version "dev-python/backports-zoneinfo[${PYTHON_USEDEP}]" || return 1 - fi - - python_has_version "dev-python/pytz[${PYTHON_USEDEP}]" -} - -python_configure_all() { +src_prepare() { rm babel/locale-data/*.dat || die rm babel/global.dat || die - "${EPYTHON}" scripts/import_cldr.py "${WORKDIR}"/common || die + distutils-r1_src_prepare +} + +python_configure() { + if [[ ! -f babel/global.dat ]]; then + "${EPYTHON}" scripts/import_cldr.py "${WORKDIR}"/common || die + fi } python_test() {