-
Notifications
You must be signed in to change notification settings - Fork 28
Expand file tree
/
Copy pathpackage-python.sh
More file actions
executable file
·53 lines (43 loc) · 1.2 KB
/
package-python.sh
File metadata and controls
executable file
·53 lines (43 loc) · 1.2 KB
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
#!/usr/bin/env bash
#
# Compile and install Python QuickFIX package. Default behavior uploads to PyPI.
# Use -d optional argument for local installation only
#
# Usage:
# bash package-python.sh [-d]
PRODUCTION=0
while getopts "d" opt; do
case $opt in
d)
PRODUCTION=1
;;
\?)
echo "Invalid option: -$OPTARG" >&2
exit 1
;;
esac
done
rm -rf quickfix-python/C++
rm -rf quickfix-python/spec
rm -rf quickfix-python/quickfix*.py
rm -rf quickfix-python/doc
rm -rf quickfix-python/LICENSE
mkdir quickfix-python/C++
mkdir quickfix-python/spec
cp quickfix/LICENSE quickfix-python
cp quickfix/src/python/*.py quickfix-python
cp quickfix/src/C++/*.h quickfix-python/C++
cp quickfix/src/C++/*.hpp quickfix-python/C++
cp quickfix/src/C++/*.cpp quickfix-python/C++
cp quickfix/src/python/QuickfixPython.cpp quickfix-python/C++
cp quickfix/src/python/QuickfixPython.h quickfix-python/C++
cp quickfix/spec/FIX*.xml quickfix-python/spec
touch quickfix-python/C++/config.h
touch quickfix-python/C++/config_windows.h
rm -f quickfix-python/C++/stdafx.*
pushd quickfix-python
if [ "$PRODUCTION" -eq "0" ]; then
python setup.py sdist upload -r pypi
else
python setup.py install
fi