Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit3a4c30e

Browse files
committed
Added pre-downloaded 3rdparty files to source packages
1 parent623401a commit3a4c30e

File tree

3 files changed

+26
-2
lines changed

3 files changed

+26
-2
lines changed

‎.github/workflows/build_wheels_linux.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -171,12 +171,14 @@ jobs:
171171

172172
-name:Build a package
173173
run:|
174+
# Download all 3rdparty files
175+
source scripts/source-packages-preparation.sh ${{ github.workspace }}
174176
set -e
175177
# Build and package
176178
set -x
177179
python -m pip install --upgrade pip
178180
python -m pip install scikit-build
179-
python setup.py sdist
181+
python setup.py sdist --formats=xztar
180182
set +x
181183
# Install and run tests
182184
set -x
@@ -186,7 +188,7 @@ jobs:
186188
uses:actions/upload-artifact@v2
187189
with:
188190
name:wheels
189-
path:dist/opencv*.tar.gz
191+
path:dist/opencv*.tar.xz
190192

191193
test_release_opencv_python:
192194
if:github.event_name == 'release' && github.event.release.prerelease
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
#!/bin/bash
2+
3+
# ${1} variable is a path to repository opencv-python
4+
5+
# Define flags
6+
if ["0"==$ENABLE_CONTRIB ];then
7+
git submodule update --init opencv
8+
EXTRA_CMAKE_OPTIONS="-DOPENCV_DOWNLOAD_PATH=${1}/opencv/3rdparty"
9+
else
10+
git submodule update --init opencv opencv_contrib
11+
EXTRA_CMAKE_OPTIONS="-DOPENCV_DOWNLOAD_PATH=${1}/opencv/3rdparty -DOPENCV_EXTRA_MODULES_PATH=${1}/opencv_contrib/modules"
12+
fi
13+
14+
# Download 3rdparty files
15+
cd opencv&& \
16+
mkdir generate&& \
17+
cd generate&& \
18+
cmake$EXTRA_CMAKE_OPTIONS${1}/opencv&& \
19+
cd${1}&& \
20+
rm -rf opencv/generate

‎setup.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -162,6 +162,8 @@ def main():
162162
"-DPYTHON3_LIMITED_API=ON",
163163
"-DBUILD_OPENEXR=ON",
164164
"-DBUILD_PNG=ON",
165+
# To have all 3rdparty files in one place for source packages
166+
"-DOPENCV_DOWNLOAD_PATH=%s"% (os.path.join(os.path.dirname(os.path.abspath(__file__)),"opencv","3rdparty")),
165167
]
166168
+ (
167169
# If it is not defined 'linker flags: /machine:X86' on Windows x64

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp