]> code.ossystems Code Review - openembedded-core.git/commit
distutils3: allow setup.py to be run from a different directory to ${S}
authorJack Mitchell <ml@embed.me.uk>
Tue, 8 Dec 2020 16:03:14 +0000 (16:03 +0000)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Tue, 15 Dec 2020 22:45:23 +0000 (22:45 +0000)
commitddcc349cede0c4fe1909df1ded7b0a7c509cd758
treea10c7fe4e5a1051203c6233b0bd651b42a0f7e1b
parent12dc4aa883d2cc49d27218834b0b6397e69c2a1c
distutils3: allow setup.py to be run from a different directory to ${S}

Sometimes setup.py can be buried deep in a source tree. This has
traditionally been solved with setting S to the subdirectory in
the source. However with the new pseudo changes, some python modules
make changes to files beneath ${S}, for example:

S = "${WORKDIR}/git/python/pythonmodule"

then in setup.py it works with source code in a relative fashion, such
as:

../../src

This causes pseudo to abort as it isn't tracking the paths. Therefore
implement the variable DISTUTILS_SETUP_PATH so that recipes can use:

S = "${WORKDIR}/git"
DISTUTILS_SETUP_PATH = "${S}/python/pythonmodule"

inherit distutils3

This allows the full source tree to be monitored, while distutils
can run setup.py from a location other than ${S}.

Signed-off-by: Jack Mitchell <ml@embed.me.uk>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/classes/distutils3.bbclass