Pre/Post link/unlink scripts
You can add scripts pre-link.sh, post-link.sh, or pre-unlink.sh (or
.bat for Windows) to the recipe, which will be run before the package is
installed, after it is installed, and before it is removed, respectively. If
these scripts exit nonzero the installation/removal will fail.
We strongly recommend that post-link (and pre-unlink) scripts should:
- be avoided whenever possible,
- not touch anything other than the files being installed,
- not write anything to stdout (or stderr), unless an error occurs,
- not depend on any installed (or to be installed) conda packages, and
- only depend on simple system tools such as
and so on.
The scripts should not write to stdout or stderr unless an error occurs, but
they may write to
$PREFIX/.messages.txt, which is shown after conda
completes all actions.
Environment variables are set in these scripts:
|The install prefix.
|The name of the package.
|The version of the package.
|The build number of the package.