未验证 提交 824a3b24 编写于 作者: A Andrey Senyaev 提交者: GitHub

Merge pull request #584 from asenyaev/asen/upgrade_3.4_again

Update 3.4 branch to the latest changes in master
...@@ -840,7 +840,7 @@ This license applies to above binaries in the directory cv2/. ...@@ -840,7 +840,7 @@ This license applies to above binaries in the directory cv2/.
* The implementation was written so as to conform with Netscapes SSL. * The implementation was written so as to conform with Netscapes SSL.
* *
* This library is free for commercial and non-commercial use as long as * This library is free for commercial and non-commercial use as long as
* the following conditions are aheared to. The following conditions * the following conditions are adhered to. The following conditions
* apply to all code found in this distribution, be it the RC4, RSA, * apply to all code found in this distribution, be it the RC4, RSA,
* lhash, DES, etc., code; not just the SSL code. The SSL documentation * lhash, DES, etc., code; not just the SSL code. The SSL documentation
* included with this distribution is covered by the same copyright terms * included with this distribution is covered by the same copyright terms
...@@ -865,7 +865,7 @@ This license applies to above binaries in the directory cv2/. ...@@ -865,7 +865,7 @@ This license applies to above binaries in the directory cv2/.
* must display the following acknowledgement: * must display the following acknowledgement:
* "This product includes cryptographic software written by * "This product includes cryptographic software written by
* Eric Young (eay@cryptsoft.com)" * Eric Young (eay@cryptsoft.com)"
* The word 'cryptographic' can be left out if the rouines from the library * The word 'cryptographic' can be left out if the routines from the library
* being used are not cryptographic related :-). * being used are not cryptographic related :-).
* 4. If you include any Windows specific code (or a derivative thereof) from * 4. If you include any Windows specific code (or a derivative thereof) from
* the apps directory (application code) you must include an acknowledgement: * the apps directory (application code) you must include an acknowledgement:
...@@ -883,7 +883,7 @@ This license applies to above binaries in the directory cv2/. ...@@ -883,7 +883,7 @@ This license applies to above binaries in the directory cv2/.
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE. * SUCH DAMAGE.
* *
* The licence and distribution terms for any publically available version or * The licence and distribution terms for any publicly available version or
* derivative of this code cannot be changed. i.e. this code cannot simply be * derivative of this code cannot be changed. i.e. this code cannot simply be
* copied and put under another distribution licence * copied and put under another distribution licence
* [including the GNU Public Licence.] * [including the GNU Public Licence.]
......
...@@ -9,3 +9,4 @@ recursive-include docker * ...@@ -9,3 +9,4 @@ recursive-include docker *
recursive-include opencv * recursive-include opencv *
recursive-include opencv_contrib * recursive-include opencv_contrib *
recursive-include patches * recursive-include patches *
recursive-include scripts *.py
...@@ -79,7 +79,7 @@ A: It's easier for users to understand ``opencv-python`` than ``cv2`` and it mak ...@@ -79,7 +79,7 @@ A: It's easier for users to understand ``opencv-python`` than ``cv2`` and it mak
## Documentation for opencv-python ## Documentation for opencv-python
[![Windows Buld Status](https://github.com/opencv/opencv-python/actions/workflows/build_wheels_windows.yml/badge.svg)](https://github.com/opencv/opencv-python/actions/workflows/build_wheels_windows.yml) [![Windows Build Status](https://github.com/opencv/opencv-python/actions/workflows/build_wheels_windows.yml/badge.svg)](https://github.com/opencv/opencv-python/actions/workflows/build_wheels_windows.yml)
[![(Linux Build status)](https://github.com/opencv/opencv-python/actions/workflows/build_wheels_linux.yml/badge.svg)](https://github.com/opencv/opencv-python/actions/workflows/build_wheels_linux.yml) [![(Linux Build status)](https://github.com/opencv/opencv-python/actions/workflows/build_wheels_linux.yml/badge.svg)](https://github.com/opencv/opencv-python/actions/workflows/build_wheels_linux.yml)
[![(Mac OS Build status)](https://github.com/opencv/opencv-python/actions/workflows/build_wheels_macos.yml/badge.svg)](https://github.com/opencv/opencv-python/actions/workflows/build_wheels_macos.yml) [![(Mac OS Build status)](https://github.com/opencv/opencv-python/actions/workflows/build_wheels_macos.yml/badge.svg)](https://github.com/opencv/opencv-python/actions/workflows/build_wheels_macos.yml)
...@@ -220,6 +220,7 @@ Python 3.x compatible pre-built wheels are provided for the officially supported ...@@ -220,6 +220,7 @@ Python 3.x compatible pre-built wheels are provided for the officially supported
- 3.7 - 3.7
- 3.8 - 3.8
- 3.9 - 3.9
- 3.10
### Backward compatibility ### Backward compatibility
......
Subproject commit 62252d157ea53d9c51df9d7043bba49e053aa3c0 Subproject commit b1cf5501233405de3ea5926d1d688e421b337458
...@@ -5,12 +5,11 @@ from auditwheel import policy ...@@ -5,12 +5,11 @@ from auditwheel import policy
policies = None policies = None
with open(join(dirname(abspath(policy.__file__)), "policy.json")) as f: with open(join(dirname(abspath(policy.__file__)), "manylinux-policy.json")) as f:
policies = json.load(f) policies = json.load(f)
for p in policies: for p in policies:
if p["name"] == "manylinux2014": p["lib_whitelist"].append("libxcb.so.1")
p["lib_whitelist"].append("libxcb.so.1")
with open(join(dirname(abspath(policy.__file__)), "policy.json"), "w") as f: with open(join(dirname(abspath(policy.__file__)), "manylinux-policy.json"), "w") as f:
f.write(json.dumps(policies)) f.write(json.dumps(policies))
...@@ -365,8 +365,18 @@ class RearrangeCMakeOutput(object): ...@@ -365,8 +365,18 @@ class RearrangeCMakeOutput(object):
print("Copying files from CMake output") print("Copying files from CMake output")
# lines for a proper work using pylint and an autocomplete in IDE
with open(os.path.join(cmake_install_dir, "python", "cv2", "__init__.py"), 'r') as opencv_init:
opencv_init_lines = opencv_init.readlines()
extra_imports = ('\nfrom .cv2 import *\nfrom . import data\n')
free_line_after_imports = 5
opencv_init_lines.insert(free_line_after_imports, extra_imports)
with open(os.path.join(cmake_install_dir, "python", "cv2", "__init__.py"), 'w') as opencv_final_init:
opencv_final_init.writelines(opencv_init_lines)
# add lines from the old __init__.py file to the config file # add lines from the old __init__.py file to the config file
with open('scripts/__init__.py', 'r') as custom_init: with open(os.path.join(os.path.dirname(os.path.abspath(__file__)), 'scripts', '__init__.py'), 'r') as custom_init:
custom_init_data = custom_init.read() custom_init_data = custom_init.read()
with open('%spython/cv2/config-%s.%s.py' with open('%spython/cv2/config-%s.%s.py'
% (cmake_install_dir, sys.version_info[0], sys.version_info[1]), 'w') as opencv_init_config: % (cmake_install_dir, sys.version_info[0], sys.version_info[1]), 'w') as opencv_init_config:
......
...@@ -12,16 +12,16 @@ function build_wheel { ...@@ -12,16 +12,16 @@ function build_wheel {
function bdist_wheel_cmd { function bdist_wheel_cmd {
# copied from multibuild's common_utils.sh # copied from multibuild's common_utils.sh
# add osx deployment target so it doesnt default to 10.6 # add osx deployment target so it doesn't default to 10.6
local abs_wheelhouse=$1 local abs_wheelhouse=$1
CI_BUILD=1 pip wheel --verbose --wheel-dir="$PWD/dist" . $BDIST_PARAMS CI_BUILD=1 pip wheel --verbose --wheel-dir="$PWD/dist" . $BDIST_PARAMS
cp dist/*.whl $abs_wheelhouse cp dist/*.whl $abs_wheelhouse
if [ -z "$IS_OSX" ]; then if [ -z "$IS_OSX" ]; then
TOOLS_PATH=/opt/_internal/tools # this path can be changed in the latest manylinux image
/opt/python/cp37-cp37m/bin/python -m venv $TOOLS_PATH TOOLS_PATH=/opt/_internal/pipx/venvs/auditwheel
/opt/python/cp39-cp39/bin/python -m venv $TOOLS_PATH
source $TOOLS_PATH/bin/activate source $TOOLS_PATH/bin/activate
python$PYTHON_VERSION -m pip install auditwheel==3.2.0 python patch_auditwheel_whitelist.py
python$PYTHON_VERSION patch_auditwheel_whitelist.py
# to avoid issues with numpy wheels # to avoid issues with numpy wheels
rm /io/wheelhouse/numpy* rm /io/wheelhouse/numpy*
deactivate deactivate
......
...@@ -249,7 +249,7 @@ function _brew_install_and_cache_within_time_limit { ...@@ -249,7 +249,7 @@ function _brew_install_and_cache_within_time_limit {
for dep in $DEPS; do for dep in $DEPS; do
#TIME_LIMIT only has to be met if we'll be actually building the main project this iteration, i.e. after the "root" module installation #TIME_LIMIT only has to be met if we'll be actually building the main project this iteration, i.e. after the "root" module installation
#While we don't know that yet, we can make better use of Travis-given time with a laxer limit #While we don't know that yet, we can make better use of Travis-given time with a laxer limit
#We still can't overrun TIME_HARD_LIMIT as that would't leave time to save the cache #We still can't overrun TIME_HARD_LIMIT as that wouldn't leave time to save the cache
_brew_install_and_cache_within_time_limit "$dep" $(((TIME_LIMIT+TIME_HARD_LIMIT)/2)) "$TIME_HARD_LIMIT" "$TIME_START" || return $? _brew_install_and_cache_within_time_limit "$dep" $(((TIME_LIMIT+TIME_HARD_LIMIT)/2)) "$TIME_HARD_LIMIT" "$TIME_START" || return $?
done done
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册