Skip to content
6 changes: 3 additions & 3 deletions LICENSE-3RD-PARTY.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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.
*
* 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,
* lhash, DES, etc., code; not just the SSL code. The SSL documentation
* included with this distribution is covered by the same copyright terms
Expand All @@ -865,7 +865,7 @@ This license applies to above binaries in the directory cv2/.
* must display the following acknowledgement:
* "This product includes cryptographic software written by
* 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 :-).
* 4. If you include any Windows specific code (or a derivative thereof) from
* the apps directory (application code) you must include an acknowledgement:
Expand All @@ -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
* 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
* copied and put under another distribution licence
* [including the GNU Public Licence.]
Expand Down
1 change: 1 addition & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,4 @@ recursive-include docker *
recursive-include opencv *
recursive-include opencv_contrib *
recursive-include patches *
recursive-include scripts *.py
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ A: It's easier for users to understand ``opencv-python`` than ``cv2`` and it mak

## 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)
[![(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)

Expand Down Expand Up @@ -220,6 +220,7 @@ Python 3.x compatible pre-built wheels are provided for the officially supported
- 3.7
- 3.8
- 3.9
- 3.10

### Backward compatibility

Expand Down
2 changes: 1 addition & 1 deletion opencv
7 changes: 3 additions & 4 deletions patch_auditwheel_whitelist.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,11 @@

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)

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))
12 changes: 11 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -365,8 +365,18 @@ def _classify_installed_files_override(

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
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()
with open('%spython/cv2/config-%s.%s.py'
% (cmake_install_dir, sys.version_info[0], sys.version_info[1]), 'w') as opencv_init_config:
Expand Down
10 changes: 5 additions & 5 deletions travis_config.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,16 @@ function build_wheel {

function bdist_wheel_cmd {
# 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
CI_BUILD=1 pip wheel --verbose --wheel-dir="$PWD/dist" . $BDIST_PARAMS
cp dist/*.whl $abs_wheelhouse
if [ -z "$IS_OSX" ]; then
TOOLS_PATH=/opt/_internal/tools
/opt/python/cp37-cp37m/bin/python -m venv $TOOLS_PATH
# this path can be changed in the latest manylinux image
TOOLS_PATH=/opt/_internal/pipx/venvs/auditwheel
/opt/python/cp39-cp39/bin/python -m venv $TOOLS_PATH
source $TOOLS_PATH/bin/activate
python$PYTHON_VERSION -m pip install auditwheel==3.2.0
python$PYTHON_VERSION patch_auditwheel_whitelist.py
python patch_auditwheel_whitelist.py
# to avoid issues with numpy wheels
rm /io/wheelhouse/numpy*
deactivate
Expand Down
2 changes: 1 addition & 1 deletion travis_osx_brew_cache.sh
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ function _brew_install_and_cache_within_time_limit {
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
#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 $?
done

Expand Down