summaryrefslogtreecommitdiffstats
path: root/scripts/pythondeps
AgeCommit message (Collapse)Author
2022-08-12scripts: Add copyright statements to files without oneRichard Purdie
Where there isn't a copyright statement, add one to make it explicit. Also drop editor config lines where they were present and add license identifiers as MIT if there isn't one. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-05-09meta/lib+scripts: Convert to SPDX license headersRichard Purdie
This adds SPDX license headers in place of the wide assortment of things currently in our script headers. We default to GPL-2.0-only except for the oeqa code where it was clearly submitted and marked as MIT on the most part or some scripts which had the "or later" GPL versioning. The patch also drops other obsolete bits of file headers where they were encoountered such as editor modelines, obsolete maintainer information or the phrase "All rights reserved" which is now obsolete and not required in copyright headers (in this case its actually confusing for licensing as all rights were not reserved). More work is needed for OE-Core but this takes care of the bulk of the scripts and meta/lib directories. The top level LICENSE files are tweaked to match the new structure and the SPDX naming. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-16scripts: Remove deprecated imp module usageRichard Purdie
The imp module is deprecated, port the code over to use importlib as recently done for bb.utils as well. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-06-02scripts: python3: change python to python3 in shebangEd Bartosh
Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-06-02scripts: Fix deprecated dict methods for python3Ed Bartosh
Replaced iteritems -> items, itervalues -> values, iterkeys -> keys or 'in' Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
2015-01-23recipetool: add python dependency scanning supportChristopher Larson
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@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com>