Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 686658 - >=dev-libs/icu-64 should have BDEPEND on python3
Summary: >=dev-libs/icu-64 should have BDEPEND on python3
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All All
: Normal normal (vote)
Assignee: Gentoo Office Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-05-24 11:32 UTC by Deniss Gaplevsky
Modified: 2019-05-25 21:58 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
Patch (icu.patch,2.55 KB, patch)
2019-05-24 23:19 UTC, Arfrever Frehtes Taifersar Arahesis
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Deniss Gaplevsky 2019-05-24 11:32:35 UTC
dev-libs/icu-64.2.ebuild cannot be build with no python3 installed.
dev-libs/icu-64.2.ebuild should explicitly require python3 via PYTHON_COMPAT

Reproducible: Always

Steps to Reproduce:
1. remove python3 
2. try to install dev-libs/icu

Actual Results:  
build file with
Spawning Python to generate test/testdata/rules.mk...
python3: no python-exec wrapped executable found in /usr/lib/python-exec.
configure: error: Python failed to run; see above error.


Expected Results:  
dev-libs/icu should require python3 to be installed via PYTHON_COMPAT or similar  method
Comment 1 Arfrever Frehtes Taifersar Arahesis 2019-05-24 23:07:52 UTC
http://site.icu-project.org/download/63 says:
"Warning for Python 3: ICU 64 will require Python 3 for data build.  The warning will become an error in ICU 64."

http://site.icu-project.org/download/64 says:
"Despite the warning from the ICU 63 build, ICU 64 does not yet require Python 3 for building its data files. This requirement has been postponed to a future release."


configure.ac of ICU 64.2 contains:
"""
# TODO(ICU-20301): Remove fallback to Python 2.
AC_CHECK_PROGS(PYTHON, python3 "py -3" python "py")
AC_SUBST(PYTHON)
"""

So Python 3 is preferred but there is some fallback to Python 2.
Python 3 is widely available, so not supporting Python 2 in dev-libs/icu ebuilds will not be a problem.


configure.ac of ICU 64.2 contains:
"""
if test -z "$PYTHON";
then
    echo "" > data/rules.mk
    echo "" > test/testdata/rules.mk
else
    if test -f "$srcdir/data/locales/root.txt";
    then
        echo "Spawning Python to generate data/rules.mk..."
        PYTHONPATH="$srcdir/data" $PYTHON -m buildtool \
            --mode gnumake \
            --seqmode parallel \
            --src_dir "$srcdir/data" \
            --filter_file "$ICU_DATA_FILTER_FILE" \
            $ICU_DATA_BUILDTOOL_OPTS \
            > data/rules.mk
        if test "$?" != "0"; then
            AC_MSG_ERROR(Python failed to run; see above error.)
        fi
    else
      echo "Not rebuilding data/rules.mk, assuming prebuilt data in data/in"
      touch data/rules.mk
    fi
    echo "Spawning Python to generate test/testdata/rules.mk..."
    PYTHONPATH="$srcdir/test/testdata:$srcdir/data" $PYTHON -m buildtool \
        --mode gnumake \
        --seqmode parallel \
        --src_dir "$srcdir/test/testdata" \
        > test/testdata/rules.mk
    if test "$?" != "0"; then
        AC_MSG_ERROR(Python failed to run; see above error.)
    fi
fi
"""

This might seem like Python is optional with FEATURES="-test", but actually prebuilt data in data/in directory are distributed only for little-endian architectures (icudt64l.dat). Effectively Python is unconditionally required for big-endian architectures.
Comment 2 Arfrever Frehtes Taifersar Arahesis 2019-05-24 23:19:57 UTC
Created attachment 577734 [details, diff]
Patch
Comment 3 Larry the Git Cow gentoo-dev 2019-05-25 21:58:01 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=07188077c30eed8ba772b325af3c58017d9d6f0b

commit 07188077c30eed8ba772b325af3c58017d9d6f0b
Author:     Arfrever Frehtes Taifersar Arahesis <Arfrever@Apache.Org>
AuthorDate: 2019-05-24 23:17:31 +0000
Commit:     Andreas Sturmlechner <asturm@gentoo.org>
CommitDate: 2019-05-25 21:47:40 +0000

    dev-libs/icu: Add dependency on Python 3
    
    Move app-doc/doxygen to BDEPEND.
    
    Closes: https://bugs.gentoo.org/686658
    Signed-off-by: Arfrever Frehtes Taifersar Arahesis <Arfrever@Apache.Org>
    Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>

 dev-libs/icu/icu-64.2.ebuild | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)