How to use the python-for-android.pythonforandroid.archs.Arch function in python-for-android

To help you get started, we’ve selected a few python-for-android examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github codelv / enaml-native / python-for-android / pythonforandroid / archs.py View on Github external
class Archx86(Arch):
    arch = 'x86'
    toolchain_prefix = 'x86'
    command_prefix = 'i686-linux-android'
    platform_dir = 'arch-x86'

    def get_env(self, with_flags_in_cc=True):
        env = super(Archx86, self).get_env(with_flags_in_cc)
        env['CFLAGS'] += ' -march=i686 -mtune=intel -mssse3 -mfpmath=sse -m32'
        env['CXXFLAGS'] = env['CFLAGS']
        return env


class Archx86_64(Arch):
    arch = 'x86_64'
    toolchain_prefix = 'x86_64'
    command_prefix = 'x86_64-linux-android'
    platform_dir = 'arch-x86_64'

    def get_env(self, with_flags_in_cc=True):
        env = super(Archx86_64, self).get_env(with_flags_in_cc)
        env['CFLAGS'] += ' -march=x86-64 -msse4.2 -mpopcnt -m64 -mtune=intel'
        env['CXXFLAGS'] = env['CFLAGS']
        return env


class ArchAarch_64(Arch):
    arch = 'arm64-v8a'
    toolchain_prefix = 'aarch64-linux-android'
    command_prefix = 'aarch64-linux-android'
github codelv / enaml-native / python-for-android / pythonforandroid / archs.py View on Github external
class Archx86_64(Arch):
    arch = 'x86_64'
    toolchain_prefix = 'x86_64'
    command_prefix = 'x86_64-linux-android'
    platform_dir = 'arch-x86_64'

    def get_env(self, with_flags_in_cc=True):
        env = super(Archx86_64, self).get_env(with_flags_in_cc)
        env['CFLAGS'] += ' -march=x86-64 -msse4.2 -mpopcnt -m64 -mtune=intel'
        env['CXXFLAGS'] = env['CFLAGS']
        return env


class ArchAarch_64(Arch):
    arch = 'arm64-v8a'
    toolchain_prefix = 'aarch64-linux-android'
    command_prefix = 'aarch64-linux-android'
    platform_dir = 'arch-arm64'

    def get_env(self, with_flags_in_cc=True):
        env = super(ArchAarch_64, self).get_env(with_flags_in_cc)
        incpath = ' -I' + join(dirname(__file__), 'includes', 'arm64-v8a')
        env['EXTRA_CFLAGS'] = incpath
        env['CFLAGS'] += incpath
        env['CXXFLAGS'] += incpath
        if with_flags_in_cc:
            env['CC'] += incpath
            env['CXX'] += incpath
        return env
github codelv / enaml-native-cli / python-for-android / pythonforandroid / archs.py View on Github external
def __init__(self, ctx):
        super(Arch, self).__init__()
        self.ctx = ctx
github codelv / enaml-native / python-for-android / pythonforandroid / archs.py View on Github external
toolchain_prefix = 'arm-linux-androideabi'
    command_prefix = 'arm-linux-androideabi'
    platform_dir = 'arch-arm'


class ArchARMv7_a(ArchARM):
    arch = 'armeabi-v7a'

    def get_env(self, with_flags_in_cc=True):
        env = super(ArchARMv7_a, self).get_env(with_flags_in_cc)
        env['CFLAGS'] += ' -march=armv7-a -mfloat-abi=softfp -mfpu=vfp -mthumb'
        env['CXXFLAGS'] = env['CFLAGS']
        return env


class Archx86(Arch):
    arch = 'x86'
    toolchain_prefix = 'x86'
    command_prefix = 'i686-linux-android'
    platform_dir = 'arch-x86'

    def get_env(self, with_flags_in_cc=True):
        env = super(Archx86, self).get_env(with_flags_in_cc)
        env['CFLAGS'] += ' -march=i686 -mtune=intel -mssse3 -mfpmath=sse -m32'
        env['CXXFLAGS'] = env['CFLAGS']
        return env


class Archx86_64(Arch):
    arch = 'x86_64'
    toolchain_prefix = 'x86_64'
    command_prefix = 'x86_64-linux-android'
github codelv / enaml-native-cli / python-for-android / pythonforandroid / archs.py View on Github external
toolchain_prefix = 'arm-linux-androideabi'
    command_prefix = 'arm-linux-androideabi'
    platform_dir = 'arch-arm'


class ArchARMv7_a(ArchARM):
    arch = 'armeabi-v7a'

    def get_env(self, with_flags_in_cc=True):
        env = super(ArchARMv7_a, self).get_env(with_flags_in_cc)
        env['CFLAGS'] += ' -march=armv7-a -mfloat-abi=softfp -mfpu=vfp -mthumb'
        env['CXXFLAGS'] = env['CFLAGS']
        return env


class Archx86(Arch):
    arch = 'x86'
    toolchain_prefix = 'x86'
    command_prefix = 'i686-linux-android'
    platform_dir = 'arch-x86'

    def get_env(self, with_flags_in_cc=True):
        env = super(Archx86, self).get_env(with_flags_in_cc)
        env['CFLAGS'] += ' -march=i686 -mtune=intel -mssse3 -mfpmath=sse -m32'
        env['CXXFLAGS'] = env['CFLAGS']
        return env


