-
Notifications
You must be signed in to change notification settings - Fork 0
/
prepare_win_package.sh
34 lines (26 loc) · 1.1 KB
/
prepare_win_package.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
#!/usr/bin/env bash
# Script to prepare the files needed to build the conda package for the Windows environment. Note that the downloads and
# the build steps are done appveyor.yml
set -e
# make package dir
mkdir ${PKG_DIR}
# set meta.yaml programmatically
sed -i "/ version:/c\ version: \"${BLPAPI_VERSION}\"" conda-build/meta.yaml
sed -i "/ summary: Python/c\ summary: Python SDK for Bloomberg BLPAPI (with C++ ${BLPAPI_CPP_VERSION} binary included)" conda-build/meta.yaml
cat conda-build/meta.yaml
# copy the conda build files into the package directory
cp conda-build/* ${PKG_DIR}/
cd ${PKG_DIR}
# unpack the tar files into the appropriate locations
mkdir src
mv BLPAPI_LICENSE src/BLPAPI_LICENSE
mkdir src/blpapi_cpp
cd src
unzip ../../blpapi_python*.zip && mv blpapi-${BLPAPI_VERSION}/* . && rmdir blpapi-${BLPAPI_VERSION}
unzip ../../blpapi_cpp*.zip -d blpapi_cpp && mv blpapi_cpp/*/* blpapi_cpp/ && rmdir blpapi_cpp/blpapi_cpp_${BLPAPI_CPP_VERSION}
rm blpapi_cpp/bin/*.exe
rm -rf blpapi_cpp/examples
rm -rf blpapi_cpp/doc
rm -rf blpapi_cpp/blpapi_cpp_${BLPAPI_CPP_VERSION}
cd ../..;
mkdir ${BUILD_DIR}