From 4787402a0ab57fcc0119817d7534dda91a5b16dc Mon Sep 17 00:00:00 2001
From: Andre Anjos <andre.dos.anjos@gmail.com>
Date: Wed, 4 Aug 2021 17:45:47 +0200
Subject: [PATCH] [scripts.create] Remove useless conda warnings

---
 bob/devtools/scripts/create.py | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/bob/devtools/scripts/create.py b/bob/devtools/scripts/create.py
index 9d0c4450..2eec5814 100644
--- a/bob/devtools/scripts/create.py
+++ b/bob/devtools/scripts/create.py
@@ -3,6 +3,7 @@
 
 import os
 import sys
+import warnings
 
 import click
 import yaml
@@ -259,10 +260,13 @@ def create(
     )
 
     conda_config = make_conda_config(config, python, append_file, condarc_options)
-    deps = parse_dependencies(recipe_dir, conda_config)
-    # when creating a local development environment, remove the always_yes
-    # option
+    with warnings.catch_warnings():
+        warnings.simplefilter("ignore")
+        # conda parsing will raise a warning about splitting build/test phases
+        # which is pretty annoying - this will take care of it.
+        deps = parse_dependencies(recipe_dir, conda_config)
 
+    # when creating a local development environment, remove the always_yes option
     del condarc_options["always_yes"]
     conda_create(conda, name, overwrite, condarc_options, deps, dry_run, use_local)
 
-- 
GitLab