Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 2ff72c1

Browse files
committedJul 4, 2020
merge manylinux2014 to 3.4
2 parents d958923 + f2b30d6 commit 2ff72c1

11 files changed

+1970
-198
lines changed
 

Diff for: ‎.travis.yml

+16
Original file line numberDiff line numberDiff line change
@@ -239,6 +239,7 @@ jobs:
239239
- PLAT=i686
240240
- ENABLE_CONTRIB=0
241241
- ENABLE_HEADLESS=0
242+
- USE_CCACHE=0
242243
cache:
243244
directories: $HOME/.ccache
244245
- os: linux
@@ -262,6 +263,7 @@ jobs:
262263
- ENABLE_CONTRIB=0
263264
- ENABLE_HEADLESS=0
264265
- TEST_DEPENDS=numpy==1.11.3
266+
- USE_CCACHE=0
265267
cache:
266268
directories: $HOME/.ccache
267269
- os: linux
@@ -285,6 +287,7 @@ jobs:
285287
- ENABLE_CONTRIB=0
286288
- ENABLE_HEADLESS=0
287289
- TEST_DEPENDS=numpy==1.14.5
290+
- USE_CCACHE=0
288291
cache:
289292
directories: $HOME/.ccache
290293
- os: linux
@@ -308,6 +311,7 @@ jobs:
308311
- ENABLE_CONTRIB=0
309312
- ENABLE_HEADLESS=0
310313
- TEST_DEPENDS=numpy==1.17.3
314+
- USE_CCACHE=0
311315
cache:
312316
directories: $HOME/.ccache
313317

@@ -331,6 +335,7 @@ jobs:
331335
- PLAT=i686
332336
- ENABLE_CONTRIB=0
333337
- ENABLE_HEADLESS=1
338+
- USE_CCACHE=0
334339
cache:
335340
directories: $HOME/.ccache
336341
- os: linux
@@ -354,6 +359,7 @@ jobs:
354359
- ENABLE_CONTRIB=0
355360
- ENABLE_HEADLESS=1
356361
- TEST_DEPENDS=numpy==1.11.3
362+
- USE_CCACHE=0
357363
cache:
358364
directories: $HOME/.ccache
359365
- os: linux
@@ -377,6 +383,7 @@ jobs:
377383
- ENABLE_CONTRIB=0
378384
- ENABLE_HEADLESS=1
379385
- TEST_DEPENDS=numpy==1.14.5
386+
- USE_CCACHE=0
380387
cache:
381388
directories: $HOME/.ccache
382389
- os: linux
@@ -400,6 +407,7 @@ jobs:
400407
- ENABLE_CONTRIB=0
401408
- ENABLE_HEADLESS=1
402409
- TEST_DEPENDS=numpy==1.17.3
410+
- USE_CCACHE=0
403411
cache:
404412
directories: $HOME/.ccache
405413

@@ -423,6 +431,7 @@ jobs:
423431
- PLAT=i686
424432
- ENABLE_CONTRIB=1
425433
- ENABLE_HEADLESS=0
434+
- USE_CCACHE=0
426435
cache:
427436
directories: $HOME/.ccache
428437
- os: linux
@@ -446,6 +455,7 @@ jobs:
446455
- TEST_DEPENDS=numpy==1.11.3
447456
- ENABLE_CONTRIB=1
448457
- ENABLE_HEADLESS=0
458+
- USE_CCACHE=0
449459
cache:
450460
directories: $HOME/.ccache
451461
- os: linux
@@ -469,6 +479,7 @@ jobs:
469479
- TEST_DEPENDS=numpy==1.14.5
470480
- ENABLE_CONTRIB=1
471481
- ENABLE_HEADLESS=0
482+
- USE_CCACHE=0
472483
cache:
473484
directories: $HOME/.ccache
474485
- os: linux
@@ -492,6 +503,7 @@ jobs:
492503
- TEST_DEPENDS=numpy==1.17.3
493504
- ENABLE_CONTRIB=1
494505
- ENABLE_HEADLESS=0
506+
- USE_CCACHE=0
495507
cache:
496508
directories: $HOME/.ccache
497509

