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 88contrib_build = False
99package_name = "opencv-python"
1010
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
1325
1426if contrib_build :
1527 package_name = "opencv-contrib-python"
Original file line number Diff line number Diff line change 107107
108108
109109echo ' Begin build'
110- make -j4
110+ make -j2
111111
112112# Moving back to opencv-python
113113cd ../..
Original file line number Diff line number Diff line change @@ -72,12 +72,12 @@ for PYBIN in /opt/python/cp$PYTHON_VERSION*/bin; do
7272
7373 if [[ $PYTHON_VERSION == 2* ]]; then
7474 echo ' Build for Py2'
75- (cd build; make -j5 opencv_python2)
75+ (cd build; make -j2 opencv_python2)
7676 fi
7777
7878 if [[ $PYTHON_VERSION == 3* ]]; then
7979 echo ' Build for Py3'
80- (cd build; make -j5 opencv_python3)
80+ (cd build; make -j2 opencv_python3)
8181 fi
8282
8383
You can’t perform that action at this time.
0 commit comments