Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build via setup.py proper using scikit-build #58

Merged
merged 81 commits into from
Feb 19, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
81 commits
Select commit Hold shift + click to select a range
e58de0c
Adjust build environment as per https://docs.opencv.org/3.1.0/d5/de5/…
native-api Nov 13, 2017
d26f639
The best practice is to only use requirements.txt for deployments, no…
native-api Nov 20, 2017
18c608a
ignore PyCharm metadata
native-api Nov 20, 2017
d7a64de
refactor to be more modular
native-api Nov 21, 2017
2f405ae
the warnings are irrelevant in older versions
native-api Nov 21, 2017
b6f4d62
v110 toolset might introduce dependency on older runtime not likely t…
native-api Nov 21, 2017
90ef0d4
build locally with scikit-build
native-api Nov 24, 2017
033f413
adjust appveyor config to local build
native-api Nov 29, 2017
97d7d83
cleanup
native-api Nov 29, 2017
804a994
DLL load works without
native-api Nov 23, 2017
03435a2
fail appveyor build immediately when one job fails
native-api Dec 4, 2017
39fa503
* cmd doesn't expand globs
native-api Dec 1, 2017
4ed0348
ignore temporary config files
native-api Dec 17, 2017
471ed0d
Merge branch 'master' into build_locally
native-api Dec 17, 2017
7e7e5e9
Merge branch 'master' into build_locally
native-api Dec 17, 2017
6d3b3f3
Yet another .pyd naming convention in Py35 Linux.
native-api Dec 18, 2017
5f5c8d0
Update setup.py file to flag compatibility with Python 2.7-3.4-3.5-3.…
DEKHTIARJonathan Dec 14, 2017
1668690
Adjust build environment as per https://docs.opencv.org/3.1.0/d5/de5/…
native-api Nov 13, 2017
8228730
The best practice is to only use requirements.txt for deployments, no…
native-api Nov 20, 2017
359d186
ignore PyCharm metadata
native-api Nov 20, 2017
fe23cdb
refactor to be more modular
native-api Nov 21, 2017
064256e
the warnings are irrelevant in older versions
native-api Nov 21, 2017
a676ced
v110 toolset might introduce dependency on older runtime not likely t…
native-api Nov 21, 2017
21caeb8
build locally with scikit-build
native-api Nov 24, 2017
b4f3f89
adjust appveyor config to local build
native-api Nov 29, 2017
b096318
cleanup
native-api Nov 29, 2017
02ef3a2
DLL load works without
native-api Nov 23, 2017
76174b8
fail appveyor build immediately when one job fails
native-api Dec 4, 2017
6ceaa71
* cmd doesn't expand globs
native-api Dec 1, 2017
e18f857
ignore temporary config files
native-api Dec 17, 2017
a0089df
fail fast on error
native-api Dec 17, 2017
dc7cd4c
* custom build logic should be unneeded now, will uncomment as needed
native-api Dec 18, 2017
6330dcd
use the latest upstream multibuild
native-api Dec 18, 2017
626f6b5
enable tracing
native-api Dec 18, 2017
1f3ea8b
save some build time
native-api Dec 18, 2017
ef8ebbc
these somehow cause "Server does not allow request for unadvertised o…
native-api Dec 18, 2017
bf5d3b4
Revert "use the latest upstream multibuild"
native-api Dec 18, 2017
a497772
Yet another .pyd naming convention in Py35 Linux.
native-api Dec 18, 2017
64744f3
Update setup.py file to flag compatibility with Python 2.7-3.4-3.5-3.…
DEKHTIARJonathan Dec 14, 2017
d0979e1
add diagnostics
native-api Dec 18, 2017
11ef99e
* Use upstream multubuild due to the forked one abusing prebuild as b…
native-api Dec 19, 2017
51da353
save some time
native-api Dec 19, 2017
1fffd25
looks like clean_code() isn't required
native-api Dec 19, 2017
9e29ac3
* Don't make CMake try Ninja first
native-api Dec 19, 2017
a047ec2
See build progress as it goes
native-api Dec 19, 2017
ca0fcc0
update submodules on demand
native-api Dec 19, 2017
f224efc
fetch source in time for find_version.py
native-api Dec 19, 2017
653a212
use custom docker image
native-api Dec 20, 2017
2ded5f0
use custom multibuild
native-api Dec 20, 2017
55d71d5
bump submodule
native-api Dec 20, 2017
de9c286
Linux/OSX are supposed to build with Qt support
native-api Dec 20, 2017
8d2862f
* make shallow copies to save on download time
native-api Dec 22, 2017
2c1a77a
* clean up redundant syntax
native-api Dec 23, 2017
dd4c72e
IPP IW broken in Linux
native-api Dec 24, 2017
fc74bef
+ ffmpeg patch
native-api Dec 24, 2017
30769e6
additional deps required due to multibuild bug
native-api Dec 25, 2017
950ad91
+cv2.data
native-api Dec 25, 2017
1401b28
Use upstream multibuild with monkey patch
native-api Dec 27, 2017
58d6ee4
don't do anything if upload not needed
native-api Dec 30, 2017
d1b44a1
filter out irrelevant debug output
native-api Dec 30, 2017
82368e9
* clean up unused scripts
native-api Dec 31, 2017
cf86c6e
https://github.com/matthew-brett/multibuild/issues/106 fixed
native-api Jan 2, 2018
8eab1ef
* bump OpenCV version to 3.4.0
native-api Jan 2, 2018
29691ad
* https://github.com/opencv/opencv/pull/10011 is available in 3.4.0
native-api Jan 2, 2018
9c10609
* don't reinstall whatever happens to be preinstalled
native-api Jan 12, 2018
9810642
* rearrange custom CMake flags
native-api Jan 3, 2018
2131de9
fix linux detection to work in 3.3+, too
native-api Jan 13, 2018
f603717
fix data path for other OSes
native-api Jan 13, 2018
710ed1d
may be LegacyVersion, too
native-api Jan 16, 2018
7532518
don't do anything unless deployment is requested
native-api Jan 16, 2018
e23d8b6
Merge branch 'master' into build_locally_travis
native-api Jan 16, 2018
e1ecef5
use upstream ``devel`` multibuild
native-api Jan 16, 2018
1229c5e
restore from backup after rebase
native-api Jan 17, 2018
8648d52
catch fetch error
native-api Jan 17, 2018
809cf7b
use `devel` multibuild
native-api Jan 17, 2018
b6b7460
Merge branch 'master' of https://github.com/skvark/opencv-python into…
native-api Jan 19, 2018
83ddb27
Merge branch 'build_locally_travis' into build_locally
native-api Jan 19, 2018
1939480
comment not using --depth
native-api Jan 20, 2018
2cc4092
fix appveyor.yml after merge
native-api Jan 21, 2018
6e10fa4
re-delete line after merge
native-api Jan 21, 2018
1eeca2e
remove redundant command after merge
native-api Jan 21, 2018
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -60,3 +60,10 @@ target/

