Skip to content

Commit 023ccbe

Browse files
committed
Added a deprecation warning log to the Python 2 recipe during build
1 parent 7d6f32b commit 023ccbe

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

pythonforandroid/recipes/python2/__init__.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
from os.path import join, exists
22
from pythonforandroid.recipe import Recipe
33
from pythonforandroid.python import GuestPythonRecipe
4-
from pythonforandroid.logger import shprint
4+
from pythonforandroid.logger import shprint, warning
55
import sh
66

77

@@ -57,6 +57,11 @@ def prebuild_arch(self, arch):
5757
self.apply_patch(join('patches', 'enable-openssl.patch'), arch.arch)
5858
shprint(sh.touch, patch_mark)
5959

60+
def build_arch(self, arch):
61+
warning('DEPRECATION: Support for the Python 2 recipe will be '
62+
'removed in 2020, please upgrade to Python 3.')
63+
super().build_arch(arch)
64+
6065
def set_libs_flags(self, env, arch):
6166
env = super(Python2Recipe, self).set_libs_flags(env, arch)
6267
if 'libffi' in self.ctx.recipe_build_order:

0 commit comments

Comments
 (0)