def _copy_platform(self):
        if os.path.isdir(self.platform_path):
            platform_path = self.platform_path
        else:
            logger.info(
                'No platform-specific info found at %s', self.platform_path)
            platform_path = os.path.join(self.src_path, 'linux')
            logger.info('Defaulting to %s', platform_path)
            # Set license text path since we're overriding it above
            self.license_txt_path = os.path.join(
                platform_path, self._license_file)

        logger.info('Converting markdown files')
        self._convert_md_files()

        # copy platform-specific content
        for f in os.listdir(platform_path):
            f_src = os.path.join(platform_path, f)

            # blacklist files and dirs by name
            # these files will not be copied
            if f in self._blacklist:
                logger.info('Skipping path (blacklisted) %s', f_src)
                continue

            f_dst = os.path.join(self.build_dir, f)
            if os.path.isdir(f_src):
                copydir(f_src, f_dst)
            elif os.path.isfile(f_src):
                copyfile(f_src, f_dst)
            else:
                logger.warning("Not sure what to do with %s", f_src)
Ejemplo n.º 2
0
    def _copy_platform(self):
        if os.path.isdir(self.platform_path):
            platform_path = self.platform_path
        else:
            logger.info('No platform-specific info found at %s',
                        self.platform_path)
            platform_path = os.path.join(self.src_path, 'linux')
            logger.info('Defaulting to %s', platform_path)
            # Set license text path since we're overriding it above
            self.license_txt_path = os.path.join(platform_path,
                                                 self._license_file)

        logger.info('Converting markdown files')
        self._convert_md_files()

        # copy platform-specific content
        for f in os.listdir(platform_path):
            f_src = os.path.join(platform_path, f)

            # blocklist files and dirs by name
            # these files will not be copied
            if f in self._blocklist:
                logger.info('Skipping path (blocklisted) %s', f_src)
                continue

            f_dst = os.path.join(self.build_dir, f)
            if os.path.isdir(f_src):
                copydir(f_src, f_dst)
            elif os.path.isfile(f_src):
                copyfile(f_src, f_dst)
            else:
                logger.warning("Not sure what to do with %s", f_src)
Ejemplo n.º 3
0
    def _copy_platform(self):
        # copy platform-specific content
        for f in os.listdir(self.platform_path):
            f_src = os.path.join(self.platform_path, f)

            # blacklist files and dirs by name
            # these files will not be copied
            if f in self._blacklist:
                logger.info('Skipping path (blacklisted) %s', f_src)
                continue

            f_dst = os.path.join(self.target_path, f)
            if os.path.isdir(f_src):
                copydir(f_src, f_dst)
            elif os.path.isfile(f_src):
                copyfile(f_src, f_dst)
            else:
                logger.warning("Not sure what to do with %s", f_src)
 def _copy_common_dirs(self):
     # copy other dirs
     for d in self._common_dirs:
         d_src = os.path.join(self.src_path, d)
         d_dst = os.path.join(self.build_dir, d)
         copydir(d_src, d_dst)
Ejemplo n.º 5
0
 def _copy_common_dirs(self):
     # copy other dirs
     for d in self._common_dirs:
         d_src = os.path.join(self.src_path, d)
         d_dst = os.path.join(self.target_path, d)
         copydir(d_src, d_dst)