#Ipython Notebook
.ipynb_checkpoints

#PyCharm
/.idea

# Build temporary files
/contrib.enabled
/cv_version.py
3 changes: 2 additions & 1 deletion .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
url = https://github.com/Itseez/opencv.git
[submodule "multibuild"]
path = multibuild
url = https://github.com/skvark/multibuild.git
url = https://github.com/matthew-brett/multibuild.git
branch = devel
[submodule "opencv_contrib"]
path = opencv_contrib
url = https://github.com/opencv/opencv_contrib.git
117 changes: 67 additions & 50 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,80 +1,72 @@
env:
global:
- REPO_DIR=opencv
# Commit from opencv that you want to build
- BUILD_COMMIT=6d4f66472e14b29b8e1623859cfebfdc67f677c3
# pip dependencies to _build_ your project
- BUILD_DEPENDS="numpy==1.11.1"
# pip dependencies to _test_ your project. Include any dependencies
# that you need, that are also specified in BUILD_DEPENDS, this will be
# a separate install.
- "PS4='+(${BASH_SOURCE}:${LINENO}): ${FUNCNAME[0]:+${FUNCNAME[0]}(): }'"
# pip dependencies to _test_ your project
- TEST_DEPENDS="numpy==1.11.1"

- PLAT=x86_64
- UNICODE_WIDTH=32
- secure: "mU040XIYWtDjRms27deQy5fNg9HBFF9fiLfSteBaMjopZKXFUBsdMTKYGEVvX8DA879guMdjG8Prw1aCFhTTYlWgJ0Afm4YucRC0vAD4HLNhqLJ2lIpRceR3+2qPX+Oz5ATVVRi3ghBeJ20LLtNgOgf6esQVjdrYNC+YqmguClHKEYAxS7ngW42iQP8HX2anRcz9q9H7exZ9fX/D1PJfMNka/mNaB5KXZu5zdLuk/E0VbWU2tMWVIDUvx4uBlpE1d8HixEV5LHnuVE/QI36BcyucYxstTNKW6pGYgrhkYf+0PX4BphZXwY7EUBwzXsYLmyge6yH8W6NfvTW0ZasFF6xzQc9bsj+gAZN7H+hN2a42VQqIpkoJw9sU0hqzCOQf6ZvWUQgwFdAHJRHqe/zk4456WxnF0kAgbZdKaGOl0/n0WvgHNqD5bgO8Zzb1XyJTKoR+eAtYKXuz3KgpxKvZMMQVr8wMlI1cFEuGjIm+7ZrYB5jPvQrVzV/DgOq4gkPHOjjhu478UFlhGA9/XWwcyidC3b7zuBN2E7xVuTMlKdk7URB3AHXfG5bZgUG80vllQDGXQDpHVnv4Qi8bGCzI4iKTpp4fCibbqxFLxW1jhjmgePseGcie7Avpe+zXznkbmM2BqMCu3QRmtmFL3eCifwMf3rCNlAs0Sd3iLmEvyos="
- secure: "omn6B+H6s0g1p9rhLGhFtFN1bSB80HCsNUUD9ROEpUirk7Sj7Wxms4CDi1f7aACANsZPXD7YZ72oNpWDJ6hSfTBf2yN1/d1iPILs7F5jt0yeratkDEOXkys1QpfMNO7r3DZ17X3IwvUGy9Mm+Sv15k+DaBdQ/65qwQ4ORIbHZRv3/lwkQ7Z88utjx6DLa9Jwc8fnEjjzIry51lO3OGJoWrjOZlOi2HV9MZ69PuuBdEEuicwfeLnV64QWRle++B51TQZC/3HF5+BBvYXm0LdvV4nSQVa9nTXaOWYcBROPNZizktJI91G6vG6gghWmI1cDR53n9LgCbA3YkPTJm/5Gjn9D+gfU5F16WQ4PFOHfzPZD8nTVmlUDUiuQ30W9QZ+O2ct7wi/xF4/Ff7V+0RIqGSnjhX6SGWk7UziQyGgCjBvYiRIQzfUyGu+86vrqNVXCyBlKOz6rWStTyq/Z0KEIXZFqop+ddeYdsEem5ZxCQ51uTpRMynVgEdKj++1Hn5411Rhntw0Am7RWdDEbFJ65OUyIpNtvlcHVM7ur03oz0hGcZIIkxWHJrCdr80Nw9r/s6KXYvidCNsu4SPx0XYo8KiTA6E2lkIAa5Ct6dZR6m5gjG2vmvlKzRmoD/7byJZN66usNxBh2LuKlgNFuHfG6iR+I6f3XCNmSUOJfm7KZYVI="

