Skip to content

Instantly share code, notes, and snippets.

@jabooth
Last active August 29, 2015 14:26
Show Gist options
  • Save jabooth/7c5df9f54cbd5e7c0c8b to your computer and use it in GitHub Desktop.
Save jabooth/7c5df9f54cbd5e7c0c8b to your computer and use it in GitHub Desktop.
A little script for building and uploading pure-Python conda packages.
#! /bin/sh
#
# -- CONDAPURE - easy conda skeleton uploading --
#
# Usage: make a working dir and cd into it:
# > mkdir tmp_build && cd tmp_build
# > bash condapure.sh <pypi_package_name> <binstar_org>
#
# E.g. > bash -x condapure.sh tinys3 menpo
#
NAME=$1
ORG=$2
rm -r ./$NAME
conda skeleton pypi $NAME
conda build --python 2.7 $NAME
PACKAGE_PATH_27=`ls ~/miniconda/conda-bld/**/$NAME*-py27*.tar.bz2`
conda convert --platform all $PACKAGE_PATH_27 -o out_27
for f in out_27/**/$NAME*
do
anaconda upload -u $ORG --force $f
done
rm -r ./out_27
conda build --python 3.4 $NAME
PACKAGE_PATH_34=`ls ~/miniconda/conda-bld/**/$NAME*-py34*.tar.bz2`
conda convert --platform all $PACKAGE_PATH_34 -o out_34
for f in out_34/**/$NAME*
do
anaconda upload -u $ORG --force $f
done
rm -r ./out_34
rm -r ./$NAME
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment