未验证 提交 eab046c5 编写于 作者: M Måns Nilsson 提交者: GitHub

Fix create tree script to support third party outside downloads folder. (#1141)

* Fix create tree script to support third party outside downloads folder.

Change-Id: I27c3004d6f7295456c659b3bb98f94a55d95eb1b

* Fix formatting
Co-authored-by: NPauline Sho <psho@google.com>
Co-authored-by: Nmergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
上级 7578727c
# Copyright 2021 The TensorFlow Authors. All Rights Reserved.
# Copyright 2022 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
......@@ -73,11 +73,18 @@ def _third_party_src_and_dest_files(prefix_dir, makefile_options):
# directory removed. The path manipulation logic that follows removes the
# downloads directory prefix, and adds the third_party prefix to create a
# list of destination directories for each of the third party files.
# The only exception are third party files outside the downloads folder
# with absolute paths.
tflm_download_path = "tensorflow/lite/micro/tools/make/downloads"
dest_files = [
os.path.join(prefix_dir, "third_party",
os.path.relpath(f, tflm_download_path)) for f in src_files
]
dest_files = []
third_party_path = os.path.join(prefix_dir, "third_party")
for f in src_files:
if os.path.isabs(f):
dest_files.append(os.path.normpath(third_party_path + f))
else:
dest_files.append(
os.path.join(third_party_path,
os.path.relpath(f, tflm_download_path)))
return src_files, dest_files
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册