language: python
# The travis Python version is unrelated to the version we build and test
# with. This is set with the MB_PYTHON_VERSION variable.
python: 3.5

# Host Python is never used
language: generic
# Required to invoke docker ourselves as per https://docs.travis-ci.com/user/docker/
sudo: required
dist: trusty
services: docker
# https://docs.travis-ci.com/user/reference/trusty/
dist: trusty

# Save some time, we and setup check them out on demand instead
# https://docs.travis-ci.com/user/customizing-the-build/#Git-Clone-Depth
git:
submodules: false


matrix:
exclude:
# Exclude the default Python 3.5 build
- python: 3.5
fast_finish: true
include:

# default builds for MacOS
- os: osx
language: generic
osx_image: xcode8.3
env:
- MB_PYTHON_VERSION=2.7
- ENABLE_CONTRIB=0
- os: osx
language: generic
osx_image: xcode8.3
env:
- MB_PYTHON_VERSION=3.4
- ENABLE_CONTRIB=0
- os: osx
language: generic
osx_image: xcode8.3
env:
- MB_PYTHON_VERSION=3.5
- ENABLE_CONTRIB=0
- os: osx
language: generic
osx_image: xcode8.3
env:
- MB_PYTHON_VERSION=3.6
- ENABLE_CONTRIB=0

