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 fbbd609

Browse filesBrowse files
committed
fix conflicts
2 parents d1a7a54 + 85bb4a3 commit fbbd609
Copy full SHA for fbbd609

10 files changed

+373
-225
lines changed

‎.github/issue_template.md

Copy file name to clipboardExpand all lines: .github/issue_template.md
+27Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,30 @@ Write here what went wrong.
1313
- architecture (e.g. x86)
1414
- opencv-python version
1515

16+
##### Issue submission checklist
17+
18+
- [ ] This is not a generic OpenCV usage question (looking for help for coding, other usage questions, homework etc.)
19+
<!--
20+
21+
Use Q&A forums such as https://answers.opencv.org/questions/ and https://stackoverflow.com/ and other communities
22+
to discuss problems. Tickets without real issue statements related to this build toolchain will be closed.
23+
24+
-->
25+
- [ ] I have read the README of this repository and understand that this repository provides only an automated build toolchain for OpenCV Python packages (there is no actual OpenCV code here)
26+
<!--
27+
28+
If you have some OpenCV bug report which needs to fixed in the C++ code,
29+
please report issue to the OpenCV repository:
30+
31+
https://github.com/opencv/opencv/issues
32+
33+
See also:
34+
35+
* OpenCV documentation: https://docs.opencv.org
36+
* OpenCV FAQ page: https://github.com/opencv/opencv/wiki/FAQ
37+
* OpenCV forum: https://answers.opencv.org
38+
* Stack Overflow branch: https://stackoverflow.com/questions/tagged/opencv
39+
40+
-->
41+
- [ ] The issue is related to the build scripts in this repository, to the pre-built binaries or is a feature request (such as "please enable this additional dependency")
42+
- [ ] I'm using the latest version of ``opencv-python``

‎.travis.yml

Copy file name to clipboardExpand all lines: .travis.yml
+141-59Lines changed: 141 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@ env:
44
# pip dependencies to _test_ your project
55
- TEST_DEPENDS="numpy==1.11.1"
66
# params to bdist_wheel. used to set osx build target.
7-
- BDIST_PARAMS=""
87
- CONFIG_PATH="travis_config.sh"
98
- USE_CCACHE=1
109
- UNICODE_WIDTH=32
10+
- SDIST=0
1111

1212
# Save some time, we and setup check them out on demand instead
1313
# https://docs.travis-ci.com/user/customizing-the-build/#Git-Clone-Depth
@@ -28,6 +28,7 @@ stages:
2828

2929
jobs:
3030
fast_finish: true
31+
# Travis exclude is buggy, this seems to be the only way to disable default build
3132
exclude:
3233
- language: ruby
3334
include:
@@ -57,6 +58,48 @@ jobs:
5758
# used in OSX custom build script dealing with local bottle caching
5859
- $HOME/local_bottle_metadata
5960

61+
# source distributions
62+
- os: linux
63+
stage: s1
64+
script: skip
65+
env:
66+
- SDIST=1
67+
- ENABLE_CONTRIB=0
68+
- ENABLE_HEADLESS=0
69+
python: "3.8"
70+
language: python
71+
dist: xenial
72+
- os: linux
73+
stage: s1
74+
script: skip
75+
env:
76+
- SDIST=1
77+
- ENABLE_CONTRIB=0
78+
- ENABLE_HEADLESS=1
79+
python: "3.8"
80+
language: python
81+
dist: xenial
82+
- os: linux
83+
stage: s1
84+
script: skip
85+
env:
86+
- SDIST=1
87+
- ENABLE_CONTRIB=1
88+
- ENABLE_HEADLESS=0
89+
python: "3.8"
90+
language: python
91+
dist: xenial
92+
- os: linux
93+
stage: s1
94+
script: skip
95+
env:
96+
- SDIST=1
97+
- ENABLE_CONTRIB=1
98+
- ENABLE_HEADLESS=1
99+
python: "3.8"
100+
language: python
101+
dist: xenial
102+
60103
# default builds for MacOS
61104
#further jobs in the list will use the same stage until the next assignment
62105
- stage: final
@@ -606,25 +649,28 @@ jobs:
606649

