-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathrequirements.extra
84 lines (75 loc) · 3.16 KB
/
requirements.extra
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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
#!/bin/bash
#----------------------------------------------------------------------------
shopt -s globstar
# Determine which extra dependencies need to be installed
EXTRAS=$1
if [ $EXTRAS = 1 ]; then
# Install pysat, which currently is not vetted for Windows.
# Although older ocbpy work with pysat >= 2.0.0, the testing suite is not
# provided in versions below 2.2.1 and the custom function interface
# changed in pysat 3.0.0
pip install pysat>=3.0.1
mkdir $HOME/pysatData
python -c "import pysat; pysat.params['data_dirs'] = '$HOME/pysatData'"
echo "Installed pysat"
elif [ $EXTRAS = 2 ]; then
# Install code for ssj_auroral_boundary on linux
#
# Get CDF software and install it
wget https://spdf.gsfc.nasa.gov/pub/software/cdf/dist/cdf38_0/linux/cdf38_0-dist-cdf.tar.gz
tar xzf cdf38_0-dist-cdf.tar.gz
make OS=linux ENV=gnu -C cdf38_0-dist/ all
make INSTALLDIR=$HOME -C cdf38_0-dist/ install
# Running this command for definitions will break matplotlib
# . $HOME/bin/definitions.B
# Define environment variables in the .yml file
# Install the python requirements
pip install scipy matplotlib h5py networkx ffnet ephem spacepy colorlog
pip install zenodo_get
pip install git+https://github.com/lkilcommons/geospacepy-lite.git@master
pip install git+https://github.com/lkilcommons/ssj_auroral_boundary@master
echo "CDF library is installed here: " $CDF_LIB
echo "Finished extra installs for SSJ_Auroral_Boundary"
elif [ $EXTRAS -ge 32 ]; then
# Download ffnet and CDF using curl
choco install curl
# Download and install CDF. ffnet is not needed.
# This will need to be updated for version number and python version number
# in the future
declare -a EXE_FILE=("cdf37_1_0-setup-$EXTRAS.exe")
declare -a SOURCE=("https://spdf.sci.gsfc.nasa.gov/pub/software/cdf/dist/cdf37_1/windows/")
for cind in ${!EXE_FILE[@]}; do
curl.exe -o ${EXE_FILE[$cind]} ${SOURCE[$cind]}${EXE_FILE[$cind]}
if [ -f ${EXE_FILE[$cind]} ]; then
# This doesn't actually work, for some reason
echo "RUN COMMAND: ${EXE_FILE[$cind]} /install /q1"
start /wait "" ${EXE_FILE[$cind]} /install /q1
else
echo "Curl failure downloading " $APPVERYOR_BUILD_FOLDER\\${EXE_FILE[$cind]}
fi
done
# Install code for ssj_auroral_boundary on windows (EXTRAS is 32 or 64)
$PYTHON\\python.exe -m pip install wheel scipy matplotlib networkx h5py
$PYTHON\\python.exe -m pip install ephem spacepy colorlog zenodo_get
$PYTHON\\python.exe -m pip install git+https://github.com/lkilcommons/geospacepy-lite.git@master
$PYTHON\\python.exe -m pip install git+https://github.com/lkilcommons/ssj_auroral_boundary@master
echo "CDF library is installed here: " $CDF_LIB
ls $CDF_LIB
echo "TEST TO FIND WHERE CDF IS INSTALLED"
IFS=":"
read -a list <<< "$PATH"
for ll in ${list[@]}; do
llist=($ll/**)
if [[ "$ll" == *"cdf"* ]]; then
echo "CDF LOCATION? " $ll
fi
for lll in ${llist[@]}; do
if [ -d $lll ]; then
if [[ "$lll" == *"cdf"* ]]; then
echo "CDF LOCATION? " $lll
fi
fi
done
done
echo "Finished extra installs for SSJ_Auroral_Boundary"
fi