jkitchen
jkitchen

Reputation: 1060

How do I include shell scripts in a conda recipe?

When building a conda package, meta.yaml has a section build:entry_points which lets me include executable Python scripts. Does conda have a way to include other scripts (ex. bash scripts)?

I need conda to include my bash script in the bin/ folder of my environment and make it executable.

Upvotes: 3

Views: 1273

Answers (1)

msarahan
msarahan

Reputation: 1081

In your build.sh script, do something like this:

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

Permissions should be preserved.

Edit: to explain a bit more: any files that exist in $PREFIX that were not there before the build step are considered "new" and bundled up with the package. It's a lot simpler than fighting setup.py, once you get used to it.

Upvotes: 4

Related Questions