I packaged a pure python library using conda. It is tested to work with 2.7, 3.5 and 3.6 and should work on all three mayor operating systems.
I am quite surprised, that there is no command or option like conda-build-all
. Instead I have to build and convert manually.
So there are two questions:
Is the idea to just put the tasks into a shell script sane? It feels wrong.
Is the shell script written in a maintaineable manner?
#!/bin/sh
# ====================================================
# Please note the bug, that for conda-build the option '--output' does
# not respect the directories given by '--output-folder':
# https://github.com/conda/conda-build/issues/1957
# ====================================================
tmp=$(dirname $(conda-build --output .))
system=$(basename $tmp)
root_dir=$(dirname $tmp)
for py_version in '2.7' '3.5' '3.6'
do
package_name=$(basename $(conda-build --python ${py_version} --output .))
package_path="${root_dir}/${py_version}/${system}/${package_name}"
conda-build --no-anaconda-upload \
--python ${py_version} \
--output-folder "${root_dir}/${py_version}" .
for platform in 'osx-64' 'linux-32' 'linux-64' 'win-32' 'win-64'
do
conda-convert -p ${platform} -o "${root_dir}/${py_version}" ${package_path}
anaconda upload "${root_dir}/${py_version}/${platform}/${package_name}"
done
done
PS: Here you can find the module and the shell script.