blob: 0519c1f8a7588fd509b5f1697611f2858d8c48c3 [file] [log] [blame]
# Copyright 2020 The Chromium OS Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
EAPI=7
CROS_WORKON_COMMIT="dc78c968da9c044595384311f792ffd5d3e02e34"
CROS_WORKON_TREE=("50e73979e1d53ddedcd5e3da6ec5e282f644dfc2" "5b522fe7a734f572b7713363a537c69140d6b68b")
CROS_WORKON_PROJECT="chromiumos/config"
CROS_WORKON_LOCALNAME="config"
CROS_WORKON_SUBTREE="python go"
PYTHON_COMPAT=( python{3_6,3_7} )
inherit cros-workon distutils-r1
DESCRIPTION="Provides python and go bindings to the config API"
HOMEPAGE="https://chromium.googlesource.com/chromiumos/config/+/master/python/"
LICENSE="BSD-Google"
SLOT=0
KEYWORDS="*"
RDEPEND="
dev-go/genproto
"
DEPEND="
${RDEPEND}
dev-python/setuptools[${PYTHON_USEDEP}]
"
REQUIRED_USE="${PYTHON_REQUIRED_USE}"
src_unpack() {
cros-workon_src_unpack
# distutils-r1 provides src_configure, src_install and src_test steps for
# python bindings, and they require S to be set to the Python source base
# directory.
S+="/python"
}
src_install() {
distutils-r1_src_install
# cros-go_src_install requires the directory names (which is also the go
# package name) match between the source and destination directories.
# However we want to add some prefix to the destination directory name.
# source: src/config/go/api...
# destination: src/go.chromium.org/chromiumos/config/go/api/...
# Therefore insinto/doins are directly called here, instead of using
# cros-go_src_install in cros-go.eclass.
insinto /usr/lib/gopath/src/go.chromium.org/chromiumos/config
# One directory up, because $S is modified in src_unpack in this file.
doins -r ../go
}