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

Appearance settings

Commit 5946584

Browse filesBrowse files
committed
Added pre-downloaded 3rdparty files to source packages
1 parent b01f2cf commit 5946584
Copy full SHA for 5946584

File tree

3 files changed

+26
-2
lines changed
Filter options

3 files changed

+26
-2
lines changed

‎.github/workflows/build_wheels_linux.yml

Copy file name to clipboardExpand all lines: .github/workflows/build_wheels_linux.yml
+4-2Lines 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
+20Lines 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

Copy file name to clipboardExpand all lines: setup.py
+2Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,8 @@ def main():
150150
"-DPYTHON3_LIMITED_API=ON",
151151
"-DBUILD_OPENEXR=ON",
152152
"-DBUILD_PNG=ON",
153+
# To have all 3rdparty files in one place for source packages
154+
"-DOPENCV_DOWNLOAD_PATH=%s" % (os.path.join(os.path.dirname(os.path.abspath(__file__)), "opencv", "3rdparty")),
153155
]
154156
+ (
155157
# If it is not defined 'linker flags: /machine:X86' on Windows x64

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.