Build your own McStas or McXtrace via conda‐forge - mccode-dev/McCode GitHub Wiki
Linux / macOS
Preparation
Get yourself a conda-environment, we recommend micromamba: "${SHELL}" <(curl -L micro.mamba.pm/install.sh)
Clone the McCode repo (or your personal fork of it): git clone https://github.com/mccode-dev/McCode/
Bootstrap conda development environment
Use the in-repo python script to create a YaML file including build- and runtime-dependencies: python ./devel/bin/mccode-create-conda-yml -n mcstas-dev > mcstas-dev.yml(Defaults are for McStas, use --help for McXtrace settings)
Create the environment: micromamba create -f mcstas-dev.yml (For some conda variants you may need conda env create...)
Activate the environment: micromamba activate mcstas-dev
Build McStas
Use the in-repo python script to build McStas from your current checkout: python ./devel/bin/mccode-build-conda(Defaults are for McStas, use --help for McXtrace settings)
Start cmd.exe and get a conda system (we recommend using micromamba):curl -L -o micromamba.exe https://github.com/mamba-org/micromamba-releases/releases/latest/download/micromamba-win-64
Set up to initialise cmd.exe for micromamba:micromamba.exe shell init --shell cmd.exe(If prompted, our recommendation is to enable long path support)
Activate the base environment and install git and python:micromamba activate base followed by micromamba install git python
Bootstrap conda development environment
Clone the McCode repo (or your personal fork of it), allowing symlink-creation in the process: git clone -c core.symlinks=true https://github.com/mccode-dev/McCode
Change directory to the git clone cd McCode
Use the in-repo python script to create a YaML file including build- and runtime-dependencies: python .\devel\bin\mccode-create-conda-yml -n mcstas-dev > mcstas-dev.yml(Defaults are for McStas, use --help for McXtrace settings)
Create and activate the environment:micromamba create -f mcstas-dev.yml followed by micromamba activate mcstas-dev (For some conda variants you may need conda env create...)
Build McStas
Use the in-repo python script to build McStas from your current checkout: python .\devel\bin\mccode-build-conda(Defaults are for McStas, use --help for McXtrace settings)