Skip to content

Commit cd57c42

Browse files
committed
Download and use OpenBLAS in Windows builds to unblock USAC.
1 parent 18249e5 commit cd57c42

File tree

3 files changed

+42
-0
lines changed

3 files changed

+42
-0
lines changed

.github/workflows/build_wheels_windows.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,13 +62,19 @@ jobs:
6262
- name: Build a package
6363
# CMake 3.25 regression fix. See https://stackoverflow.com/questions/74162633/problem-compiling-from-source-opencv-with-mvsc2019-in-64-bit-version
6464
run: |
65+
mkdir openblas
66+
cd openblas
67+
curl -o OpenBLAS-0.3.30.zip https://github.com/OpenMathLib/OpenBLAS/releases/download/v0.3.30/OpenBLAS-0.3.30-${{ matrix.platform }}.zip
68+
unzip OpenBLAS-0.3.30.zip
69+
set OpenBLAS_HOME=${{ github.workspace }}\openblas
6570
python --version
6671
python -m pip install --upgrade pip
6772
python -m pip install --upgrade setuptools
6873
python -m pip install cmake==3.24.2
6974
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
7075
set "CI_BUILD=1" && python setup.py bdist_wheel --py-limited-api=cp37 --dist-dir=%cd%\wheelhouse -v
7176
shell: cmd
77+
working-directory: ${{ github.workspace }}
7278
- name: Saving all wheels
7379
uses: actions/upload-artifact@v4
7480
with:

LICENSE-3RD-PARTY.txt

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3511,3 +3511,36 @@ CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
35113511
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
35123512
ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
35133513
POSSIBILITY OF SUCH DAMAGE.
3514+
3515+
------------------------------------------------------------------------------
3516+
OpenBLAS library is redistributed within all opencv-python packages.
3517+
3518+
Copyright (c) 2011-2014, The OpenBLAS Project
3519+
All rights reserved.
3520+
3521+
Redistribution and use in source and binary forms, with or without
3522+
modification, are permitted provided that the following conditions are
3523+
met:
3524+
3525+
1. Redistributions of source code must retain the above copyright
3526+
notice, this list of conditions and the following disclaimer.
3527+
3528+
2. Redistributions in binary form must reproduce the above copyright
3529+
notice, this list of conditions and the following disclaimer in
3530+
the documentation and/or other materials provided with the
3531+
distribution.
3532+
3. Neither the name of the OpenBLAS project nor the names of
3533+
its contributors may be used to endorse or promote products
3534+
derived from this software without specific prior written
3535+
permission.
3536+
3537+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
3538+
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
3539+
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
3540+
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
3541+
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
3542+
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
3543+
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
3544+
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
3545+
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
3546+
USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

setup.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -190,6 +190,9 @@ def main():
190190
"-DPYTHON3_LIMITED_API=ON",
191191
"-DBUILD_OPENEXR=ON",
192192
]
193+
+ (
194+
["-DBLA_STATIC=ON"] if is_CI_build else []
195+
)
193196
+ (
194197
# CMake flags for windows/arm64 build
195198
["-DCMAKE_GENERATOR_PLATFORM=ARM64",

0 commit comments

Comments
 (0)