class Archx86_64(Arch):
    arch = 'x86_64'
    toolchain_prefix = 'x86_64'
    command_prefix = 'x86_64-linux-android'
github codelv / enaml-native / python-for-android / pythonforandroid / archs.py View on Github external
def __init__(self, ctx):
        super(Arch, self).__init__()
        self.ctx = ctx
github codelv / enaml-native-cli / python-for-android / pythonforandroid / archs.py View on Github external
class Archx86_64(Arch):
    arch = 'x86_64'
    toolchain_prefix = 'x86_64'
    command_prefix = 'x86_64-linux-android'
    platform_dir = 'arch-x86_64'

    def get_env(self, with_flags_in_cc=True):
        env = super(Archx86_64, self).get_env(with_flags_in_cc)
        env['CFLAGS'] += ' -march=x86-64 -msse4.2 -mpopcnt -m64 -mtune=intel'
        env['CXXFLAGS'] = env['CFLAGS']
        return env


class ArchAarch_64(Arch):
    arch = 'arm64-v8a'
    toolchain_prefix = 'aarch64-linux-android'
    command_prefix = 'aarch64-linux-android'
    platform_dir = 'arch-arm64'

    def get_env(self, with_flags_in_cc=True):
        env = super(ArchAarch_64, self).get_env(with_flags_in_cc)
        incpath = ' -I' + join(dirname(__file__), 'includes', 'arm64-v8a')
        env['EXTRA_CFLAGS'] = incpath
        env['CFLAGS'] += incpath
        env['CXXFLAGS'] += incpath
        if with_flags_in_cc:
            env['CC'] += incpath
            env['CXX'] += incpath
        return env
github codelv / enaml-native-cli / python-for-android / pythonforandroid / archs.py View on Github external
class Archx86(Arch):
    arch = 'x86'
    toolchain_prefix = 'x86'
    command_prefix = 'i686-linux-android'
    platform_dir = 'arch-x86'

    def get_env(self, with_flags_in_cc=True):
        env = super(Archx86, self).get_env(with_flags_in_cc)
        env['CFLAGS'] += ' -march=i686 -mtune=intel -mssse3 -mfpmath=sse -m32'
        env['CXXFLAGS'] = env['CFLAGS']
        return env


class Archx86_64(Arch):
    arch = 'x86_64'
    toolchain_prefix = 'x86_64'
    command_prefix = 'x86_64-linux-android'
    platform_dir = 'arch-x86_64'

    def get_env(self, with_flags_in_cc=True):
        env = super(Archx86_64, self).get_env(with_flags_in_cc)
        env['CFLAGS'] += ' -march=x86-64 -msse4.2 -mpopcnt -m64 -mtune=intel'
        env['CXXFLAGS'] = env['CFLAGS']
        return env


class ArchAarch_64(Arch):
    arch = 'arm64-v8a'
    toolchain_prefix = 'aarch64-linux-android'
    command_prefix = 'aarch64-linux-android'
github codelv / enaml-native-cli / python-for-android / pythonforandroid / archs.py View on Github external
hostpython_recipe.get_build_dir(self.arch),
                'build', 'lib.linux-{}-2.7'.format(uname()[-1]))
        except IOError:
            pass

        env['PATH'] = environ['PATH']

        env['ARCH'] = self.arch

        if self.ctx.python_recipe and self.ctx.python_recipe.from_crystax:
            env['CRYSTAX_PYTHON_VERSION'] = self.ctx.python_recipe.version

        return env


class ArchARM(Arch):
    arch = "armeabi"
    toolchain_prefix = 'arm-linux-androideabi'
    command_prefix = 'arm-linux-androideabi'
    platform_dir = 'arch-arm'


class ArchARMv7_a(ArchARM):
    arch = 'armeabi-v7a'

    def get_env(self, with_flags_in_cc=True):
        env = super(ArchARMv7_a, self).get_env(with_flags_in_cc)
        env['CFLAGS'] += ' -march=armv7-a -mfloat-abi=softfp -mfpu=vfp -mthumb'
        env['CXXFLAGS'] = env['CFLAGS']
        return env
github codelv / enaml-native / python-for-android / pythonforandroid / archs.py View on Github external
# AND: This hardcodes python version 2.7, needs fixing
        env['BUILDLIB_PATH'] = join(
            hostpython_recipe.get_build_dir(self.arch),
            'build', 'lib.linux-{}-2.7'.format(uname()[-1]))

        env['PATH'] = environ['PATH']

        env['ARCH'] = self.arch

        if self.ctx.python_recipe and self.ctx.python_recipe.from_crystax:
            env['CRYSTAX_PYTHON_VERSION'] = self.ctx.python_recipe.version

        return env


class ArchARM(Arch):
    arch = "armeabi"
    toolchain_prefix = 'arm-linux-androideabi'
    command_prefix = 'arm-linux-androideabi'
    platform_dir = 'arch-arm'


class ArchARMv7_a(ArchARM):
    arch = 'armeabi-v7a'

    def get_env(self, with_flags_in_cc=True):
        env = super(ArchARMv7_a, self).get_env(with_flags_in_cc)
        env['CFLAGS'] += ' -march=armv7-a -mfloat-abi=softfp -mfpu=vfp -mthumb'
        env['CXXFLAGS'] = env['CFLAGS']
        return env

python-for-android

A development tool that packages Python apps into binaries that can run on Android devices.

MIT
Latest version published 10 months ago

Package Health Score

76 / 100
Full package analysis

Similar packages