From fe5d0f64a0771c889da8d07652017637f4f599c7 Mon Sep 17 00:00:00 2001 From: Romain Hugonnet Date: Fri, 13 Oct 2023 15:50:16 -0700 Subject: [PATCH] Like this? --- .github/scripts/get_yml_env_nopy.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/scripts/get_yml_env_nopy.py b/.github/scripts/get_yml_env_nopy.py index ef212f53..fb3c9fc3 100644 --- a/.github/scripts/get_yml_env_nopy.py +++ b/.github/scripts/get_yml_env_nopy.py @@ -23,7 +23,8 @@ def environment_yml_nopy(fn_env: str, print_dep: str = "both") -> None: conda_dep_env_without_python = [dep for dep in conda_dep_env if "python" not in dep] # Put lower version into brackets for support on Windows - conda_dep_env_without_python = ['"'+dep+'"' if "<" in dep else dep for dep in conda_dep_env_without_python] + if os.name == 'nt': + conda_dep_env_without_python = ["$l".join(dep.split("<")) if "<" in dep else dep for dep in conda_dep_env_without_python] # Join the lists joined_list_conda_dep = " ".join(conda_dep_env_without_python)