mirror of
https://github.com/PaddlePaddle/FastDeploy.git
synced 2025-10-09 02:20:17 +08:00
[Build] Support build with source code of Paddle2ONNX (#1559)
* Add notes for tensors * Optimize some apis * move some warnings * Support build with Paddle2ONNX * Add protobuf support * Fix compile on mac * add clearn package script * Add paddle2onnx code * remove submodule * Add onnx ocde * remove softlink * add onnx code * fix error * Add cmake file * fix patchelf * update paddle2onnx * Delete .gitmodules --------- Co-authored-by: PaddleCI <paddle_ci@example.com> Co-authored-by: pangyoki <pangyoki@126.com> Co-authored-by: jiangjiajun <jiangjiajun@baidu.lcom>
This commit is contained in:
25
third_party/optimizer/tools/mypy-onnx.py
vendored
Normal file
25
third_party/optimizer/tools/mypy-onnx.py
vendored
Normal file
@@ -0,0 +1,25 @@
|
||||
#!/usr/bin/env python
|
||||
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
|
||||
import subprocess
|
||||
import os
|
||||
|
||||
|
||||
def main(): # type: () -> None
|
||||
try:
|
||||
root_folder = os.path.realpath(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
|
||||
os.chdir(root_folder)
|
||||
|
||||
subprocess.check_call(["mypy", "."])
|
||||
subprocess.check_call(["mypy", "--py2", "."])
|
||||
|
||||
exit(0)
|
||||
except subprocess.CalledProcessError:
|
||||
# Catch this exception because we don't want it to output a backtrace that would clutter the mypy output
|
||||
exit(1)
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
Reference in New Issue
Block a user