From 818d38f150159ecd34163c10c5d264281b46bb59 Mon Sep 17 00:00:00 2001 From: tianshuo78520a <707759223@qq.com> Date: Wed, 29 Jul 2020 14:24:16 +0800 Subject: [PATCH] Update conda_build.py for opencv dependency(#25654) --- paddle/scripts/conda_build.py | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/paddle/scripts/conda_build.py b/paddle/scripts/conda_build.py index 05c988211b1..648819c8cc3 100644 --- a/paddle/scripts/conda_build.py +++ b/paddle/scripts/conda_build.py @@ -51,6 +51,7 @@ requirements: - astor - gast>=0.3.3 - matplotlib + - opencv>=3.4.2 """ self.requirement_run_windows = r""" @@ -70,7 +71,7 @@ requirements: - gast>=0.3.3 - py-cpuinfo==5.0.0 """ - self.test = """ + self.test = r""" test: import: paddle @@ -219,9 +220,16 @@ package: - matplotlib""" if not (cuda_str == None): meta_str = meta_str + cuda_str - meta_str = meta_str + var.test + var.about + blt_str = var.blt_const + blt_var - + if (python_str == var.python27): + blt_str = blt_str + """ + pip install C:\package\opencv_python-4.2.0.32-cp27-cp27m-win_amd64.whl""" + else: + meta_str = meta_str + """ + - opencv>=3.4.2""" + + meta_str = meta_str + var.test + var.about meta_filename = "meta.yaml" build_filename = "bld.bat" with open(meta_filename, 'w') as f: -- GitLab