diff --git a/.github/workflows/build_wheels_windows.yml b/.github/workflows/build_wheels_windows.yml index 1ee786a9..78a42cc9 100644 --- a/.github/workflows/build_wheels_windows.yml +++ b/.github/workflows/build_wheels_windows.yml @@ -32,6 +32,7 @@ jobs: ENABLE_HEADLESS: ${{ matrix.without_gui }} ENABLE_CONTRIB: ${{ matrix.with_contrib }} OPENCV_TEST_DATA_PATH: ${{ github.workspace }}\opencv_extra\testdata + OpenBLAS_HOME: ${{ github.workspace }}\openblas steps: - name: Cleanup shell: bash @@ -62,13 +63,21 @@ jobs: - 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 run: | + mkdir openblas + cd openblas + curl -o OpenBLAS-0.3.30.zip -L https://github.com/OpenMathLib/OpenBLAS/releases/download/v0.3.30/OpenBLAS-0.3.30-${{ matrix.platform }}.zip + unzip OpenBLAS-0.3.30.zip + pwd + dir + cd .. python --version python -m pip install --upgrade pip python -m pip install --upgrade setuptools python -m pip install cmake==3.24.2 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 + set "CI_BUILD=1" && set "OpenBLAS_HOME=${{ github.workspace }}\openblas" && 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@v4 with: diff --git a/LICENSE-3RD-PARTY.txt b/LICENSE-3RD-PARTY.txt index b5e8f5e9..f7ad07f3 100644 --- a/LICENSE-3RD-PARTY.txt +++ b/LICENSE-3RD-PARTY.txt @@ -3511,3 +3511,36 @@ 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/setup.py b/setup.py index 7c470824..78cd902a 100755 --- a/setup.py +++ b/setup.py @@ -190,6 +190,9 @@ def main(): "-DPYTHON3_LIMITED_API=ON", "-DBUILD_OPENEXR=ON", ] + + ( + ["-DBLA_STATIC=ON"] if is_CI_build else [] + ) + ( # CMake flags for windows/arm64 build ["-DCMAKE_GENERATOR_PLATFORM=ARM64",