]> 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)
committerSteve Sakoman <steve@sakoman.com>
Thu, 28 Jan 2021 14:41:47 +0000 (04:41 -1000)
commitab15ec860a936c527484435f141ced300b9cb9dc
tree307b80aae9287b1bdbb6042b29606f27a24433aa
parent500a7236702023920836d0ca5e93db395d9a2890
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>
(cherry picked from commit ddcc349cede0c4fe1909df1ded7b0a7c509cd758)
Signed-off-by: Steve Sakoman <steve@sakoman.com>
meta/classes/distutils3.bbclass