[oe-commits] Christopher Larson : recipetool: add python dependency scanning support

git at git.openembedded.org git at git.openembedded.org
Fri Jan 23 11:36:54 UTC 2015


Module: openembedded-core.git
Branch: master
Commit: cb093aca3b78f130dc7da820a8710342a12d1231
URL:    http://git.openembedded.org/?p=openembedded-core.git&a=commit;h=cb093aca3b78f130dc7da820a8710342a12d1231

Author: Christopher Larson <kergoth at gmail.com>
Date:   Mon Jan 19 11:52:31 2015 -0700

recipetool: add python dependency scanning support

This uses a standalone python script named `pythondeps` which now lives in
scripts. It supports scanning for provided packages and imported
modules/packages, the latter via the python ast. It's not perfect, and
obviously conditional imports and try/except import blocks are handled
naively, listing all the imports even if they aren't all used at once, but it
gives the user a solid starting point for the recipe.

Currently `python_dir` from setup.py isn't being handled in an ideal way. This
is easily seen when testing the python-async package. There, the root of the
project is the async package, so the root has __init__.py and friends, and the
python provides scanning currently just assumes the basedir of that dir is the
package name in this case, which is not correct. Forthcoming patches will
resolve this.

Signed-off-by: Christopher Larson <kergoth at gmail.com>
Signed-off-by: Ross Burton <ross.burton at intel.com>

---

 scripts/lib/recipetool/create_buildsys_python.py | 160 +++++++++++++++
 scripts/pythondeps                               | 250 +++++++++++++++++++++++
 2 files changed, 410 insertions(+)

Diff:   http://git.openembedded.org/?p=openembedded-core.git/?a=commitdiff;h=cb093aca3b78f130dc7da820a8710342a12d1231


More information about the Openembedded-commits mailing list