diff mbox series

[6/6] bb: Move codegen.py inside module

Message ID 20260331145319.3125456-7-rob.woolley@windriver.com
State New
Headers show
Series [1/6] bitbake: Add checks for importing bb module | expand

Commit Message

Rob Woolley March 31, 2026, 2:53 p.m. UTC
Codegen is used exclusively by bb.codeparser.PythonParser.

Move it inside the bb module to avoid exposing it externally
when installing bb as a package.

Signed-off-by: Rob Woolley <rob.woolley@windriver.com>
---
 lib/{ => bb}/codegen.py | 0
 lib/bb/codeparser.py    | 2 +-
 2 files changed, 1 insertion(+), 1 deletion(-)
 rename lib/{ => bb}/codegen.py (100%)

Comments

Richard Purdie May 2, 2026, 9:05 a.m. UTC | #1
On Tue, 2026-03-31 at 07:53 -0700, Rob Woolley via lists.openembedded.org wrote:
> Codegen is used exclusively by bb.codeparser.PythonParser.
> 
> Move it inside the bb module to avoid exposing it externally
> when installing bb as a package.
> 
> Signed-off-by: Rob Woolley <rob.woolley@windriver.com>
> ---
>  lib/{ => bb}/codegen.py | 0
>  lib/bb/codeparser.py    | 2 +-
>  2 files changed, 1 insertion(+), 1 deletion(-)
>  rename lib/{ => bb}/codegen.py (100%)

Some good news is we removed codegen.py entirely so this part of the
series is no longer needed.

Cheers,

Richard
diff mbox series

Patch

diff --git a/lib/codegen.py b/lib/bb/codegen.py
similarity index 100%
rename from lib/codegen.py
rename to lib/bb/codegen.py
diff --git a/lib/bb/codeparser.py b/lib/bb/codeparser.py
index 4f70cf7f..76e4eea2 100644
--- a/lib/bb/codeparser.py
+++ b/lib/bb/codeparser.py
@@ -25,9 +25,9 @@  recipe caches don't trigger "Taskhash mismatch" errors.
 
 import ast
 import sys
-import codegen
 import logging
 import inspect
+import bb.codegen
 import bb.pysh as pysh
 import bb.utils, bb.data
 import hashlib