File tree Expand file tree Collapse file tree 3 files changed +17
-5
lines changed Expand file tree Collapse file tree 3 files changed +17
-5
lines changed Original file line number Diff line number Diff line change 8
8
contrib_build = False
9
9
package_name = "opencv-python"
10
10
11
- if int (os .getenv ('ENABLE_CONTRIB' , 0 )) == 1 :
12
- contrib_build = True
11
+ contrib = os .getenv ('ENABLE_CONTRIB' , None )
12
+
13
+ if contrib is not None :
14
+ if int (contrib ) == 1 :
15
+ contrib_build = True
16
+ else :
17
+ try :
18
+ print ("Trying to read contrib enable flag from file..." )
19
+ with open ("contrib.enabled" ) as f :
20
+ flag = int (f .read (1 ))
21
+ if flag == 1 :
22
+ contrib_build = True
23
+ except :
24
+ pass
13
25
14
26
if contrib_build :
15
27
package_name = "opencv-contrib-python"
Original file line number Diff line number Diff line change 107
107
108
108
109
109
echo ' Begin build'
110
- make -j4
110
+ make -j2
111
111
112
112
# Moving back to opencv-python
113
113
cd ../..
Original file line number Diff line number Diff line change @@ -72,12 +72,12 @@ for PYBIN in /opt/python/cp$PYTHON_VERSION*/bin; do
72
72
73
73
if [[ $PYTHON_VERSION == 2* ]]; then
74
74
echo ' Build for Py2'
75
- (cd build; make -j5 opencv_python2)
75
+ (cd build; make -j2 opencv_python2)
76
76
fi
77
77
78
78
if [[ $PYTHON_VERSION == 3* ]]; then
79
79
echo ' Build for Py3'
80
- (cd build; make -j5 opencv_python3)
80
+ (cd build; make -j2 opencv_python3)
81
81
fi
82
82
83
83
You can’t perform that action at this time.
0 commit comments