python,scons: Only generate pybind if using python

This reimplements the previously reverted change: Always generate default
create() methods.

The pybind code should only be generated when python is enabled. This
change passes whether python is enabled into the SimObject code creation
method. Then, the params code is optionally included.

Note: Due to some problems in GCC's linker (or something else...) we
need to have a single file with all of the generated code for the

Change-Id: I0f93b3d787d47f26db2de6c4447730f7df87a0dc
Signed-off-by: Jason Lowe-Power <>
Maintainer: Bobby R. Bruce <>
Tested-by: kokoro <>
Reviewed-by: Bobby R. Bruce <>
2 files changed