mctools / simplebuild

A very simple to use build system for projects with primarily C++/Python code, intended for usage by scientific developers without a strong SW-engineering background.
https://mctools.github.io/simplebuild/
Apache License 2.0
3 stars 1 forks source link

Add conda env files + bashrc snippets. #17

Closed tkittel closed 9 months ago

tkittel commented 11 months ago

We need to provide example conda .yml files (also for simplebuild-dgcode) as well as make sure the following bash snippet is advertised for the ergonomics (they work since bash functions has precedence over PATH items):

function simplebuild()
{
    real_sb_cmd=$(which unwrapped_simplebuild 2>/dev/null) || ( echo "error: simplebuild not available" 1>&2 ; return 1 )
    if [ $? == 0 -a "x${real_sb_cmd}" != "x" ]; then
        "${real_sb_cmd}" "$@" && eval "$(${real_sb_cmd} --env-setup)"
    fi
    unset real_sb_cmd
}
function sb() { simplebuild "$@"; }
tkittel commented 11 months ago

Related to #10

tkittel commented 10 months ago

Another issue that I just experienced: Switching between two different bundle dirs and invoking sb with the bash snippet activated, should give the correct environment each time. We should also add a unit test for this.

tkittel commented 9 months ago

Done, except the issue in the previous comment.

tkittel commented 9 months ago

Added separate issue to track the last item, closing here.