@@ -8,30 +8,29 @@ ARCH=${ARCH:-$(uname -m)}
8
8
ENABLE_CONTRIB=1
9
9
ENABLE_HEADLESS=0
10
10
ENABLE_JAVA=0
11
- CWD=` pwd`
12
11
REPO=${REPO:-/ Users/ grigoryserebryakov/ Documents/ project/ python-opencv/ repos}
13
12
TMP=${TMP:-/ Users/ grigoryserebryakov/ Documents/ project/ python-opencv/ tmp}
14
13
15
14
SOURCE=https://github.com/GArik/$NAME .git
16
15
17
- if [ ! -d $REPO ]; then
18
- mkdir -p $REPO
16
+ if [ ! -d " $REPO " ]; then
17
+ mkdir -p " $REPO "
19
18
fi
20
- if [ ! -d $TMP ]; then
21
- mkdir -p $TMP
19
+ if [ ! -d " $TMP " ]; then
20
+ mkdir -p " $TMP "
22
21
fi
23
22
24
23
# getting source codes
25
- if [ ! -d $REPO /$NAME ]; then
26
- git clone --recurse-submodules $SOURCE $REPO /$NAME
24
+ if [ ! -d " $REPO /$NAME " ]; then
25
+ git clone --recurse-submodules $SOURCE " $REPO /$NAME "
27
26
else
28
- cd $REPO /$NAME
27
+ cd " $REPO /$NAME "
29
28
git pull --ff-only
30
29
git submodule update --recursive
31
30
fi
32
31
33
32
34
- cd $REPO /$NAME
33
+ cd " $REPO /$NAME "
35
34
36
35
cd opencv
37
36
42
41
cd build
43
42
CMAKE_OPTS=(
44
43
-G " Unix Makefiles"
45
- -DPYTHON3_EXECUTABLE=$( python3 $REPO /$NAME /tools/python_path.py bin)
46
- -DPYTHON3_INCLUDE_DIR=$( python3 $REPO /$NAME /tools/python_path.py include)
47
- -DPYTHON3_LIBRARY=$( python3 $REPO /$NAME /tools/python_path.py lib)
44
+ -DPYTHON3_EXECUTABLE=" $( python3 " $REPO /$NAME /tools/python_path.py" bin) "
45
+ -DPYTHON3_INCLUDE_DIR=" $( python3 " $REPO /$NAME /tools/python_path.py" include) "
46
+ -DPYTHON3_LIBRARY=" $( python3 " $REPO /$NAME /tools/python_path.py" lib) "
48
47
-DBUILD_opencv_python3=ON
49
48
-DBUILD_opencv_python2=OFF
50
49
-DOPENCV_SKIP_PYTHON_LOADER=ON
@@ -139,9 +138,9 @@ CV_MODULES=(
139
138
opencv_stitching
140
139
opencv_gapi
141
140
)
142
- for m in ${CV_MODULES[@]} ; do
143
- if make help | grep $m ; then
144
- time make -j $m
141
+ for m in " ${CV_MODULES[@]} " ; do
142
+ if make help | grep " $m " ; then
143
+ time make -j " $m "
145
144
fi
146
145
done
147
146
time make -j
@@ -150,7 +149,8 @@ time make -j
150
149
ccache -s
151
150
152
151
# Copy compiled python module and 3rd-party stuff to package
153
- cp -f lib/python3/cv2* .so $REPO /$NAME /cv2
152
+ cp -f lib/python3/cv2* .so " $REPO /$NAME /cv2"
153
+
154
154
# Copy dependencies
155
155
dep_libs=()
156
156
@@ -167,12 +167,12 @@ dep_list()
167
167
done
168
168
if [ $found -eq 0 ]; then
169
169
dep_libs+=( " $lib " )
170
- dep_list $lib
170
+ dep_list " $lib "
171
171
fi
172
172
done
173
173
}
174
174
175
- dep_list $REPO /$NAME /cv2/cv2* .so
175
+ dep_list " $REPO /$NAME /cv2/" cv2* .so
176
176
177
177
if [ ! -d " $REPO /$NAME /cv2/.dylibs" ]; then
178
178
mkdir -p " $REPO /$NAME /cv2/.dylibs"
@@ -187,7 +187,7 @@ if [ $ENABLE_HEADLESS -eq 0 ]; then
187
187
if [ ! -d " $REPO /$NAME /cv2/qt/plugins/platforms" ]; then
188
188
mkdir -p " $REPO /$NAME /cv2/qt/plugins/platforms"
189
189
fi
190
- cp /usr/local/Cellar/qt/5.15.2/plugins/platforms/libqcocoa.dylib $REPO /$NAME /cv2/qt/plugins/platforms
190
+ cp /usr/local/Cellar/qt/5.15.2/plugins/platforms/libqcocoa.dylib " $REPO /$NAME /cv2/qt/plugins/platforms"
191
191
192
192
for lib in " ${dep_libs[@]} " ; do
193
193
cp -f " $lib " " $REPO /$NAME /cv2/.dylibs"
196
196
197
197
cp -f " $REPO /$NAME /opencv/data/haarcascades/" * .xml " $REPO /$NAME /cv2/data"
198
198
# Copy licenses
199
- cp -f $REPO /$NAME /LICENSE.txt $REPO /$NAME /LICENSE-3RD-PARTY.txt $REPO /$NAME /cv2
199
+ cp -f " $REPO /$NAME /LICENSE.txt" " $REPO /$NAME /LICENSE-3RD-PARTY.txt" " $REPO /$NAME /cv2"
200
200
201
- cd $REPO /$NAME
201
+ cd " $REPO /$NAME "
202
202
# FIXME: Is there a way to package wheel without setup.py?
203
203
cp setup.py tools/setup.py.bak
204
204
cat tools/setup.py > setup.py
@@ -215,7 +215,7 @@ if [ ! -d "$TMP/testenv" ]; then
215
215
mkdir -p " $TMP /testenv"
216
216
fi
217
217
rm -rf " $TMP /testenv" /*
218
- virtualenv -p $( python3 $REPO /$NAME /tools/python_path.py bin) " $TMP /testenv"
218
+ virtualenv -p " $( python3 " $REPO /$NAME /tools/python_path.py" bin) " " $TMP /testenv"
219
219
source " $TMP /testenv/bin/activate"
220
220
pip install numpy==1.17.3
221
221
pip install ./opencv_* python* .whl
0 commit comments