提交 d3580ef0 编写于 作者: O Olli-Pekka Heinisuo

merge 3.4 changes

...@@ -32,32 +32,6 @@ jobs: ...@@ -32,32 +32,6 @@ jobs:
exclude: exclude:
- language: ruby - language: ruby
include: include:
- os: osx
env:
- MB_PYTHON_VERSION=3.8
language: generic
osx_image: xcode9.4
stage: s1
workspaces:
create:
name: brew_cache
paths:
# https://stackoverflow.com/questions/39930171/cache-brew-builds-with-travis-ci
- $HOME/Library/Caches/Homebrew
- /usr/local/Homebrew/
# used in OSX custom build script dealing with local bottle caching
- $HOME/local_bottle_metadata
#workspaces share within the same build, cache shares between builds
cache:
directories:
# `cache: ccache: true` has no effect if `language:` is not `c` or `cpp`
- $HOME/.ccache
# https://stackoverflow.com/questions/39930171/cache-brew-builds-with-travis-ci
- $HOME/Library/Caches/Homebrew
- /usr/local/Homebrew/
# used in OSX custom build script dealing with local bottle caching
- $HOME/local_bottle_metadata
# source distributions # source distributions
- os: linux - os: linux
stage: s1 stage: s1
...@@ -111,8 +85,7 @@ jobs: ...@@ -111,8 +85,7 @@ jobs:
- ENABLE_CONTRIB=0 - ENABLE_CONTRIB=0
- ENABLE_HEADLESS=0 - ENABLE_HEADLESS=0
- TEST_DEPENDS=numpy==1.13.3 - TEST_DEPENDS=numpy==1.13.3
workspaces:
use: brew_cache
- os: osx - os: osx
language: generic language: generic
osx_image: xcode9.4 osx_image: xcode9.4
...@@ -121,8 +94,7 @@ jobs: ...@@ -121,8 +94,7 @@ jobs:
- ENABLE_CONTRIB=0 - ENABLE_CONTRIB=0
- ENABLE_HEADLESS=0 - ENABLE_HEADLESS=0
- TEST_DEPENDS=numpy==1.14.5 - TEST_DEPENDS=numpy==1.14.5
workspaces:
use: brew_cache
- os: osx - os: osx
language: generic language: generic
osx_image: xcode9.4 osx_image: xcode9.4
...@@ -131,8 +103,7 @@ jobs: ...@@ -131,8 +103,7 @@ jobs:
- ENABLE_CONTRIB=0 - ENABLE_CONTRIB=0
- ENABLE_HEADLESS=0 - ENABLE_HEADLESS=0
- TEST_DEPENDS=numpy==1.17.3 - TEST_DEPENDS=numpy==1.17.3
workspaces:
use: brew_cache
- os: osx - os: osx
language: generic language: generic
osx_image: xcode9.4 osx_image: xcode9.4
...@@ -141,8 +112,7 @@ jobs: ...@@ -141,8 +112,7 @@ jobs:
- ENABLE_CONTRIB=0 - ENABLE_CONTRIB=0
- ENABLE_HEADLESS=0 - ENABLE_HEADLESS=0
- TEST_DEPENDS=numpy==1.19.3 - TEST_DEPENDS=numpy==1.19.3
workspaces:
use: brew_cache
# headless builds for MacOS # headless builds for MacOS
- os: osx - os: osx
...@@ -153,8 +123,7 @@ jobs: ...@@ -153,8 +123,7 @@ jobs:
- ENABLE_CONTRIB=0 - ENABLE_CONTRIB=0
- ENABLE_HEADLESS=1 - ENABLE_HEADLESS=1
- TEST_DEPENDS=numpy==1.13.3 - TEST_DEPENDS=numpy==1.13.3
workspaces:
use: brew_cache
- os: osx - os: osx
language: generic language: generic
osx_image: xcode9.4 osx_image: xcode9.4
...@@ -163,8 +132,7 @@ jobs: ...@@ -163,8 +132,7 @@ jobs:
- ENABLE_CONTRIB=0 - ENABLE_CONTRIB=0
- ENABLE_HEADLESS=1 - ENABLE_HEADLESS=1
- TEST_DEPENDS=numpy==1.14.5 - TEST_DEPENDS=numpy==1.14.5
workspaces:
use: brew_cache
- os: osx - os: osx
language: generic language: generic
osx_image: xcode9.4 osx_image: xcode9.4
...@@ -173,8 +141,7 @@ jobs: ...@@ -173,8 +141,7 @@ jobs:
- ENABLE_CONTRIB=0 - ENABLE_CONTRIB=0
- ENABLE_HEADLESS=1 - ENABLE_HEADLESS=1
- TEST_DEPENDS=numpy==1.17.3 - TEST_DEPENDS=numpy==1.17.3
workspaces:
use: brew_cache
- os: osx - os: osx
language: generic language: generic
osx_image: xcode9.4 osx_image: xcode9.4
...@@ -183,8 +150,7 @@ jobs: ...@@ -183,8 +150,7 @@ jobs:
- ENABLE_CONTRIB=0 - ENABLE_CONTRIB=0
- ENABLE_HEADLESS=1 - ENABLE_HEADLESS=1
- TEST_DEPENDS=numpy==1.19.3 - TEST_DEPENDS=numpy==1.19.3
workspaces:
use: brew_cache
# Contrib builds for MacOS # Contrib builds for MacOS
- os: osx - os: osx
...@@ -195,8 +161,7 @@ jobs: ...@@ -195,8 +161,7 @@ jobs:
- ENABLE_CONTRIB=1 - ENABLE_CONTRIB=1
- ENABLE_HEADLESS=0 - ENABLE_HEADLESS=0
- TEST_DEPENDS=numpy==1.13.3 - TEST_DEPENDS=numpy==1.13.3
workspaces:
use: brew_cache
- os: osx - os: osx
language: generic language: generic
osx_image: xcode9.4 osx_image: xcode9.4
...@@ -205,8 +170,7 @@ jobs: ...@@ -205,8 +170,7 @@ jobs:
- ENABLE_CONTRIB=1 - ENABLE_CONTRIB=1
- ENABLE_HEADLESS=0 - ENABLE_HEADLESS=0
- TEST_DEPENDS=numpy==1.14.5 - TEST_DEPENDS=numpy==1.14.5
workspaces:
use: brew_cache
- os: osx - os: osx
language: generic language: generic
osx_image: xcode9.4 osx_image: xcode9.4
...@@ -215,8 +179,7 @@ jobs: ...@@ -215,8 +179,7 @@ jobs:
- ENABLE_CONTRIB=1 - ENABLE_CONTRIB=1
- ENABLE_HEADLESS=0 - ENABLE_HEADLESS=0
- TEST_DEPENDS=numpy==1.17.3 - TEST_DEPENDS=numpy==1.17.3
workspaces:
use: brew_cache
- os: osx - os: osx
language: generic language: generic
osx_image: xcode9.4 osx_image: xcode9.4
...@@ -225,8 +188,7 @@ jobs: ...@@ -225,8 +188,7 @@ jobs:
- ENABLE_CONTRIB=1 - ENABLE_CONTRIB=1
- ENABLE_HEADLESS=0 - ENABLE_HEADLESS=0
- TEST_DEPENDS=numpy==1.19.3 - TEST_DEPENDS=numpy==1.19.3
workspaces:
use: brew_cache
# headless contrib builds for MacOS # headless contrib builds for MacOS
- os: osx - os: osx
...@@ -237,8 +199,7 @@ jobs: ...@@ -237,8 +199,7 @@ jobs:
- ENABLE_CONTRIB=1 - ENABLE_CONTRIB=1
- ENABLE_HEADLESS=1 - ENABLE_HEADLESS=1
- TEST_DEPENDS=numpy==1.13.3 - TEST_DEPENDS=numpy==1.13.3
workspaces:
use: brew_cache
- os: osx - os: osx
language: generic language: generic
osx_image: xcode9.4 osx_image: xcode9.4
...@@ -247,8 +208,7 @@ jobs: ...@@ -247,8 +208,7 @@ jobs:
- ENABLE_CONTRIB=1 - ENABLE_CONTRIB=1
- ENABLE_HEADLESS=1 - ENABLE_HEADLESS=1
- TEST_DEPENDS=numpy==1.14.5 - TEST_DEPENDS=numpy==1.14.5
workspaces:
use: brew_cache
- os: osx - os: osx
language: generic language: generic
osx_image: xcode9.4 osx_image: xcode9.4
...@@ -257,8 +217,7 @@ jobs: ...@@ -257,8 +217,7 @@ jobs:
- ENABLE_CONTRIB=1 - ENABLE_CONTRIB=1
- ENABLE_HEADLESS=1 - ENABLE_HEADLESS=1
- TEST_DEPENDS=numpy==1.17.3 - TEST_DEPENDS=numpy==1.17.3
workspaces:
use: brew_cache
- os: osx - os: osx
language: generic language: generic
osx_image: xcode9.4 osx_image: xcode9.4
...@@ -267,8 +226,7 @@ jobs: ...@@ -267,8 +226,7 @@ jobs:
- ENABLE_CONTRIB=1 - ENABLE_CONTRIB=1
- ENABLE_HEADLESS=1 - ENABLE_HEADLESS=1
- TEST_DEPENDS=numpy==1.19.3 - TEST_DEPENDS=numpy==1.19.3
workspaces:
use: brew_cache
# default builds for Linux # default builds for Linux
- os: linux - os: linux
...@@ -925,20 +883,6 @@ before_install: | ...@@ -925,20 +883,6 @@ before_install: |
echo $ENABLE_CONTRIB > contrib.enabled echo $ENABLE_CONTRIB > contrib.enabled
echo $ENABLE_HEADLESS > headless.enabled echo $ENABLE_HEADLESS > headless.enabled
if [ -n "$IS_OSX" ]; then
export PATH="/usr/local/sbin:$PATH"
TAPS="$(brew --repository)/Library/Taps"
if [ -e "$TAPS/caskroom/homebrew-cask" -a -e "$TAPS/homebrew/homebrew-cask" ]; then
rm -rf "$TAPS/caskroom/homebrew-cask"
fi
find "$TAPS" -type d -name .git -exec \
bash -xec '
cd $(dirname '\''{}'\'') || echo "status: $?"
git clean -fxd || echo "status: $?"
sleep 1 || echo "status: $?"
git status || echo "status: $?"' \; || echo "status: $?"
brew_cache_cleanup
fi
echo "end" echo "end"
# Not interested in travis internal scripts' output # Not interested in travis internal scripts' output
fi fi
...@@ -975,21 +919,6 @@ script: | ...@@ -975,21 +919,6 @@ script: |
trap ERR trap ERR
test "$rc" -eq 0 test "$rc" -eq 0
before_cache: |
# Cleanup dirs to be cached
set -e; set -x
if [ -n "$IS_OSX" ]; then
# When Taps is cached, this dir causes "Error: file exists" on `brew update`
if [ -e "$(brew --repository)/Library/Taps/homebrew/homebrew-cask/homebrew-cask" ]; then
rm -rf "$(brew --repository)/Library/Taps/homebrew/homebrew-cask/homebrew-cask"
fi
brew_cache_cleanup
fi
set +x; set +e
after_success: | after_success: |
# Upload wheels to pypi if tag is set # Upload wheels to pypi if tag is set
...@@ -1042,18 +971,20 @@ after_success: | ...@@ -1042,18 +971,20 @@ after_success: |
# Save to Azure storage always # Save to Azure storage always
if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then if [[ $TRAVIS_CPU_ARCH != "arm64" ]]; then
curl -sL https://aka.ms/InstallAzureCLIDeb | sudo bash if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
else curl -sL https://aka.ms/InstallAzureCLIDeb | sudo bash
brew install azure-cli else
fi brew install azure-cli
fi
az storage container create -n ${TRAVIS_COMMIT} --public-access blob az storage container create -n ${TRAVIS_COMMIT} --public-access blob
if [[ $SDIST == 1 ]]; then if [[ $SDIST == 1 ]]; then
az storage blob upload-batch -d ${TRAVIS_COMMIT} -s ${TRAVIS_BUILD_DIR}/dist --pattern *.gz az storage blob upload-batch -d ${TRAVIS_COMMIT} -s ${TRAVIS_BUILD_DIR}/dist --pattern *.gz
else else
az storage blob upload-batch -d ${TRAVIS_COMMIT} -s ${TRAVIS_BUILD_DIR}/wheelhouse --pattern opencv*.whl az storage blob upload-batch -d ${TRAVIS_COMMIT} -s ${TRAVIS_BUILD_DIR}/wheelhouse --pattern opencv*.whl
fi
fi fi
set +x set +x
......
...@@ -49,10 +49,6 @@ A: No, the packages are special wheel binary packages and they already contain s ...@@ -49,10 +49,6 @@ A: No, the packages are special wheel binary packages and they already contain s
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``. 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``.
**Q: Pip install fails with ``Could not find a version that satisfies the requirement ...``?**
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/.
**Q: Import fails on Windows: ``ImportError: DLL load failed: The specified module could not be found.``?** **Q: Import fails on Windows: ``ImportError: DLL load failed: The specified module could not be found.``?**
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. 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.
......
...@@ -6,4 +6,4 @@ Manylinux2014 is used in wheels with version 3.4.10.* / 4.3.0.* and above. ...@@ -6,4 +6,4 @@ Manylinux2014 is used in wheels with version 3.4.10.* / 4.3.0.* and above.
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. 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.
See the dockerfiles for more info. See the dockerfiles for more info.
\ No newline at end of file
...@@ -93,7 +93,7 @@ def main(): ...@@ -93,7 +93,7 @@ def main():
# Path regexes with forward slashes relative to CMake install dir. # Path regexes with forward slashes relative to CMake install dir.
rearrange_cmake_output_data = { rearrange_cmake_output_data = {
"cv2": ( "cv2": (
[r"bin/opencv_videoio_ffmpeg\d{3}%s\.dll" % ("_64" if x64 else "")] [r"bin/opencv_ffmpeg\d{3,4}%s\.dll" % ("_64" if x64 else "")]
if os.name == "nt" if os.name == "nt"
else [] else []
) )
...@@ -106,7 +106,7 @@ def main(): ...@@ -106,7 +106,7 @@ def main():
% {"ext": re.escape(sysconfig.get_config_var("EXT_SUFFIX"))} % {"ext": re.escape(sysconfig.get_config_var("EXT_SUFFIX"))}
], ],
"cv2.data": [ # OPENCV_OTHER_INSTALL_PATH "cv2.data": [ # OPENCV_OTHER_INSTALL_PATH
("etc" if os.name == "nt" else "share/opencv4") + r"/haarcascades/.*\.xml" ("etc" if os.name == "nt" else "share/OpenCV") + r"/haarcascades/.*\.xml"
], ],
} }
......
...@@ -111,6 +111,7 @@ function pre_build { ...@@ -111,6 +111,7 @@ function pre_build {
brew_install_and_cache_within_time_limit ffmpeg_opencv || { [ $? -gt 1 ] && return 2 || return 0; } brew_install_and_cache_within_time_limit ffmpeg_opencv || { [ $? -gt 1 ] && return 2 || return 0; }
else else
brew unlink python@2 brew unlink python@2
generate_ffmpeg_formula
brew install ffmpeg_opencv brew install ffmpeg_opencv
fi fi
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册