如何在 conda 配方中包含 shell 个脚本?

How do I include shell scripts in a conda recipe?

在构建 conda 包时,meta.yaml 有一个部分 build:entry_points 可以让我包含可执行的 Python 脚本。 conda 是否有办法包含其他脚本(例如 bash 脚本)?

我需要 conda 将我的 bash 脚本包含在我环境的 bin/ 文件夹中并使其可执行。

在您的 build.sh 脚本中,执行如下操作:

cp your_bash_script.sh $PREFIX/bin/destination_script_name.sh

应保留权限。

编辑:进一步解释:$PREFIX 中存在但在构建步骤之前不存在的任何文件都被视为 "new" 并与包捆绑在一起。比打架简单多了setup.py,等你习惯了