# Contrib builds for MacOS
- os: osx
language: generic
osx_image: xcode8.3
env:
- MB_PYTHON_VERSION=2.7
- ENABLE_CONTRIB=1
- os: osx
language: generic
osx_image: xcode8.3
env:
- MB_PYTHON_VERSION=3.4
- ENABLE_CONTRIB=1
- os: osx
language: generic
osx_image: xcode8.3
env:
- MB_PYTHON_VERSION=3.5
- ENABLE_CONTRIB=1
- os: osx
language: generic
osx_image: xcode8.3
env:
- MB_PYTHON_VERSION=3.6
Expand Down Expand Up @@ -123,14 +115,14 @@ matrix:
env:
- MB_PYTHON_VERSION=3.6
- ENABLE_CONTRIB=0
- BUILD_DEPENDS=numpy==1.11.3

- TEST_DEPENDS=numpy==1.11.3
- os: linux
env:
- MB_PYTHON_VERSION=3.6
- PLAT=i686
- ENABLE_CONTRIB=0
- BUILD_DEPENDS=numpy==1.11.3

- TEST_DEPENDS=numpy==1.11.3

# contrib builds for Linux
Expand Down Expand Up @@ -184,7 +176,7 @@ matrix:
env:
- MB_PYTHON_VERSION=3.6

- BUILD_DEPENDS=numpy==1.11.3

- TEST_DEPENDS=numpy==1.11.3
- ENABLE_CONTRIB=1

Expand All @@ -193,29 +185,54 @@ matrix:
- MB_PYTHON_VERSION=3.6

- PLAT=i686
- BUILD_DEPENDS=numpy==1.11.3

- TEST_DEPENDS=numpy==1.11.3
- ENABLE_CONTRIB=1

before_install:
- echo $ENABLE_CONTRIB > contrib.enabled
- source multibuild/common_utils.sh
- source multibuild/travis_steps.sh
- python find_version.py
- cp LICENSE*.txt cv2/
- cp opencv/data/haarcascades/*.xml cv2/data/
- before_install

install:
# Maybe get and clean and patch source
- clean_code $REPO_DIR $BUILD_COMMIT
- travis_wait 120 build_wheel $REPO_DIR $PLAT

script:
- install_run $PLAT

after_success:
# Upload wheels to pypi
- pip install twine
- if [ -n "$TRAVIS_TAG" ]; then twine upload -u ${USER} -p ${PASS} --skip-existing ${TRAVIS_BUILD_DIR}/wheelhouse/opencv*; else echo "Tag not set, deployment skipped."; fi
- source travis/deploy.sh
# The first line is printed in the folding header in Travis output
before_install: |
# Check out and prepare the source
set -e
#Multibuild doesn't have releases, so --depth would break eventually (see
#https://superuser.com/questions/1240216/server-does-not-allow-request-for-unadvertised)
git submodule update --init multibuild
source multibuild/common_utils.sh
# https://github.com/matthew-brett/multibuild/issues/116
if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then export ARCH_FLAGS=" "; fi
source multibuild/travis_steps.sh
# This sets -x
source multibuild_customize.sh
echo $ENABLE_CONTRIB > contrib.enabled
before_install
# Not interested in travis internal scripts' output
set +x

install: |
# Build and package
set -x
build_wheel $REPO_DIR $PLAT
set +x

script: |
# Install and run tests
set -x
install_run $PLAT
set +x

after_success: |
# Upload wheels to pypi if requested
if [ -n "$TRAVIS_TAG" ]; then
set -x
pip install twine

if [[ $ENABLE_CONTRIB == 0 ]]; then
echo "This is default build. Deployment will be done to to PyPI entry opencv-python."
else
echo "This is contrib build. Deployment will be done to to PyPI entry opencv-contrib-python."
fi

twine upload -u ${USER} -p ${PASS} --skip-existing ${TRAVIS_BUILD_DIR}/wheelhouse/opencv*
set +x
else
echo "Tag not set, deployment skipped."
fi
Loading