607650
# The first line is printed in the folding header in Travis output
608651
before_install: |
609-
# Check out and prepare the source
610652
set -e
611-
# Multibuild doesn't have releases, so --depth would break eventually (see
612-
# https://superuser.com/questions/1240216/server-does-not-allow-request-for-unadvertised)
613-
git submodule update --init multibuild
614-
echo "Source multibuild/common_utils.sh"
615-
source multibuild/common_utils.sh
616-
# https://github.com/matthew-brett/multibuild/issues/116
617-
if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then export ARCH_FLAGS=" "; fi
618-
echo "Source multibuild/travis_steps.sh"
619-
source multibuild/travis_steps.sh
620-
# This sets -x
621-
echo "Source travis_multibuild_customize.sh"
622-
source travis_multibuild_customize.sh
623-
echo $ENABLE_CONTRIB > contrib.enabled
624-
echo $ENABLE_HEADLESS > headless.enabled
625653
626-
if [ -n "$IS_OSX" ]; then
627-
echo "homebrew"
654+
if [[ $SDIST == 0 ]]; then
655+
# Check out and prepare the source
656+
# Multibuild doesn't have releases, so --depth would break eventually (see
657+
# https://superuser.com/questions/1240216/server-does-not-allow-request-for-unadvertised)
658+
git submodule update --init multibuild
659+
660+
source multibuild/common_utils.sh
661+
662+
# https://github.com/matthew-brett/multibuild/issues/116
663+
if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then export ARCH_FLAGS=" "; fi
664+
665+
source multibuild/travis_steps.sh
666+
# This sets -x
667+
668+
source travis_multibuild_customize.sh
669+
echo $ENABLE_CONTRIB > contrib.enabled
670+
echo $ENABLE_HEADLESS > headless.enabled
671+
672+
if [ -n "$IS_OSX" ]; then
673+
export PATH="/usr/local/sbin:$PATH"
628674
TAPS="$(brew --repository)/Library/Taps"
629675
if [ -e "$TAPS/caskroom/homebrew-cask" -a -e "$TAPS/homebrew/homebrew-cask" ]; then
630676
rm -rf "$TAPS/caskroom/homebrew-cask"
@@ -635,88 +681,124 @@ before_install: |
635681
git clean -fxd || echo "status: $?"
636682
sleep 1 || echo "status: $?"
637683
git status || echo "status: $?"' \; || echo "status: $?"
638-
639684
brew_cache_cleanup
685+
fi
686+
echo "end"
687+
# Not interested in travis internal scripts' output
640688
fi
641-
echo "end"
642-
# Not interested in travis internal scripts' output
689+
643690
set +x
644691
645692
install: |
646693
# Build and package
647694
set -x
648-
build_wheel $REPO_DIR $PLAT
695+
696+
if [[ $SDIST == 1 ]]; then
697+
python -m pip install --upgrade pip
698+
python -m pip install scikit-build
699+
python setup.py sdist
700+
else
701+
build_wheel $REPO_DIR $PLAT
702+
fi
703+
649704
set +x
650705
651706
script: |
652707
# Install and run tests
653708
set -x
654-
install_run $PLAT && rc=$? || rc=$?
709+
if [[ $SDIST == 1 ]]; then
710+
echo "skipping tests because of sdist"
711+
else
712+
install_run $PLAT && rc=$? || rc=$?
713+
fi
714+
655715
set +x
656716
657717
#otherwise, Travis logic terminates prematurely
658718
#https://travis-ci.community/t/shell-session-update-command-not-found-in-build-log-causes-build-to-fail-if-trap-err-is-set/817
659719
trap ERR
660-
661720
test "$rc" -eq 0
662721
663722
before_cache: |
664723
# Cleanup dirs to be cached
665724
set -e; set -x
666725
if [ -n "$IS_OSX" ]; then
667726
668-
# When Taps is cached, this dir causes "Error: file exists" on `brew update`
669-
if [ -e "$(brew --repository)/Library/Taps/homebrew/homebrew-cask/homebrew-cask" ]; then
670-
rm -rf "$(brew --repository)/Library/Taps/homebrew/homebrew-cask/homebrew-cask"
671-
fi
727+
# When Taps is cached, this dir causes "Error: file exists" on `brew update`
728+
if [ -e "$(brew --repository)/Library/Taps/homebrew/homebrew-cask/homebrew-cask" ]; then
729+
rm -rf "$(brew --repository)/Library/Taps/homebrew/homebrew-cask/homebrew-cask"
730+
fi
672731
673-
brew_cache_cleanup
732+
brew_cache_cleanup
674733
675734
fi
676735
set +x; set +e
677736
678737
after_success: |
679-
# Upload wheels to pypi if tag is set, otherwise save to Azure Storage
738+
# Upload wheels to pypi if tag is set
739+
740+
set -x
741+
680742
if [ -n "$TRAVIS_TAG" ]; then
681-
set -x
682743
683-
if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
684-
pip install --user twine
685-
pip install --user --upgrade six
744+
if [[ $ENABLE_CONTRIB == 0 ]]; then
745+
if [[ $ENABLE_HEADLESS == 0 ]]; then
746+
echo "This is default build. Deployment will be done to to PyPI entry opencv-python."
747+
else
748+
echo "This is headless contrib build. Deployment will be done to to PyPI entry opencv-python-headless."
686749
fi
687-
688-
if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
689-
pip install twine
690-
pip install --upgrade pyOpenSSL
750+
else
751+
if [[ $ENABLE_HEADLESS == 0 ]]; then
752+
echo "This is contrib build. Deployment will be done to to PyPI entry opencv-contrib-python."
753+
else
754+
echo "This is headless contrib build. Deployment will be done to to PyPI entry opencv-contrib-python-headless."
691755
fi
756+
fi
757+
758+
if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
759+
pip install --user twine
760+
pip install --user --upgrade six
692761
693-
if [[ $ENABLE_CONTRIB == 0 ]]; then
694-
if [[ $ENABLE_HEADLESS == 0 ]]; then
695-
echo "This is default build. Deployment will be done to to PyPI entry opencv-python."
696-
else
697-
echo "This is headless contrib build. Deployment will be done to to PyPI entry opencv-python-headless."
698-
fi
762+
if [[ $SDIST == 1 ]]; then
763+
twine upload -u ${USER} -p ${PASS} --skip-existing ${TRAVIS_BUILD_DIR}/dist
699764
else
700-
if [[ $ENABLE_HEADLESS == 0 ]]; then
701-
echo "This is contrib build. Deployment will be done to to PyPI entry opencv-contrib-python."
702-
else
703-
echo "This is headless contrib build. Deployment will be done to to PyPI entry opencv-contrib-python-headless."
704-
fi
765+
twine upload -u ${USER} -p ${PASS} --skip-existing ${TRAVIS_BUILD_DIR}/wheelhouse/opencv*
705766
fi
706767
707-
twine upload -u ${USER} -p ${PASS} --skip-existing ${TRAVIS_BUILD_DIR}/wheelhouse/opencv*
708-
set +x
709-
else
710-
set -x
768+
fi
769+
770+
if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
771+
# macpython 3.5 doesn't support recent TLS protocols which causes twine
772+
# upload to fail, so we use the system Python to run twine
773+
/usr/bin/python -m ensurepip --user
774+
/usr/bin/python -m pip install --user -U pip
775+
/usr/bin/python -m pip install --user -U -I twine
711776
712-
if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
713-
curl -sL https://aka.ms/InstallAzureCLIDeb | sudo bash
777+
if [[ $SDIST == 1 ]]; then
778+
/usr/bin/python -m upload -u ${USER} -p ${PASS} --skip-existing ${TRAVIS_BUILD_DIR}/dist
714779
else
715-
brew install azure-cli
780+
/usr/bin/python -m upload -u ${USER} -p ${PASS} --skip-existing ${TRAVIS_BUILD_DIR}/wheelhouse/opencv*
716781
fi
717782
718-
az storage container create -n ${TRAVIS_COMMIT} --public-access blob
719-
az storage blob upload-batch -d ${TRAVIS_COMMIT} -s ${TRAVIS_BUILD_DIR}/wheelhouse --pattern *.whl
783+
fi
720784
721-
set -x
722785
fi
786+
787+
# Save to Azure storage always
788+
789+
if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
790+
curl -sL https://aka.ms/InstallAzureCLIDeb | sudo bash
791+
else
792+
brew install azure-cli
793+
fi
794+
795+
az storage container create -n ${TRAVIS_COMMIT} --public-access blob
796+
797+
if [[ $SDIST == 1 ]]; then
798+
az storage blob upload-batch -d ${TRAVIS_COMMIT} -s ${TRAVIS_BUILD_DIR}/dist --pattern *.gz
799+
else
800+
az storage blob upload-batch -d ${TRAVIS_COMMIT} -s ${TRAVIS_BUILD_DIR}/wheelhouse --pattern opencv*.whl
801+
fi
802+
803+
set +x
804+

‎MANIFEST.in

Copy file name to clipboard
+11Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
include LICENSE-3RD-PARTY.txt
2+
include LICENSE.txt
3+
include README.md
4+
include find_version.py
5+
include setup.py
6+
include pyproject.toml
7+
recursive-include cv2 *
8+
recursive-include docker *
9+
recursive-include opencv *
10+
recursive-include opencv_contrib *
11+
recursive-include patches *

0 commit comments

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