@@ -647,7 +647,7 @@ jobs:
647
647
before_install : |
648
648
set -e
649
649
650
- if [ -n " $SDIST" ]; then
650
+ if [[ $SDIST == 1 ] ]; then
651
651
echo "sdist build"
652
652
else
653
653
# Check out and prepare the source
@@ -691,7 +691,7 @@ install: |
691
691
# Build and package
692
692
set -x
693
693
694
- if [ -n " $SDIST" ]; then
694
+ if [[ $SDIST == 1 ] ]; then
695
695
python -m pip install --upgrade pip
696
696
python -m pip install scikit-build
697
697
python setup.py sdist
@@ -705,7 +705,7 @@ script: |
705
705
# Install and run tests
706
706
set -x
707
707
708
- if [ -n " $SDIST" ]; then
708
+ if [[ $SDIST == 1 ] ]; then
709
709
echo "sdist"
710
710
else
711
711
install_run $PLAT && rc=$? || rc=$?
@@ -741,47 +741,47 @@ after_success: |
741
741
742
742
if [ -n "$TRAVIS_TAG" ]; then
743
743
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."
749
- fi
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."
755
- fi
756
- fi
757
-
758
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
759
- pip install --user twine
760
- pip install --user --upgrade six
761
-
762
- if [ -n "$SDIST" ]; then
763
- twine upload -u ${USER} -p ${PASS} --skip-existing ${TRAVIS_BUILD_DIR}/dist
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."
749
+ fi
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."
764
753
else
765
- twine upload -u ${USER} -p ${PASS} --skip-existing ${TRAVIS_BUILD_DIR}/wheelhouse/opencv*
754
+ echo "This is headless contrib build. Deployment will be done to to PyPI entry opencv-contrib-python-headless."
766
755
fi
756
+ fi
757
+
758
+ if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
759
+ pip install --user twine
760
+ pip install --user --upgrade six
767
761
762
+ if [[ $SDIST == 1 ]]; then
763
+ twine upload -u ${USER} -p ${PASS} --skip-existing ${TRAVIS_BUILD_DIR}/dist
764
+ else
765
+ twine upload -u ${USER} -p ${PASS} --skip-existing ${TRAVIS_BUILD_DIR}/wheelhouse/opencv*
768
766
fi
769
767
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
768
+ fi
776
769
777
- if [ -n "$SDIST" ]; then
778
- /usr/bin/python -m upload -u ${USER} -p ${PASS} --skip-existing ${TRAVIS_BUILD_DIR}/dist
779
- else
780
- /usr/bin/python -m upload -u ${USER} -p ${PASS} --skip-existing ${TRAVIS_BUILD_DIR}/wheelhouse/opencv*
781
- fi
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
782
776
777
+ if [[ $SDIST == 1 ]]; then
778
+ /usr/bin/python -m upload -u ${USER} -p ${PASS} --skip-existing ${TRAVIS_BUILD_DIR}/dist
779
+ else
780
+ /usr/bin/python -m upload -u ${USER} -p ${PASS} --skip-existing ${TRAVIS_BUILD_DIR}/wheelhouse/opencv*
783
781
fi
784
782
783
+ fi
784
+
785
785
fi
786
786
787
787
# Save to Azure storage always
@@ -794,7 +794,7 @@ after_success: |
794
794
795
795
az storage container create -n ${TRAVIS_COMMIT} --public-access blob
796
796
797
- if [ -n " $SDIST" ]; then
797
+ if [[ $SDIST == 1 ] ]; then
798
798
az storage blob upload-batch -d ${TRAVIS_COMMIT} -s ${TRAVIS_BUILD_DIR}/dist --pattern *.gz
799
799
else
800
800
az storage blob upload-batch -d ${TRAVIS_COMMIT} -s ${TRAVIS_BUILD_DIR}/wheelhouse --pattern *.whl
0 commit comments