Skip to content

Commit 28411b7

Browse files
authored
Avoids build error for opencv and bumps version to 4.5.1 (#2419)
* Avoids 'Permission Denied' error during docker build * Avoids build error for opencv and bumps version to 4.5.1 * Update opencv-extras to 4.5.1
1 parent dc2806e commit 28411b7

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ RUN mkdir ${ANDROID_HOME} && chown --recursive ${USER} ${HOME_DIR} ${ANDROID_HOM
9898
USER ${USER}
9999

100100
# Download and install android's NDK/SDK
101-
COPY ci/makefiles/android.mk /tmp/android.mk
101+
COPY --chown=user:user ci/makefiles/android.mk /tmp/android.mk
102102
RUN make --file /tmp/android.mk \
103103
&& sudo rm /tmp/android.mk
104104

pythonforandroid/recipes/opencv/__init__.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ class OpenCVRecipe(NDKRecipe):
1313
build of most of the libraries of the opencv's package, so we can
1414
process images, videos, objects, photos...
1515
'''
16-
version = '4.0.1'
16+
version = '4.5.1'
1717
url = 'https://github.com/opencv/opencv/archive/{version}.zip'
1818
depends = ['numpy']
1919
patches = ['patches/p4a_build.patch']
@@ -75,6 +75,8 @@ def build_arch(self, arch):
7575
'-DANDROID_STANDALONE_TOOLCHAIN={}'.format(self.ctx.ndk_dir),
7676
'-DANDROID_NATIVE_API_LEVEL={}'.format(self.ctx.ndk_api),
7777
'-DANDROID_EXECUTABLE={}/tools/android'.format(env['ANDROID_SDK']),
78+
'-DANDROID_SDK_TOOLS_VERSION=6514223',
79+
'-DANDROID_PROJECTS_SUPPORT_GRADLE=ON',
7880

7981
'-DCMAKE_TOOLCHAIN_FILE={}'.format(
8082
join(self.ctx.ndk_dir, 'build', 'cmake',

pythonforandroid/recipes/opencv_extras/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ class OpenCVExtrasRecipe(Recipe):
1515
.. seealso:: https://github.com/opencv/opencv_contrib
1616
1717
"""
18-
version = '4.0.1'
18+
version = '4.5.1'
1919
url = 'https://github.com/opencv/opencv_contrib/archive/{version}.zip'
2020
depends = ['opencv']
2121

0 commit comments

Comments
 (0)