Content-Length: 357378 | pFad | http://github.com/opencv/opencv-python/commit/3a4c30e50438a3f50c28deb80d16b96235dc7bb7

3A Added pre-downloaded 3rdparty files to source packages · opencv/opencv-python@3a4c30e · GitHub
Skip to content

Commit 3a4c30e

Browse files
committed
Added pre-downloaded 3rdparty files to source packages
1 parent 623401a commit 3a4c30e

File tree

3 files changed

+26
-2
lines changed

3 files changed

+26
-2
lines changed

.github/workflows/build_wheels_linux.yml

+4-2
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
+20
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

+2
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)








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/opencv/opencv-python/commit/3a4c30e50438a3f50c28deb80d16b96235dc7bb7

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy