aboutsummaryrefslogtreecommitdiffstats
path: root/recipes-framework/tensorflow/tensorflow-estimator_1.13.bb
blob: f3a5098ec173580223f6debba38fbd1469eaf368 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
DESCRIPTION = "A high-level TensorFlow API that greatly simplifies machine \
learning programming."
LICENSE = "Apache-2.0"
LIC_FILES_CHKSUM = "file://LICENSE;md5=01e86893010a1b87e69a213faa753ebd"

SRC_URI = "git://github.com/tensorflow/estimator.git;branch=r1.13 \
          "
SRCREV = "340703eed78ba4854862f749ed94f91598826e79"
S = "${WORKDIR}/git"

inherit python3native bazel

DEPENDS += " \
    python3-pip-native \
    python3-wheel-native \
    python3-six-native \
    python3-protobuf-native \
    python3-absl-native \
    python3-astor-native \
    python3-gast-native \
    python3-termcolor-native \
    tensorflow-native \
"

do_compile () {
    unset CC
    export TMPDIR="${WORKDIR}"
    ${BAZEL} build \
        --subcommands --explain=${T}/explain.log \
        --verbose_explanations --verbose_failures \
        --verbose_failures \
        --python_path="${PYTHON}" \
        //tensorflow_estimator/tools/pip_package:build_pip_package

    PYTHON_BIN_PATH="${PYTHON}" \
    ${S}/bazel-bin/tensorflow_estimator/tools/pip_package/build_pip_package \
        ${WORKDIR}/estimator_pip
}

do_install () {
    echo "Installing pip package"
    install -d ${D}${PYTHON_SITEPACKAGES_DIR}
    ${STAGING_BINDIR_NATIVE}/pip3 install --disable-pip-version-check -v --no-deps \
        -t ${D}/${PYTHON_SITEPACKAGES_DIR} --no-cache-dir ${WORKDIR}/estimator_pip/*.whl

}

FILES_${PN} += "${libdir}/*"

BBCLASSEXTEND = "native"