From 352fdc2d2215781807aac433b108f4e974add2f3 Mon Sep 17 00:00:00 2001 From: Pesc0 <54720203+Pesc0@users.noreply.github.com> Date: Tue, 14 Nov 2023 09:50:18 +0100 Subject: [PATCH] Add convenience scripts to install conda development environment. (#11386) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * add remaining env updates Co-authored-by: Jacob Oursland Co-authored-by: Adrián Insaurralde Avalos <36372335+adrianinsaval@users.noreply.github.com> --- conda/cmake.cmd | 1 + conda/cmake.sh | 3 +++ conda/conda-env.yaml | 3 +++ conda/environment.devenv.yml | 11 +++++------ conda/setup-environment.cmd | 10 ++++++++++ conda/setup-environment.sh | 12 ++++++++++++ 6 files changed, 34 insertions(+), 6 deletions(-) create mode 100644 conda/cmake.cmd create mode 100755 conda/cmake.sh create mode 100644 conda/setup-environment.cmd create mode 100755 conda/setup-environment.sh diff --git a/conda/cmake.cmd b/conda/cmake.cmd new file mode 100644 index 0000000000..3f63072703 --- /dev/null +++ b/conda/cmake.cmd @@ -0,0 +1 @@ +mamba run --live-stream -n freecad cmake %* diff --git a/conda/cmake.sh b/conda/cmake.sh new file mode 100755 index 0000000000..958e1a8da4 --- /dev/null +++ b/conda/cmake.sh @@ -0,0 +1,3 @@ +#!/bin/sh + +mamba run --live-stream -n freecad cmake $@ diff --git a/conda/conda-env.yaml b/conda/conda-env.yaml index 7e29d7f346..e564b8f043 100644 --- a/conda/conda-env.yaml +++ b/conda/conda-env.yaml @@ -3,3 +3,6 @@ channels: - conda-forge dependencies: - conda-devenv +- mamba==1.4.9 # NOTE: Pin to highest version supported by the devenv +- python==3.11 # dependencies. If a higher version is installed, a crash + # occurs during the downgrade process. diff --git a/conda/environment.devenv.yml b/conda/environment.devenv.yml index 15be36cc8b..aa2b3e2b7d 100644 --- a/conda/environment.devenv.yml +++ b/conda/environment.devenv.yml @@ -66,16 +66,17 @@ dependencies: - debugpy - doxygen - eigen +- fmt - freetype - gmsh - graphviz - hdf5 -- libcxx<16 +- libcxx - matplotlib - ninja - numpy - occt==7.6.3 -- openssl==3.0.* +- openssl - pcl - pip - pivy @@ -90,11 +91,9 @@ dependencies: - qt-main - qt-webengine - six -- smesh==9.9 +- smesh - swig - vtk - xerces-c - yaml-cpp -- zlib -- pip: - - ptvsd +- zlib \ No newline at end of file diff --git a/conda/setup-environment.cmd b/conda/setup-environment.cmd new file mode 100644 index 0000000000..115b7ddfa8 --- /dev/null +++ b/conda/setup-environment.cmd @@ -0,0 +1,10 @@ +:: create the conda environment as a subdirectory +call mamba env create -p .conda/freecad -f conda/conda-env.yaml + +:: add the environment subdirectory to the conda configuration +call conda config --add envs_dirs %CONDA_PREFIX%/envs +call conda config --add envs_dirs %CD%/.conda +call conda config --set env_prompt '({name})' + +:: install the FreeCAD dependencies into the environment +call mamba run --live-stream -n freecad mamba-devenv -f conda/environment.devenv.yml diff --git a/conda/setup-environment.sh b/conda/setup-environment.sh new file mode 100755 index 0000000000..b4734cd7a4 --- /dev/null +++ b/conda/setup-environment.sh @@ -0,0 +1,12 @@ +#!/bin/sh + +# create the conda environment as a subdirectory +mamba env create -p .conda/freecad -f conda/conda-env.yaml + +# add the environment subdirectory to the conda configuration +conda config --add envs_dirs $CONDA_PREFIX/envs +conda config --add envs_dirs $(pwd)/.conda +conda config --set env_prompt '({name})' + +# install the FreeCAD dependencies into the environment +mamba run --live-stream -n freecad mamba-devenv -f conda/environment.devenv.yml