Skip to content

Commit 60bde79

Browse files
committed
Added openblas to build to unblock USAC.
1 parent ca13925 commit 60bde79

File tree

6 files changed

+56
-3
lines changed

6 files changed

+56
-3
lines changed

.github/workflows/build_wheels_windows.yml

+13
Original file line numberDiff line numberDiff line change
@@ -61,14 +61,27 @@ jobs:
6161
uses: microsoft/setup-msbuild@v1.1
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
64+
# OpenBLAS package bug on Windows: https://github.com/xianyi/OpenBLAS/issues/4227
6465
run: |
66+
mkdir openblas
67+
cd openblas
68+
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
69+
unzip OpenBLAS-0.3.24.zip
70+
cp bin\libopenblas.dll bin\libopenblas.exp.dll
71+
set OpenBLAS_HOME=${{ github.workspace }}\openblas
72+
dir $OpenBLAS_HOME/
73+
dir $OpenBLAS_HOME/bin/
74+
set PATH=${{ github.workspace }}\openblas\bin;%PATH%
75+
set
76+
cd ..
6577
python --version
6678
python -m pip install --upgrade pip
6779
python -m pip install --upgrade setuptools
6880
python -m pip install cmake==3.24.2
6981
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
7082
set "CI_BUILD=1" && python setup.py bdist_wheel --py-limited-api=cp37 --dist-dir=%cd%\wheelhouse -v
7183
shell: cmd
84+
working-directory: ${{ github.workspace }}
7285
- name: Saving all wheels
7386
uses: actions/upload-artifact@v3
7487
with:

LICENSE-3RD-PARTY.txt

+33
Original file line numberDiff line numberDiff line change
@@ -2985,3 +2985,36 @@ PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
29852985
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
29862986
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
29872987
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
2988+
2989+
------------------------------------------------------------------------------
2990+
OpenBLAS library is redistributed within all opencv-python packages.
2991+
2992+
Copyright (c) 2011-2014, The OpenBLAS Project
2993+
All rights reserved.
2994+
2995+
Redistribution and use in source and binary forms, with or without
2996+
modification, are permitted provided that the following conditions are
2997+
met:
2998+
2999+
1. Redistributions of source code must retain the above copyright
3000+
notice, this list of conditions and the following disclaimer.
3001+
3002+
2. Redistributions in binary form must reproduce the above copyright
3003+
notice, this list of conditions and the following disclaimer in
3004+
the documentation and/or other materials provided with the
3005+
distribution.
3006+
3. Neither the name of the OpenBLAS project nor the names of
3007+
its contributors may be used to endorse or promote products
3008+
derived from this software without specific prior written
3009+
permission.
3010+
3011+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
3012+
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
3013+
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
3014+
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
3015+
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
3016+
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
3017+
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
3018+
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
3019+
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
3020+
USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

opencv

Submodule opencv updated 385 files

setup.py

+7
Original file line numberDiff line numberDiff line change
@@ -108,13 +108,20 @@ def main():
108108

109109
# Files from CMake output to copy to package.
110110
# Path regexes with forward slashes relative to CMake install dir.
111+
# OpenBLAS package bug on Windows: https://github.com/xianyi/OpenBLAS/issues/4227
111112
rearrange_cmake_output_data = {
112113
"cv2": (
113114
[r"bin/opencv_videoio_ffmpeg\d{3}%s\.dll" % ("_64" if is64 else "")]
114115
if os.name == "nt"
115116
else []
116117
)
117118
+
119+
(
120+
[os.path.join(os.environ["OpenBLAS_HOME"], "bin", "libopenblas.exp.dll").replace("\\", "/")]
121+
if os.name == "nt" and "OpenBLAS_HOME" in os.environ
122+
else []
123+
)
124+
+
118125
# In Windows, in python/X.Y/<arch>/; in Linux, in just python/X.Y/.
119126
# Naming conventions vary so widely between versions and OSes
120127
# had to give up on checking them.

0 commit comments

Comments
 (0)