2019-03-30 21:58:45 +01:00
|
|
|
from pythonforandroid.recipe import PythonRecipe
|
|
|
|
|
2017-08-13 03:24:00 +02:00
|
|
|
|
|
|
|
class Enum34Recipe(PythonRecipe):
|
2019-03-30 21:58:45 +01:00
|
|
|
version = '1.1.6'
|
2017-08-13 03:24:00 +02:00
|
|
|
url = 'https://pypi.python.org/packages/source/e/enum34/enum34-{version}.tar.gz'
|
2019-03-30 21:58:45 +01:00
|
|
|
depends = ['setuptools']
|
2017-08-13 03:24:00 +02:00
|
|
|
site_packages_name = 'enum'
|
|
|
|
call_hostpython_via_targetpython = False
|
|
|
|
|
2019-03-30 21:58:45 +01:00
|
|
|
def should_build(self, arch):
|
|
|
|
if 'python3' in self.ctx.python_recipe.name:
|
|
|
|
# Since python 3.6 the enum34 library is no longer compatible with
|
|
|
|
# the standard library and it will cause errors, so we disable it
|
|
|
|
# in favour of the internal module, but we still add python3 to
|
|
|
|
# attribute `depends` because otherwise we will not be able to
|
|
|
|
# build the cryptography recipe.
|
|
|
|
return False
|
|
|
|
return super(Enum34Recipe, self).should_build(arch)
|
|
|
|
|
|
|
|
|
2017-08-13 03:24:00 +02:00
|
|
|
recipe = Enum34Recipe()
|