Automatic creation of python conda packages
Quoting

It's recommended to quote variables in command arguments that might contain spaces, for example here:

tmp=$(dirname "$(conda-build --output .)")
system=$(basename "$tmp")
root_dir=$(dirname "$tmp")


The version numbers here don't contain characters that the shell would interpret, so you could drop all the single quotes. But you don't have to.


for py_version in '2.7' '3.5' '3.6'



Here again:


package_name=$(basename $(conda-build --python ${py_version} --output .))



It would be better to quote the command arguments:

package_name=$(basename "$(conda-build --python ${py_version} --output .)")


I wouldn't double-quote ${py_version} though,
because we have established earlier that it cannot possibly contain special characters.

This is fine:


package_path="${root_dir}/${py_version}/${system}/${package_name}"



But you could write simpler as:

package_path=$root_dir/$py_version/$system/$package_name


That is, the double-quoting is not necessary in variable assignments,
only in command line arguments.

This is fine:


for platform in 'osx-64' 'linux-32' 'linux-64' 'win-32' 'win-64'



But you could write more concisely as:

for platform in osx-64 linux-{32,64} win-{32,64}