<commit_before>from pythonforandroid.toolchain import Bootstrap, shprint, current_directory, info, warning, ArchARM, info_main
from os.path import join, exists
from os import walk
import glob
import sh

class SDL2Bootstrap(Bootstrap):
    name = 'sdl2'

    recipe_depends = ['sdl2']

    def run_distribute(self):
        info_main('# Creating Android project from build and {} bootstrap'.format(
            self.name))

        info('This currently just copies the SDL2 build stuff straight from the build dir.')
        shprint(sh.rm, '-rf', self.dist_dir)
        shprint(sh.cp, '-r', self.build_dir, self.dist_dir)
        with current_directory(self.dist_dir):
            with open('local.properties', 'w') as fileh:
                fileh.write('sdk.dir={}'.format(self.ctx.sdk_dir))

        arch = self.ctx.archs[0]
        if len(self.ctx.archs) > 1:
            raise ValueError('built for more than one arch, but bootstrap cannot handle that yet')
        info('Bootstrap running with arch {}'.format(arch))

        with current_directory(self.dist_dir):
            info('Copying python distribution')

            if not exists('private') and not self.ctx.ndk_is_crystax:
                shprint(sh.mkdir, 'private')
            if not exists('crystax_python') and self.ctx.ndk_is_crystax:
                shprint(sh.mkdir, 'crystax_python')
                shprint(sh.mkdir, 'crystax_python/crystax_python')
            if not exists('assets'):
                shprint(sh.mkdir, 'assets')<commit_msg>Added python to sdl2 bootstrap depends<commit_after>from pythonforandroid.toolchain import Bootstrap, shprint, current_directory, info, warning, ArchARM, info_main
from os.path import join, exists
from os import walk
import glob
import sh

class SDL2Bootstrap(Bootstrap):
    name = 'sdl2'

    recipe_depends = ['sdl2', ('python2', 'python3crystax')]

    def run_distribute(self):
        info_main('# Creating Android project from build and {} bootstrap'.format(
            self.name))

        info('This currently just copies the SDL2 build stuff straight from the build dir.')
        shprint(sh.rm, '-rf', self.dist_dir)
        shprint(sh.cp, '-r', self.build_dir, self.dist_dir)
        with current_directory(self.dist_dir):
            with open('local.properties', 'w') as fileh:
                fileh.write('sdk.dir={}'.format(self.ctx.sdk_dir))

        arch = self.ctx.archs[0]
        if len(self.ctx.archs) > 1:
            raise ValueError('built for more than one arch, but bootstrap cannot handle that yet')
        info('Bootstrap running with arch {}'.format(arch))

        with current_directory(self.dist_dir):
            info('Copying python distribution')

            if not exists('private') and not self.ctx.ndk_is_crystax:
                shprint(sh.mkdir, 'private')
            if not exists('crystax_python') and self.ctx.ndk_is_crystax:
                shprint(sh.mkdir, 'crystax_python')
                shprint(sh.mkdir, 'crystax_python/crystax_python')
            if not exists('assets'):
                shprint(sh.mkdir, 'assets')
{'fraction_non_alphanumeric': 0.11003236245954692, 'fraction_numerical': 0.0048543689320388345, 'mean_word_length': 2.7240963855421687, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3738757', 'n_tokens_mistral': 952, 'n_tokens_neox': 893, 'n_words': 244}