@@ -516,6 +528,7 @@ jobs:
516528
- PLAT=i686
517529
- ENABLE_CONTRIB=1
518530
- ENABLE_HEADLESS=1
531+
- USE_CCACHE=0
519532
cache:
520533
directories: $HOME/.ccache
521534
- os: linux
@@ -539,6 +552,7 @@ jobs:
539552
- TEST_DEPENDS=numpy==1.11.3
540553
- ENABLE_CONTRIB=1
541554
- ENABLE_HEADLESS=1
555+
- USE_CCACHE=0
542556
cache:
543557
directories: $HOME/.ccache
544558
- os: linux
@@ -562,6 +576,7 @@ jobs:
562576
- TEST_DEPENDS=numpy==1.14.5
563577
- ENABLE_CONTRIB=1
564578
- ENABLE_HEADLESS=1
579+
- USE_CCACHE=0
565580
cache:
566581
directories: $HOME/.ccache
567582
- os: linux
@@ -585,6 +600,7 @@ jobs:
585600
- TEST_DEPENDS=numpy==1.17.3
586601
- ENABLE_CONTRIB=1
587602
- ENABLE_HEADLESS=1
603+
- USE_CCACHE=0
588604
cache:
589605
directories: $HOME/.ccache
590606

Diff for: ‎LICENSE-3RD-PARTY.txt

+1,624-50
Large diffs are not rendered by default.

Diff for: ‎README.md

+20
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,17 @@ In addition to any variables that OpenCV's build accepts, we recognize:
118118
- ``ENABLE_CONTRIB`` and ``ENABLE_HEADLESS``. Set to ``1`` to build the contrib and/or headless version
119119
- ``CMAKE_ARGS``. Additional arguments for OpenCV's CMake invocation. You can use this to make a custom build.
120120

121+
### Manual builds
122+
123+
If some dependency is not enabled in the pre-built wheels, you can also run the `setup.py` locally to create a custom wheel.
124+
125+
1. Clone this repository: `git clone --recursive https://github.com/skvark/opencv-python.git`
126+
2. Go to the root of the repository
127+
3. Add custom Cmake flags if needed, for example: `export CMAKE_FLAGS="-DSOME_FLAG=ON -DSOME_OTHER_FLAG=OFF"`
128+
4. Run ``python setup.py bdist_wheel``
129+
- Optionally use the `manylinux` images as a build hosts if maximum portability is needed (and run `auditwheel` for the wheel after build)
130+
5. You'll have the wheel file in the `dist` folder and you can do with that whatever you wish
131+
121132
### Licensing
122133

