environment: USER: secure: fXgF9uyy6sT0JoVOR7BoqA== PASS: secure: HHNjmjxQSvgSY9Zde0qh6A== matrix: - PYTHON: "C:/Python27" BUILD_ENV: "Visual Studio 14" BUILD_DIR: "build" PYTHON_VERSION: "2.7" - PYTHON: "C:/Python27-x64" BUILD_ENV: "Visual Studio 14 Win64" BUILD_DIR: "build64" PYTHON_VERSION: "2.7" - PYTHON: "C:/Python34" BUILD_ENV: "Visual Studio 14" BUILD_DIR: "build" PYTHON_VERSION: "3.4" - PYTHON: "C:/Python34-x64" BUILD_ENV: "Visual Studio 14 Win64" BUILD_DIR: "build64" PYTHON_VERSION: "3.4" - PYTHON: "C:/Python35" BUILD_ENV: "Visual Studio 14" BUILD_DIR: "build" PYTHON_VERSION: "3.5" - PYTHON: "C:/Python35-x64" BUILD_ENV: "Visual Studio 14 Win64" BUILD_DIR: "build64" PYTHON_VERSION: "3.5" install: - cmd: >- git submodule update --init --recursive C:\Python35\python.exe find_version.py "%PYTHON%/python.exe" -m pip install --upgrade pip "%PYTHON%/python.exe" -m pip install -r requirements.txt build_script: - cmd: |- if not exist "%APPVEYOR_BUILD_FOLDER%\opencv\%BUILD_DIR%" mkdir "%APPVEYOR_BUILD_FOLDER%\opencv\%BUILD_DIR%" cd opencv if %PYTHON_VERSION% GEQ 3 cmake -G "%BUILD_ENV%" -H"." -B"%BUILD_DIR%" -DBUILD_SHARED_LIBS=OFF -DBUILD_TESTS=OFF -DBUILD_PERF_TESTS=OFF -DPYTHON3_EXECUTABLE="%PYTHON%/python.exe" -DPYTHON3_LIBRARY="%PYTHON%/libs/python3*.lib" -DPYTHON3_INCLUDE_DIR="%PYTHON%/include" -Wno-dev if %PYTHON_VERSION% LSS 3 cmake -G "%BUILD_ENV%" -H"." -B"%BUILD_DIR%" -DBUILD_SHARED_LIBS=OFF -DBUILD_TESTS=OFF -DBUILD_PERF_TESTS=OFF -Wno-dev cd %BUILD_DIR% cmake --build . --config Release cd ..\.. cd if %PYTHON_VERSION% GEQ 3 xcopy "%APPVEYOR_BUILD_FOLDER%\opencv\%BUILD_DIR%\lib\python3\Release\*.pyd" .\cv2 /I if %PYTHON_VERSION% LSS 3 xcopy "%APPVEYOR_BUILD_FOLDER%\opencv\%BUILD_DIR%\lib\RELEASE\*.pyd" .\cv2 /I xcopy "%APPVEYOR_BUILD_FOLDER%\opencv\%BUILD_DIR%\bin\Release\*.dll" .\cv2 /I dir "%PYTHON%/python.exe" setup.py bdist_wheel before_test: - cmd: >- cd .. "%PYTHON%/python.exe" -m pip install --no-index --find-links=%APPVEYOR_BUILD_FOLDER%\dist\ opencv-python test_script: - cmd: >- cd %APPVEYOR_BUILD_FOLDER%\tests "%PYTHON%/python.exe" -m unittest test artifacts: - path: dist\*.whl name: wheels deploy_script: - cd %APPVEYOR_BUILD_FOLDER% - if "%APPVEYOR_REPO_TAG%"=="true" (python -m twine upload -u %USER% -p %PASS% --skip-existing dist/opencv*) else (echo "Tag not set, deployment skipped.")