Skip to content

Commit d3580ef

Browse files
committed
merge 3.4 changes
2 parents f33e65d + 7d1e48c commit d3580ef

File tree

5 files changed

+32
-104
lines changed

5 files changed

+32
-104
lines changed

.travis.yml

+28-97
Original file line numberDiff line numberDiff line change
@@ -32,32 +32,6 @@ jobs:
3232
exclude:
3333
- language: ruby
3434
include:
35-
- os: osx
36-
env:
37-
- MB_PYTHON_VERSION=3.8
38-
language: generic
39-
osx_image: xcode9.4
40-
stage: s1
41-
workspaces:
42-
create:
43-
name: brew_cache
44-
paths:
45-
# https://stackoverflow.com/questions/39930171/cache-brew-builds-with-travis-ci
46-
- $HOME/Library/Caches/Homebrew
47-
- /usr/local/Homebrew/
48-
# used in OSX custom build script dealing with local bottle caching
49-
- $HOME/local_bottle_metadata
50-
#workspaces share within the same build, cache shares between builds
51-
cache:
52-
directories:
53-
# `cache: ccache: true` has no effect if `language:` is not `c` or `cpp`
54-
- $HOME/.ccache
55-
# https://stackoverflow.com/questions/39930171/cache-brew-builds-with-travis-ci
56-
- $HOME/Library/Caches/Homebrew
57-
- /usr/local/Homebrew/
58-
# used in OSX custom build script dealing with local bottle caching
59-
- $HOME/local_bottle_metadata
60-
6135
# source distributions
6236
- os: linux
6337
stage: s1
@@ -111,8 +85,7 @@ jobs:
11185
- ENABLE_CONTRIB=0
11286
- ENABLE_HEADLESS=0
11387
- TEST_DEPENDS=numpy==1.13.3
114-
workspaces:
115-
use: brew_cache
88+
11689
- os: osx
11790
language: generic
11891
osx_image: xcode9.4
@@ -121,8 +94,7 @@ jobs:
12194
- ENABLE_CONTRIB=0
12295
- ENABLE_HEADLESS=0
12396
- TEST_DEPENDS=numpy==1.14.5
124-
workspaces:
125-
use: brew_cache
97+
12698
- os: osx
12799
language: generic
128100
osx_image: xcode9.4
@@ -131,8 +103,7 @@ jobs:
131103
- ENABLE_CONTRIB=0
132104
- ENABLE_HEADLESS=0
133105
- TEST_DEPENDS=numpy==1.17.3
134-
workspaces:
135-
use: brew_cache
106+
136107
- os: osx
137108
language: generic
138109
osx_image: xcode9.4
@@ -141,8 +112,7 @@ jobs:
141112
- ENABLE_CONTRIB=0
142113
- ENABLE_HEADLESS=0
143114
- TEST_DEPENDS=numpy==1.19.3
144-
workspaces:
145-
use: brew_cache
115+
146116

147117
# headless builds for MacOS
148118
- os: osx
@@ -153,8 +123,7 @@ jobs:
153123
- ENABLE_CONTRIB=0
154124
- ENABLE_HEADLESS=1
155125
- TEST_DEPENDS=numpy==1.13.3
156-
workspaces:
157-
use: brew_cache
126+
158127
- os: osx
159128
language: generic
160129
osx_image: xcode9.4
@@ -163,8 +132,7 @@ jobs:
163132
- ENABLE_CONTRIB=0
164133
- ENABLE_HEADLESS=1
165134
- TEST_DEPENDS=numpy==1.14.5
166-
workspaces:
167-
use: brew_cache
135+
168136
- os: osx
169137
language: generic
170138
osx_image: xcode9.4
@@ -173,8 +141,7 @@ jobs:
173141
- ENABLE_CONTRIB=0
174142
- ENABLE_HEADLESS=1
175143
- TEST_DEPENDS=numpy==1.17.3
176-
workspaces:
177-
use: brew_cache
144+
178145
- os: osx
179146
language: generic
180147
osx_image: xcode9.4
@@ -183,8 +150,7 @@ jobs:
183150
- ENABLE_CONTRIB=0
184151
- ENABLE_HEADLESS=1
185152
- TEST_DEPENDS=numpy==1.19.3
186-
workspaces:
187-
use: brew_cache
153+
188154

