-
Notifications
You must be signed in to change notification settings - Fork 79
Expand file tree
/
Copy pathbuild_standalone_wheel.sh
More file actions
62 lines (49 loc) · 1.24 KB
/
build_standalone_wheel.sh
File metadata and controls
62 lines (49 loc) · 1.24 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
54
55
56
57
58
59
60
61
#!/bin/bash
set -e
set -u
export PIP_BIN=pip
${PIP_BIN} install wheel
if ! [ $1 ]; then
echo "must specify dir name"
exit 2;
fi
SRC_DIR=${PWD}/bundle/devsim/src/main
DIST_DIR=$1
DIST_BIN=${DIST_DIR}/bin
DIST_LIB=${DIST_DIR}/lib
DIST_PYDLL=${DIST_LIB}/devsim
DIST_VER=${DIST_DIR}
# make the bin directory and copy binary in
# we need the wrapper script for libstdc++
#cp devsim.sh ${DIST_DIR}/bin/devsim
#chmod +x ${DIST_DIR}/bin/devsim
mkdir -p ${DIST_BIN}
mkdir -p ${DIST_DIR}
mkdir -p ${DIST_PYDLL}
cp -v ${SRC_DIR}/devsim_py3.so ${DIST_PYDLL}
cp -v dist/__init__.py ${DIST_PYDLL}
mkdir -p ${DIST_DIR}/doc
cp doc/devsim.pdf ${DIST_DIR}/doc
for i in *.md NOTICE LICENSE; do
cp $i ${DIST_DIR}
done
#### Python files and the examples
for i in examples testing
do
(cd $i; git clean -f -d -x )
rsync -aqP --delete $i ${DIST_DIR}
done
rsync -aqP --delete python_packages ${DIST_PYDLL}
COMMIT=`git rev-parse --verify HEAD`
cat <<EOF > ${DIST_DIR}/VERSION
Package released as:
${DIST_VER}.tgz
Source available from:
http://github.com/devsim/devsim
commit ${COMMIT}
EOF
tar czvf ${DIST_VER}.tgz ${DIST_DIR}
cp -f dist/bdist_wheel_standalone/setup.py ${1}/
cp -f dist/bdist_wheel/setup.cfg ${1}/
(cd ${1} && ${PIP_BIN} wheel .)
(cd ${1} && mv -v *.whl ..)