diff --git a/.github/workflows/build_wheels_windows.yml b/.github/workflows/build_wheels_windows.yml index b1a98d26..52ab4eec 100644 --- a/.github/workflows/build_wheels_windows.yml +++ b/.github/workflows/build_wheels_windows.yml @@ -61,7 +61,19 @@ jobs: uses: microsoft/setup-msbuild@v1.1 - name: Build a package # CMake 3.25 regression fix. See https://stackoverflow.com/questions/74162633/problem-compiling-from-source-opencv-with-mvsc2019-in-64-bit-version + # OpenBLAS package bug on Windows: https://github.com/xianyi/OpenBLAS/issues/4227 run: | + mkdir openblas + cd openblas + curl -o OpenBLAS-0.3.24.zip https://altushost-swe.dl.sourceforge.net/project/openblas/v0.3.24/OpenBLAS-0.3.24-${{ matrix.platform }}.zip + unzip OpenBLAS-0.3.24.zip + cp bin\libopenblas.dll bin\libopenblas.exp.dll + set OpenBLAS_HOME=${{ github.workspace }}\openblas + dir $OpenBLAS_HOME/ + dir $OpenBLAS_HOME/bin/ + set PATH=${{ github.workspace }}\openblas\bin;%PATH% + set + cd .. python --version python -m pip install --upgrade pip python -m pip install --upgrade setuptools @@ -69,6 +81,7 @@ jobs: python -m pip install toml && python -c "import toml; c = toml.load('pyproject.toml'); print('\n'.join(c['build-system']['requires']))" >> requirements.txt | python -m pip install -r requirements.txt set "CI_BUILD=1" && python setup.py bdist_wheel --py-limited-api=cp37 --dist-dir=%cd%\wheelhouse -v shell: cmd + working-directory: ${{ github.workspace }} - name: Saving all wheels uses: actions/upload-artifact@v3 with: diff --git a/LICENSE-3RD-PARTY.txt b/LICENSE-3RD-PARTY.txt index e64ea511..0ad40397 100644 --- a/LICENSE-3RD-PARTY.txt +++ b/LICENSE-3RD-PARTY.txt @@ -2985,3 +2985,36 @@ PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +------------------------------------------------------------------------------ +OpenBLAS library is redistributed within all opencv-python packages. + +Copyright (c) 2011-2014, The OpenBLAS Project +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + 1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in + the documentation and/or other materials provided with the + distribution. + 3. Neither the name of the OpenBLAS project nor the names of + its contributors may be used to endorse or promote products + derived from this software without specific prior written + permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE +LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE +USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/opencv b/opencv index 51998500..fa81936a 160000 --- a/opencv +++ b/opencv @@ -1 +1 @@ -Subproject commit 5199850039ad23f1f0e6cccea5061a9fea5efca6 +Subproject commit fa81936a5b3bc8eb5b32924bac80b78416202ee8 diff --git a/opencv_contrib b/opencv_contrib index f10c84d4..c82dea11 160000 --- a/opencv_contrib +++ b/opencv_contrib @@ -1 +1 @@ -Subproject commit f10c84d48b0714f2b408c9e5cccfac1277c8e6cc +Subproject commit c82dea114536083019a957c8906c64eef5f05d61 diff --git a/opencv_extra b/opencv_extra index fdd66bfc..02e875ed 160000 --- a/opencv_extra +++ b/opencv_extra @@ -1 +1 @@ -Subproject commit fdd66bfcc3ced243d682fe03f0858bf43867656c +Subproject commit 02e875ed87285c93f7c59222bd6e41fdf6931738 diff --git a/setup.py b/setup.py index f6056969..853d50c2 100644 --- a/setup.py +++ b/setup.py @@ -108,6 +108,7 @@ def main(): # Files from CMake output to copy to package. # Path regexes with forward slashes relative to CMake install dir. + # OpenBLAS package bug on Windows: https://github.com/xianyi/OpenBLAS/issues/4227 rearrange_cmake_output_data = { "cv2": ( [r"bin/opencv_videoio_ffmpeg\d{3}%s\.dll" % ("_64" if is64 else "")] @@ -115,6 +116,12 @@ def main(): else [] ) + + ( + [os.path.join(os.environ["OpenBLAS_HOME"], "bin", "libopenblas.exp.dll").replace("\\", "/")] + if os.name == "nt" and "OpenBLAS_HOME" in os.environ + else [] + ) + + # In Windows, in python/X.Y//; in Linux, in just python/X.Y/. # Naming conventions vary so widely between versions and OSes # had to give up on checking them.