189155
# Contrib builds for MacOS
190156
- os: osx
@@ -195,8 +161,7 @@ jobs:
195161
- ENABLE_CONTRIB=1
196162
- ENABLE_HEADLESS=0
197163
- TEST_DEPENDS=numpy==1.13.3
198-
workspaces:
199-
use: brew_cache
164+
200165
- os: osx
201166
language: generic
202167
osx_image: xcode9.4
@@ -205,8 +170,7 @@ jobs:
205170
- ENABLE_CONTRIB=1
206171
- ENABLE_HEADLESS=0
207172
- TEST_DEPENDS=numpy==1.14.5
208-
workspaces:
209-
use: brew_cache
173+
210174
- os: osx
211175
language: generic
212176
osx_image: xcode9.4
@@ -215,8 +179,7 @@ jobs:
215179
- ENABLE_CONTRIB=1
216180
- ENABLE_HEADLESS=0
217181
- TEST_DEPENDS=numpy==1.17.3
218-
workspaces:
219-
use: brew_cache
182+
220183
- os: osx
221184
language: generic
222185
osx_image: xcode9.4
@@ -225,8 +188,7 @@ jobs:
225188
- ENABLE_CONTRIB=1
226189
- ENABLE_HEADLESS=0
227190
- TEST_DEPENDS=numpy==1.19.3
228-
workspaces:
229-
use: brew_cache
191+
230192

231193
# headless contrib builds for MacOS
232194
- os: osx
@@ -237,8 +199,7 @@ jobs:
237199
- ENABLE_CONTRIB=1
238200
- ENABLE_HEADLESS=1
239201
- TEST_DEPENDS=numpy==1.13.3
240-
workspaces:
241-
use: brew_cache
202+
242203
- os: osx
243204
language: generic
244205
osx_image: xcode9.4
@@ -247,8 +208,7 @@ jobs:
247208
- ENABLE_CONTRIB=1
248209
- ENABLE_HEADLESS=1
249210
- TEST_DEPENDS=numpy==1.14.5
250-
workspaces:
251-
use: brew_cache
211+
252212
- os: osx
253213
language: generic
254214
osx_image: xcode9.4
@@ -257,8 +217,7 @@ jobs:
257217
- ENABLE_CONTRIB=1
258218
- ENABLE_HEADLESS=1
259219
- TEST_DEPENDS=numpy==1.17.3
260-
workspaces:
261-
use: brew_cache
220+
262221
- os: osx
263222
language: generic
264223
osx_image: xcode9.4
@@ -267,8 +226,7 @@ jobs:
267226
- ENABLE_CONTRIB=1
268227
- ENABLE_HEADLESS=1
269228
- TEST_DEPENDS=numpy==1.19.3
270-
workspaces:
271-
use: brew_cache
229+
272230

273231
# default builds for Linux
274232
- os: linux
@@ -925,20 +883,6 @@ before_install: |
925883
echo $ENABLE_CONTRIB > contrib.enabled
926884
echo $ENABLE_HEADLESS > headless.enabled
927885
928-
if [ -n "$IS_OSX" ]; then
929-
export PATH="/usr/local/sbin:$PATH"
930-
TAPS="$(brew --repository)/Library/Taps"
931-
if [ -e "$TAPS/caskroom/homebrew-cask" -a -e "$TAPS/homebrew/homebrew-cask" ]; then
932-
rm -rf "$TAPS/caskroom/homebrew-cask"
933-
fi
934-
find "$TAPS" -type d -name .git -exec \
935-
bash -xec '
936-
cd $(dirname '\''{}'\'') || echo "status: $?"
937-
git clean -fxd || echo "status: $?"
938-
sleep 1 || echo "status: $?"
939-
git status || echo "status: $?"' \; || echo "status: $?"
940-
brew_cache_cleanup
941-
fi
942886
echo "end"
943887
# Not interested in travis internal scripts' output
944888
fi
@@ -975,21 +919,6 @@ script: |
975919
trap ERR
976920
test "$rc" -eq 0
977921
978-
before_cache: |
979-
# Cleanup dirs to be cached
980-
set -e; set -x
981-
if [ -n "$IS_OSX" ]; then
982-
983-
# When Taps is cached, this dir causes "Error: file exists" on `brew update`
984-
if [ -e "$(brew --repository)/Library/Taps/homebrew/homebrew-cask/homebrew-cask" ]; then
985-
rm -rf "$(brew --repository)/Library/Taps/homebrew/homebrew-cask/homebrew-cask"
986-
fi
987-
988-
brew_cache_cleanup
989-
990-
fi
991-
set +x; set +e
992-
993922
after_success: |
994923
# Upload wheels to pypi if tag is set
995924
@@ -1042,18 +971,20 @@ after_success: |
1042971
1043972
# Save to Azure storage always
1044973
1045-
if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
1046-
curl -sL https://aka.ms/InstallAzureCLIDeb | sudo bash
1047-
else
1048-
brew install azure-cli
1049-
fi
974+
if [[ $TRAVIS_CPU_ARCH != "arm64" ]]; then
975+
if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
976+
curl -sL https://aka.ms/InstallAzureCLIDeb | sudo bash
977+
else
978+
brew install azure-cli
979+
fi
1050980
1051-
az storage container create -n ${TRAVIS_COMMIT} --public-access blob
981+
az storage container create -n ${TRAVIS_COMMIT} --public-access blob
1052982
1053-
if [[ $SDIST == 1 ]]; then
1054-
az storage blob upload-batch -d ${TRAVIS_COMMIT} -s ${TRAVIS_BUILD_DIR}/dist --pattern *.gz
1055-
else
1056-
az storage blob upload-batch -d ${TRAVIS_COMMIT} -s ${TRAVIS_BUILD_DIR}/wheelhouse --pattern opencv*.whl
983+
if [[ $SDIST == 1 ]]; then
984+
az storage blob upload-batch -d ${TRAVIS_COMMIT} -s ${TRAVIS_BUILD_DIR}/dist --pattern *.gz
985+
else
986+
az storage blob upload-batch -d ${TRAVIS_COMMIT} -s ${TRAVIS_BUILD_DIR}/wheelhouse --pattern opencv*.whl
987+
fi
1057988
fi
1058989
1059990
set +x