123134
Opencv-python package (scripts in this repository) is available under MIT license.
@@ -132,6 +143,8 @@ Linux wheels ship with [Qt 4.8.7](http://doc.qt.io/qt-4.8/lgpl.html) licensed un
132143

133144
MacOS wheels ship with [Qt 5](http://doc.qt.io/qt-5/lgpl.html) licensed under the [LGPLv3](http://www.gnu.org/licenses/lgpl-3.0.html).
134145

146+
The packages include also other binaries. Full list of licenses can be found from [LICENSE-3RD-PARTY.txt](https://github.com/skvark/opencv-python/blob/master/LICENSE-3RD-PARTY.txt).
147+
135148
### Versioning
136149

137150
``find_version.py`` script searches for the version information from OpenCV sources and appends also a revision number specific to this repository to the version string.
@@ -168,3 +181,10 @@ Currently, builds for following Python versions are provided:
168181
- 3.6
169182
- 3.7
170183
- 3.8
184+
185+
### Backward compatibility
186+
187+
Starting from 4.2.0 and 3.4.9 builds the macOS Travis build environment was updated to XCode 9.4. The change effectively dropped support for older than 10.13 macOS versions.
188+
189+
Starting from 4.3.0 and 3.4.10 builds the Linux build environment was updated from `manylinux1` to `manylinux2014`. This dropped support for old Linux distributions.
190+

Diff for: ‎docker/README.md

+4-7
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,9 @@
11
### Customized manylinux images for opencv-python
22

3-
This folder includes Dockerfiles for extending both ``i686`` and ``x86_64`` manylinux images.
3+
The subfolders include Dockerfiles for extending both ``i686`` and ``x86_64`` manylinux1 and manylinux2014 images.
44

5-
The extended images were created to be able to build OpenCV in reasonable time with Travis. The images are hosted at https://quay.io/user/skvark.
5+
Manylinux2014 is used in wheels with version 3.4.10.* / 4.3.0.* and above.
66

7-
The images have following extra software installed:
7+
The extended images were created to be able to build OpenCV in reasonable time with Travis. The images are hosted at https://quay.io/user/skvark.
88

9-
- Qt 4.8.7
10-
- Cmake 3.9.0
11-
- FFmpeg with libvpx (latest snapshots at the build time) and recent openssl + other FFmpeg dependencies built from sources
12-
- Some missing headers included from more recent Linux to be able to enable V4L / V4L2 support in OpenCV
9+
See the dockerfiles for more info.
File renamed without changes.
File renamed without changes.

Diff for: ‎docker/manylinux2014/Dockerfile_i686

+77
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
FROM quay.io/pypa/manylinux2014_i686:latest
2+
3+
RUN yum install bzip2-devel curl-devel zlib-devel qt-devel -y
4+
5+
RUN mkdir ~/ffmpeg_sources && \
6+
cd ~/ffmpeg_sources && \
7+
curl -O -L https://github.com/openssl/openssl/archive/OpenSSL_1_1_1c.tar.gz && \
8+
tar -xf OpenSSL_1_1_1c.tar.gz && \
9+
cd openssl-OpenSSL_1_1_1c && \
10+
# in i686, ./config detects x64 in i686 container without linux32
11+
# when run from "docker build"
12+
linux32 ./config --prefix="$HOME/ffmpeg_build" --openssldir="$HOME/ffmpeg_build" shared zlib && \
13+
make -j$(getconf _NPROCESSORS_ONLN) && \
14+
#skip installing documentation
15+
make install_sw && \
16+
rm -rf ~/openssl_build
17+
18+
RUN cd ~/ffmpeg_sources && \
19+
curl -O -L http://www.nasm.us/pub/nasm/releasebuilds/2.14.01/nasm-2.14.01.tar.bz2 && \
20+
tar -xf nasm-2.14.01.tar.bz2 && cd nasm-2.14.01 && ./autogen.sh && \
21+
linux32 ./configure && \
22+
make -j$(getconf _NPROCESSORS_ONLN) && \
23+
make install
24+
25+
RUN cd ~/ffmpeg_sources && \
26+
curl -O -L http://www.tortall.net/projects/yasm/releases/yasm-1.3.0.tar.gz && \
27+
tar -xf yasm-1.3.0.tar.gz && \
28+
cd yasm-1.3.0 && \
29+
linux32 ./configure && \
30+
make -j$(getconf _NPROCESSORS_ONLN) && \
31+
make install
32+
33+
RUN cd ~/ffmpeg_sources && \
34+
git clone --depth 1 https://chromium.googlesource.com/webm/libvpx.git && \
35+
cd libvpx && \
36+
linux32 ./configure --prefix="$HOME/ffmpeg_build" --disable-examples --disable-unit-tests --enable-vp9-highbitdepth --as=yasm --enable-pic --enable-shared && \
37+
make -j$(getconf _NPROCESSORS_ONLN) && \
38+
make install
39+
40+
RUN cd ~/ffmpeg_sources && \
41+
curl -O -L https://ffmpeg.org/releases/ffmpeg-snapshot.tar.bz2 && \
42+
tar -xf ffmpeg-snapshot.tar.bz2 && \
43+
cd ffmpeg && \
44+
PATH=~/bin:$PATH && \
45+
PKG_CONFIG_PATH="$HOME/ffmpeg_build/lib/pkgconfig" linux32 ./configure --prefix="$HOME/ffmpeg_build" --extra-cflags="-I$HOME/ffmpeg_build/include" --extra-ldflags="-L$HOME/ffmpeg_build/lib" --enable-openssl --enable-libvpx --enable-shared --enable-pic --bindir="$HOME/bin" && \
46+
make -j$(getconf _NPROCESSORS_ONLN) && \
47+
make install && \
48+
echo "/root/ffmpeg_build/lib/" >> /etc/ld.so.conf && \
49+
ldconfig && \
50+
rm -rf ~/ffmpeg_sources
51+
52+
RUN curl -O -L https://github.com/ccache/ccache/releases/download/v3.7.9/ccache-3.7.9.tar.gz && \
53+
tar -xf ccache-3.7.9.tar.gz && \
54+
cd ccache-3.7.9 && \
55+
linux32 ./configure && \
56+
make -j$(getconf _NPROCESSORS_ONLN) && \
57+
make install
58+
59+
RUN curl -O -L https://github.com/Kitware/CMake/releases/download/v3.17.0/cmake-3.17.0.tar.gz && \
60+
tar -xf cmake-3.17.0.tar.gz && \
61+
cd cmake-3.17.0 && \
62+
export MAKEFLAGS=-j$(getconf _NPROCESSORS_ONLN) && \
63+
./configure --system-curl && \
64+
make && \
65+
make install && \
66+
cd .. && \
67+
rm -rf cmake-3.17.0*
68+
69+
ENV PKG_CONFIG_PATH /usr/local/lib/pkgconfig:/root/ffmpeg_build/lib/pkgconfig
70+
ENV LDFLAGS -L/root/ffmpeg_build/lib
71+
72+
# in i686, yum metadata ends up with slightly wrong timestamps
73+
# which inhibits its update
74+
# https://github.com/skvark/opencv-python/issues/148
75+
RUN yum clean all
76+
77+
ENV PATH "$HOME/bin:$PATH"

Diff for: ‎docker/manylinux2014/Dockerfile_x86_64

+52
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
FROM quay.io/pypa/manylinux2014_x86_64:latest
2+
3+
RUN yum install bzip2-devel curl-devel zlib-devel qt-devel -y
4+
5+
RUN mkdir ~/ffmpeg_sources && \
6+
cd ~/ffmpeg_sources && \
7+
curl -O -L https://github.com/openssl/openssl/archive/OpenSSL_1_1_1c.tar.gz && \
8+
tar -xf OpenSSL_1_1_1c.tar.gz && \
9+
cd openssl-OpenSSL_1_1_1c && \
10+
./config --prefix="$HOME/ffmpeg_build" --openssldir="$HOME/ffmpeg_build" shared zlib && \
11+
make -j$(getconf _NPROCESSORS_ONLN) && \
12+
# skip installing documentation
13+
make install_sw && \
14+
rm -rf ~/openssl_build
15+
16+
RUN cd ~/ffmpeg_sources && \
17+
curl -O -L http://www.nasm.us/pub/nasm/releasebuilds/2.14.01/nasm-2.14.01.tar.bz2 && \
18+
tar -xf nasm-2.14.01.tar.bz2 && cd nasm-2.14.01 && ./autogen.sh && \
19+
./configure --prefix="$HOME/ffmpeg_build" --bindir="$HOME/bin" && \
20+
make -j$(getconf _NPROCESSORS_ONLN) && \
21+
make install
22+
23+
RUN cd ~/ffmpeg_sources && \
24+
curl -O -L http://www.tortall.net/projects/yasm/releases/yasm-1.3.0.tar.gz && \
25+
tar -xf yasm-1.3.0.tar.gz && \
26+
cd yasm-1.3.0 && \
27+
./configure --prefix="$HOME/ffmpeg_build" --bindir="$HOME/bin" && \
28+
make -j$(getconf _NPROCESSORS_ONLN) && \
29+
make install
30+
31+
RUN cd ~/ffmpeg_sources && \
32+
git clone --depth 1 https://chromium.googlesource.com/webm/libvpx.git && \
33+
cd libvpx && \
34+
./configure --prefix="$HOME/ffmpeg_build" --disable-examples --disable-unit-tests --enable-vp9-highbitdepth --as=yasm --enable-pic --enable-shared && \
35+
make -j$(getconf _NPROCESSORS_ONLN) && \
36+
make install
37+
38+
RUN cd ~/ffmpeg_sources && \
39+
curl -O -L https://ffmpeg.org/releases/ffmpeg-snapshot.tar.bz2 && \
40+
tar -xf ffmpeg-snapshot.tar.bz2 && \
41+
cd ffmpeg && \
42+
PATH=~/bin:$PATH && \
43+
PKG_CONFIG_PATH="$HOME/ffmpeg_build/lib/pkgconfig" ./configure --prefix="$HOME/ffmpeg_build" --extra-cflags="-I$HOME/ffmpeg_build/include" --extra-ldflags="-L$HOME/ffmpeg_build/lib" --enable-openssl --enable-libvpx --enable-shared --enable-pic --bindir="$HOME/bin" && \
44+
make -j$(getconf _NPROCESSORS_ONLN) && \
45+
make install && \
46+
echo "/root/ffmpeg_build/lib/" >> /etc/ld.so.conf && \
47+
ldconfig && \
48+
rm -rf ~/ffmpeg_sources
49+
50+
ENV PKG_CONFIG_PATH /usr/local/lib/pkgconfig:/root/ffmpeg_build/lib/pkgconfig
51+
ENV LDFLAGS -L/root/ffmpeg_build/lib
52+
ENV PATH "$HOME/bin:$PATH"

Diff for: ‎setup.py

+176-139
Large diffs are not rendered by default.

Diff for: ‎travis_config.sh

-1
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,6 @@ function pre_build {
124124
else
125125
echo "Running for linux"
126126
fi
127-
qmake -query
128127
}
129128

130129
function run_tests {

Diff for: ‎travis_multibuild_customize.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@
33
export PS4='+(${BASH_SOURCE}:${LINENO}): ${FUNCNAME[0]:+${FUNCNAME[0]}(): }'
44
set -x
55
REPO_DIR=$(dirname "${BASH_SOURCE[0]}")
6-
DOCKER_IMAGE='quay.io/skvark/manylinux1_$plat'
6+
DOCKER_IMAGE='quay.io/skvark/manylinux2014_$plat'

0 commit comments

Comments
 (0)
Please sign in to comment.