forked from cztomczak/cefpython
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild_all.sh
More file actions
47 lines (35 loc) · 1.13 KB
/
build_all.sh
File metadata and controls
47 lines (35 loc) · 1.13 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
#!/bin/bash
if [ -z "$1" ]; then
echo "ERROR: Provide an argument: version number eg. 31.2"
exit 1
fi
echo "Removing old directories"
rm -rf cefpython3-*-setup/
rm -rf dist/
echo "Running make-setup.py"
python make-setup.py -v $1
if [ $? -ne 0 ]; then echo "ERROR: make-setup.py" && exit 1; fi;
setup_dirs=(cefpython3-*-setup)
setup_dir=${setup_dirs[0]}
echo "Packing setup directory to .tar.gz"
tar -zcvf $setup_dir.tar.gz $setup_dir/
if [ $? -ne 0 ]; then echo "ERROR: tar -zcvf $setup_dir..." && exit 1; fi;
echo "Moving setup.tar.gz to dist/"
mkdir dist/
mv $setup_dir.tar.gz dist/
if [ $? -ne 0 ]; then echo "ERROR: mv $setup_dir..." && exit 1; fi;
echo "Installing the wheel package"
pip install wheel
if [ $? -ne 0 ]; then echo "ERROR: pip install wheel" && exit 1; fi;
echo "Creating a Python Wheel package"
cd $setup_dir
python setup.py bdist_wheel
if [ $? -ne 0 ]; then echo "ERROR: python setup.py bdist_wheel" && exit 1; fi;
echo "Moving .whl package to dist/"
mv dist/*.whl ../dist/
if [ $? -ne 0 ]; then echo "ERROR: mv dist/*.whl..." && exit 1; fi;
cd ../
cd dist/
echo "Files in the dist/ directory:"
ls -l
echo "DONE"