Skip to content

Commit

Permalink
Apply restyled
Browse files Browse the repository at this point in the history
  • Loading branch information
agners committed Jun 29, 2022
1 parent fef95ce commit 8ab5d22
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 19 deletions.
33 changes: 17 additions & 16 deletions src/controller/python/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -129,15 +129,16 @@ template("chip_python_wheel_action") {
{
src_dir = rebase_path(_manifest_entry.src_dir,
get_path_info(_py_manifest_file, "dir"))
sources = rebase_path(_manifest_entry.sources, _manifest_entry.src_dir)
sources =
rebase_path(_manifest_entry.sources, _manifest_entry.src_dir)
},
]
}

if (defined(invoker.py_scripts)) {
_py_scripts = invoker.py_scripts
} else {
_py_scripts = [ ]
_py_scripts = []
}

_py_manifest = {
Expand Down Expand Up @@ -176,7 +177,6 @@ template("chip_python_wheel_action") {
}

chip_python_wheel_action("chip-core") {

py_manifest_files = [
{
src_dir = "."
Expand Down Expand Up @@ -265,9 +265,7 @@ chip_python_wheel_action("chip-core") {
]

if (!chip_controller) {
py_packages += [
"chip.server",
]
py_packages += [ "chip.server" ]
}

py_package_reqs = [
Expand All @@ -277,13 +275,16 @@ chip_python_wheel_action("chip-core") {
"rich",
"pyyaml",
"ipdb",
"deprecation"
"deprecation",
]

if (current_os == "mac") {
py_package_reqs += [ "pyobjc-framework-corebluetooth" ]
} else if (current_os == "linux") {
py_package_reqs += [ "dbus-python", "pygobject" ]
py_package_reqs += [
"dbus-python",
"pygobject",
]
}

if (current_cpu == "x64") {
Expand All @@ -297,7 +298,8 @@ chip_python_wheel_action("chip-core") {
}

if (current_os == "mac") {
py_platform_tag = "macosx_" + string_replace(mac_deployment_target, ".", "_")
py_platform_tag =
"macosx_" + string_replace(mac_deployment_target, ".", "_")
} else {
py_platform_tag = current_os
}
Expand Down Expand Up @@ -347,9 +349,7 @@ chip_python_wheel_action("chip-clusters") {
"chip.tlv",
]

py_package_reqs = [
"dacite",
]
py_package_reqs = [ "dacite" ]

py_package_name = "chip-clusters"
py_platform_tag = "any"
Expand All @@ -366,9 +366,7 @@ chip_python_wheel_action("chip-repl") {
py_manifest_files = [
{
src_dir = "."
sources = [
"chip/ChipReplStartup.py",
]
sources = [ "chip/ChipReplStartup.py" ]
sources += py_scripts
},
{
Expand Down Expand Up @@ -399,7 +397,10 @@ chip_python_wheel_action("chip-repl") {
py_package_name = "chip-repl"
py_platform_tag = "any"

data_deps = [ ":chip-core", ":chip-clusters" ]
data_deps = [
":chip-clusters",
":chip-core",
]

output_name = "chip_repl-${chip_python_version}-py3-any.whl"
}
6 changes: 3 additions & 3 deletions src/controller/python/build-chip-wheel.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ def __init__(self, name):
os.makedirs(os.path.dirname(dstFile), exist_ok=True)
shutil.copyfile(srcFile, dstFile)

installScripts = [ InstalledScriptInfo(script) for script in manifest['scripts'] ]
installScripts = [InstalledScriptInfo(script) for script in manifest['scripts']]
for script in installScripts:
os.rename(os.path.join(tmpDir, script.name),
os.path.join(tmpDir, script.installName))
Expand Down Expand Up @@ -145,7 +145,7 @@ def finalize_options(self):
packages[0]: [
libName
]
} if libName else { },
} if libName else {},
scripts=[name for name in map(
lambda script: os.path.join(tmpDir, script.installName),
installScripts
Expand All @@ -166,7 +166,7 @@ def finalize_options(self):
},
cmdclass={
'bdist_wheel': bdist_wheel_override
} if libName else { },
} if libName else {},
script_args=['clean', '--all', 'bdist_wheel']
)

Expand Down

0 comments on commit 8ab5d22

Please sign in to comment.