def copy_extensions_to_source(self):
    build_py = self.get_finalized_command('build_py')
    for ext in self.extensions:
        if (ext.language == 'java'):
            fullname = self.get_ext_fullname('JAVA')
            filename = (ext.name + '.jar')
        else:
            fullname = self.get_ext_fullname(ext.name)
            filename = self.get_ext_filename(fullname)
        modpath = fullname.split('.')
        package = '.'.join(modpath[:(- 1)])
        package_dir = build_py.get_package_dir(package)
        dest_filename = os.path.join(package_dir, os.path.basename(filename))
        src_filename = os.path.join(self.build_lib, filename)
        distutils.file_util.copy_file(src_filename, dest_filename, verbose=self.verbose, dry_run=self.dry_run)
        if ext._needs_stub:
            self.write_stub((package_dir or os.curdir), ext, True)
def copy_extensions_to_source(self):
    build_py = self.get_finalized_command('build_py')
    for ext in self.extensions:
        if (ext.language == 'java'):
            fullname = self.get_ext_fullname('JAVA')
            filename = (ext.name + '.jar')
        else:
            fullname = self.get_ext_fullname(ext.name)
            filename = self.get_ext_filename(fullname)
        modpath = fullname.split('.')
        package = '.'.join(modpath[:(- 1)])
        package_dir = build_py.get_package_dir(package)
        dest_filename = os.path.join(package_dir, os.path.basename(filename))
        src_filename = os.path.join(self.build_lib, filename)
        distutils.file_util.copy_file(src_filename, dest_filename, verbose=self.verbose, dry_run=self.dry_run)
        if ext._needs_stub:
            self.write_stub((package_dir or os.curdir), ext, True)