diff options
author | Patrick Williams <patrick@stwcx.xyz> | 2016-11-22 20:03:57 +0300 |
---|---|---|
committer | Patrick Williams <patrick@stwcx.xyz> | 2016-11-22 21:37:57 +0300 |
commit | 2d10d8bc543b5f61fa3ba73211ec0b2b1a34b569 (patch) | |
tree | b3eef2f585c5eb77c20d13ff059c5ca012d9fcf7 /meta-phosphor/classes | |
parent | 8fc96299dfb474895cd2608c94b9799e658b0452 (diff) | |
download | openbmc-2d10d8bc543b5f61fa3ba73211ec0b2b1a34b569.tar.xz |
python-autotools: add configuration option
Allow class to be used on non-PN packages, by adding
a variable to configure which package the python path
is added to 'FILES' for.
Change-Id: I4c00e949ea71074a5b7abd36b430f90d3eb4ab51
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
Diffstat (limited to 'meta-phosphor/classes')
-rw-r--r-- | meta-phosphor/classes/obmc-phosphor-python-autotools.bbclass | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/meta-phosphor/classes/obmc-phosphor-python-autotools.bbclass b/meta-phosphor/classes/obmc-phosphor-python-autotools.bbclass index 408d15ca5..5a8e1e2f3 100644 --- a/meta-phosphor/classes/obmc-phosphor-python-autotools.bbclass +++ b/meta-phosphor/classes/obmc-phosphor-python-autotools.bbclass @@ -1,3 +1,4 @@ +inherit obmc-phosphor-utils inherit pythonnative export BUILD_SYS @@ -5,4 +6,10 @@ export HOST_SYS export STAGING_INCDIR export STAGING_LIBDIR -FILES_${PN} += "${PYTHON_SITEPACKAGES_DIR}" +PYTHON_AUTOTOOLS_PACKAGE ?= "${PN}" + +python() { + for pkg in listvar_to_list(d, 'PYTHON_AUTOTOOLS_PACKAGE'): + set_append(d, 'FILES_%s' % pkg, + d.getVar('PYTHON_SITEPACKAGES_DIR', True)) +} |