コード例 #1
0
    def _fix_xml_tools(self, unpackdir):
        xml2_config_path = os.path.join(unpackdir, 'usr', 'bin', 'xml2-config')
        with contextlib.suppress(FileNotFoundError):
            file_utils.search_and_replace_contents(
                xml2_config_path, re.compile(r'prefix=/usr'),
                'prefix={}/usr'.format(unpackdir))

        xslt_config_path = os.path.join(unpackdir, 'usr', 'bin', 'xslt-config')
        with contextlib.suppress(FileNotFoundError):
            file_utils.search_and_replace_contents(
                xslt_config_path, re.compile(r'prefix=/usr'),
                'prefix={}/usr'.format(unpackdir))
コード例 #2
0
ファイル: _base.py プロジェクト: cholcombe973/snapcraft
    def _fix_xml_tools(self, unpackdir):
        xml2_config_path = os.path.join(
            unpackdir, 'usr', 'bin', 'xml2-config')
        with contextlib.suppress(FileNotFoundError):
            file_utils.search_and_replace_contents(
                xml2_config_path, re.compile(r'prefix=/usr'),
                'prefix={}/usr'.format(unpackdir))

        xslt_config_path = os.path.join(
            unpackdir, 'usr', 'bin', 'xslt-config')
        with contextlib.suppress(FileNotFoundError):
            file_utils.search_and_replace_contents(
                xslt_config_path, re.compile(r'prefix=/usr'),
                'prefix={}/usr'.format(unpackdir))
コード例 #3
0
ファイル: _base.py プロジェクト: mvo5/snapcraft
    def _fix_xml_tools(self, unpackdir):
        xml2_config_path = os.path.join(unpackdir, "usr", "bin", "xml2-config")
        with contextlib.suppress(FileNotFoundError):
            file_utils.search_and_replace_contents(
                xml2_config_path,
                re.compile(r"prefix=/usr"),
                "prefix={}/usr".format(unpackdir),
            )

        xslt_config_path = os.path.join(unpackdir, "usr", "bin", "xslt-config")
        with contextlib.suppress(FileNotFoundError):
            file_utils.search_and_replace_contents(
                xslt_config_path,
                re.compile(r"prefix=/usr"),
                "prefix={}/usr".format(unpackdir),
            )
コード例 #4
0
    def _fix_xml_tools(self, unpackdir):
        xml2_config_path = os.path.join(unpackdir, "usr", "bin", "xml2-config")
        with contextlib.suppress(FileNotFoundError):
            file_utils.search_and_replace_contents(
                xml2_config_path,
                re.compile(r"prefix=/usr"),
                "prefix={}/usr".format(unpackdir),
            )

        xslt_config_path = os.path.join(unpackdir, "usr", "bin", "xslt-config")
        with contextlib.suppress(FileNotFoundError):
            file_utils.search_and_replace_contents(
                xslt_config_path,
                re.compile(r"prefix=/usr"),
                "prefix={}/usr".format(unpackdir),
            )