-
Notifications
You must be signed in to change notification settings - Fork 110
/
deploy_conda.sh
executable file
·59 lines (46 loc) · 2 KB
/
deploy_conda.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
#!/bin/bash
# Inspired by: https://gist.github.com/zshaheen/fe76d1507839ed6fbfbccef6b9c13ed9
# Download conda-build
echo "Download conda-build and anaconda-client"
#conda install -q -c anaconda conda-build
#conda install -q -c anaconda anaconda-client
#conda install -q jinja2 setuptools
# Set environmental variables
USER=sharppy
OS=$TRAVIS_OS_NAME-64
# Make the build output directory
echo "Make the build output directory"
mkdir ~/conda-bld
conda config --set anaconda_upload no
# Set the build path and the current version
export CONDA_BLD_PATH=~/conda-bld
# Build the conda recipe
echo "Build the conda recipe for Python 3.6"
conda build --python 36 conda-recipe/
# Convert the conda package to support other operating systems
echo "*** Coverting to Windows 64 ***"
conda convert -q -p win-64 -o $CONDA_BLD_PATH $CONDA_BLD_PATH/$OS/*py36*.tar.bz2
#echo "*** Coverting to Linux 64 ***"
#conda convert -q -p linux-64 -o $CONDA_BLD_PATH $CONDA_BLD_PATH/$OS/*py36*.tar.bz2
echo "*** Coverting to OS X 64 ***"
conda convert -q -p osx-64 -o $CONDA_BLD_PATH $CONDA_BLD_PATH/$OS/*py36*.tar.bz2
echo "*** LIST PACKAGES ***"
ls $CONDA_BLD_PATH
echo "Uploading Python 3.6 packages to anaconda.org"
anaconda -t $CONDA_UPLOAD_TOKEN upload -u sharppy $CONDA_BLD_PATH/*/*py36*.tar.bz2 --force
echo "Build the conda recipe for Python 3.7"
conda build --python 37 conda-recipe/
echo "*** Coverting to Windows 64 ***"
conda convert -q -p win-64 -o $CONDA_BLD_PATH $CONDA_BLD_PATH/$OS/*py37*.tar.bz2
#echo "*** Coverting to Linux 64 ***"
#conda convert -q -p linux-64 -o $CONDA_BLD_PATH $CONDA_BLD_PATH/$OS/*py37*.tar.bz2
echo "*** Coverting to OS X 64 ***"
conda convert -q -p osx-64 -o $CONDA_BLD_PATH $CONDA_BLD_PATH/$OS/*py37*.tar.bz2
echo "*** LIST PACKAGES ***"
ls $CONDA_BLD_PATH
echo "Uploading Python 3.7 packages to anaconda.org"
anaconda -t $CONDA_UPLOAD_TOKEN upload -u sharppy $CONDA_BLD_PATH/*/*py37*.tar.bz2 --force
#echo "ENDING BUILD CONDA SCRIPT EARLY BECAUSE TESTING"
#exit 0
# Upload to the conda package manager
#rm -rf ~/conda-bld