README.md

-4
Original file line numberDiff line numberDiff line change
@@ -49,10 +49,6 @@ A: No, the packages are special wheel binary packages and they already contain s
4949

5050
Since ``opencv-python`` version 4.3.0.\*, ``manylinux1`` wheels were replaced by ``manylinux2014`` wheels. If your pip is too old, it will try to use the new source distribution introduced in 4.3.0.38 to manually build OpenCV because it does not know how to install ``manylinux2014`` wheels. However, source build will also fail because of too old ``pip`` because it does not understand build dependencies in ``pyproject.toml``. To use the new ``manylinux2014`` pre-built wheels (or to build from source), your ``pip`` version must be >= 19.3. Please upgrade ``pip`` with ``pip install --upgrade pip``.
5151

52-
**Q: Pip install fails with ``Could not find a version that satisfies the requirement ...``?**
53-
54-
A: Most likely the issue is related to too old pip and can be fixed by running ``pip install --upgrade pip``. Note that the wheel (especially manylinux) format does not currently support properly ARM architecture so there are no packages for ARM based platforms in PyPI. However, ``opencv-python`` packages for Raspberry Pi can be found from https://www.piwheels.org/.
55-
5652
**Q: Import fails on Windows: ``ImportError: DLL load failed: The specified module could not be found.``?**
5753

5854
A: If the import fails on Windows, make sure you have [Visual C++ redistributable 2015](https://www.microsoft.com/en-us/download/details.aspx?id=48145) installed. If you are using older Windows version than Windows 10 and latest system updates are not installed, [Universal C Runtime](https://support.microsoft.com/en-us/help/2999226/update-for-universal-c-runtime-in-windows) might be also required.

docker/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@ Manylinux2014 is used in wheels with version 3.4.10.* / 4.3.0.* and above.
66

77
The extended images were created to be able to build OpenCV in reasonable time with Travis. The images are hosted at https://quay.io/user/skvark.
88

9-
See the dockerfiles for more info.
9+
See the dockerfiles for more info.

setup.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ def main():
9393
# Path regexes with forward slashes relative to CMake install dir.
9494
rearrange_cmake_output_data = {
9595
"cv2": (
96-
[r"bin/opencv_videoio_ffmpeg\d{3}%s\.dll" % ("_64" if x64 else "")]
96+
[r"bin/opencv_ffmpeg\d{3,4}%s\.dll" % ("_64" if x64 else "")]
9797
if os.name == "nt"
9898
else []
9999
)
@@ -106,7 +106,7 @@ def main():
106106
% {"ext": re.escape(sysconfig.get_config_var("EXT_SUFFIX"))}
107107
],
108108
"cv2.data": [ # OPENCV_OTHER_INSTALL_PATH
109-
("etc" if os.name == "nt" else "share/opencv4") + r"/haarcascades/.*\.xml"
109+
("etc" if os.name == "nt" else "share/OpenCV") + r"/haarcascades/.*\.xml"
110110
],
111111
}
112112

travis_config.sh

+1
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,7 @@ function pre_build {
111111
brew_install_and_cache_within_time_limit ffmpeg_opencv || { [ $? -gt 1 ] && return 2 || return 0; }
112112
else
113113
brew unlink python@2
114+
generate_ffmpeg_formula
114115
brew install ffmpeg_opencv
115116
fi
116117

0 commit comments

Comments
 (0)