Add binary properties to python_defaults and add modern_python_path_defaults

So that we can more easily enable these new flags on several
modules.

It seems you can still apply a python_defaults to a python_library
even with this change, so I didn't break it out into a separate
python_binary_defaults.

Bug: 245583294
Test: m py_dont_import_folder_of_entrypoint_test && out/host/linux-x86/testcases/py_dont_import_folder_of_entrypoint_test/x86_64/py_dont_import_folder_of_entrypoint_test
Change-Id: Iecf9c1845df4630bafdea9957eb2450c15f8596b
This commit is contained in:
Cole Faust
2022-09-26 11:34:11 -07:00
parent eb3a900c5c
commit 40c34500c4
3 changed files with 15 additions and 7 deletions

View File

@@ -31,15 +31,12 @@ func (d *Defaults) GenerateAndroidBuildActions(ctx android.ModuleContext) {
}
func defaultsFactory() android.Module {
return DefaultsFactory()
}
func DefaultsFactory(props ...interface{}) android.Module {
module := &Defaults{}
module.AddProperties(props...)
module.AddProperties(
&BaseProperties{},
&android.ProtoProperties{},
&BinaryProperties{},
)
android.InitDefaultsModule(module)