コード例 #1
0
 def package(self):
     copy(self, "COPYING", src=self.source_folder, dst=os.path.join(self.package_folder, "licenses"))
     autotools = Autotools(self)
     autotools.install()
     # TODO: replace by conan.tools.files.rm (conan 1.50.0)
     tools_legacy.remove_files_by_mask(os.path.join(self.package_folder, "lib"), "*.la")
     rmdir(self, os.path.join(self.package_folder, "lib", "pkgconfig"))
     rmdir(self, os.path.join(self.package_folder, "share"))
コード例 #2
0
 def package(self):
     self.copy(pattern="COPYING",
               dst="licenses",
               src=self._source_subfolder)
     autotools = Autotools(self)
     autotools.install()
     tools.remove_files_by_mask(os.path.join(self.package_folder, "lib"),
                                "*.la")
     tools.rmdir(os.path.join(self.package_folder, "lib", "pkgconfig"))
     tools.rmdir(os.path.join(self.package_folder, "share"))
コード例 #3
0
 def build(self):
     tools.save(
         os.path.join(self._source_subfolder, "libkmod", "docs",
                      "gtk-doc.make"), "")
     self.run("autoreconf -fiv", cwd=self._source_subfolder)
     if conan_version < tools.Version("1.48.0"):
         autotools = Autotools(self)
         autotools.configure(build_script_folder=self._source_subfolder)
     else:
         autotools = Autotools(self,
                               build_script_folder=self._source_subfolder)
         autotools.configure()
     autotools.make()
コード例 #4
0
    def package(self):
        self.copy(pattern="COPYING*",
                  dst="licenses",
                  src=self._source_subfolder)

        at = Autotools(self)
        at.install()

        tools.remove_files_by_mask(os.path.join(self.package_folder, "lib"),
                                   "*.la")
        tools.rmdir(os.path.join(self.package_folder, "share"))
        for dir in glob(
                os.path.join(self.package_folder,
                             "{}*".format(self.settings.arch))):
            tools.rmdir(dir)
コード例 #5
0
    def build(self):
        # autoreconf
        self.run("{} -fiv".format(tools.get_env("AUTORECONF") or "autoreconf"),
                 win_bash=tools.os_info.is_windows,
                 run_environment=True,
                 cwd=self._source_subfolder)

        if conan_version < tools.Version("1.48.0"):
            autotools = Autotools(self)
            autotools.configure(build_script_folder=self._source_subfolder)
        else:
            autotools = Autotools(self,
                                  build_script_folder=self._source_subfolder)
            autotools.configure()
        autotools.make()
コード例 #6
0
    def build(self):
        apply_conandata_patches(self)

        if self._is_msvc:
            self.conf["tools.gnu:make_program"] = "nmake"

            if "TMP" in os.environ:  # workaround for TMP in CCI containing both forward and back slashes
                os.environ["TMP"] = os.environ["TMP"].replace("/", "\\")

        with tools.vcvars(self):
            if conan_version < tools.Version("1.48.0"):
                at = Autotools(self)
                at.configure(build_script_folder=self._build_script_folder)
            else:
                at = Autotools(self,
                               build_script_folder=self._build_script_folder)
                at.configure()
            at.make()
コード例 #7
0
    def package(self):
        for file in ["COPYING", "BSDL"]:
            self.copy(file, dst="licenses", src=self._source_subfolder)

        if conan_version < tools.Version("1.48.0"):
            at = Autotools(self)
        else:
            at = Autotools(self, build_script_folder=self._build_script_folder)
        with tools.vcvars(self):
            if cross_building(self):
                at.make(target="install-local")
                at.make(target="install-arch")
            else:
                at.install()

        tools.rmdir(os.path.join(self.package_folder, "share"))
        tools.rmdir(os.path.join(self.package_folder, "lib", "pkgconfig"))
        tools.remove_files_by_mask(os.path.join(self.package_folder, "lib"),
                                   "*.pdb")
コード例 #8
0
 def build(self):
     tools.save(
         os.path.join(self._source_subfolder, "libkmod", "docs",
                      "gtk-doc.make"), "")
     self.run("autoreconf -fiv", cwd=self._source_subfolder)
     autotools = Autotools(self)
     autotools.configure(build_script_folder=self._source_subfolder)
     autotools.make()
コード例 #9
0
    def build(self):
        self.run("{} -fiv".format(tools.get_env("AUTORECONF") or "autoreconf"),
                 win_bash=tools.os_info.is_windows,
                 run_environment=True,
                 cwd=self._source_subfolder)

        autotools = Autotools(self)
        autotools.configure(build_script_folder=self._source_subfolder)
        autotools.make()
コード例 #10
0
 def build(self):
     save(
         self,
         os.path.join(self._source_subfolder, "libkmod", "docs",
                      "gtk-doc.make"), "")
     self.run("{} -fiv".format(tools.get_env("AUTORECONF") or "autoreconf"),
              win_bash=tools.os_info.is_windows,
              run_environment=True,
              cwd=self._source_subfolder)
     autotools = Autotools(self)
     autotools.configure(build_script_folder=self._source_subfolder)
     autotools.make()
コード例 #11
0
def test_source_folder_works():
    folder = temp_folder()
    os.chdir(folder)
    save_toolchain_args({
        "configure_args": "-foo bar",
        "make_args": "",
        "autoreconf_args": ""
    })
    conanfile = ConanFileMock()
    conanfile.folders.set_base_install(folder)
    sources = "/path/to/sources"
    conanfile.folders.set_base_source(sources)
    autotools = Autotools(conanfile)
    autotools.configure(build_script_folder="subfolder")
    assert conanfile.command.replace(
        "\\", "/") == '"/path/to/sources/subfolder/configure" -foo bar '

    autotools = Autotools(conanfile)
    autotools.configure()
    assert conanfile.command.replace(
        "\\", "/") == '"/path/to/sources/configure" -foo bar '
コード例 #12
0
 def package(self):
     self.copy(pattern="COPYING",
               dst="licenses",
               src=self._source_subfolder)
     if conan_version < tools.Version("1.48.0"):
         autotools = Autotools(self)
     else:
         autotools = Autotools(self,
                               build_script_folder=self._source_subfolder)
     autotools.install()
     tools.remove_files_by_mask(os.path.join(self.package_folder, "lib"),
                                "*.la")
     tools.rmdir(os.path.join(self.package_folder, "lib", "pkgconfig"))
     tools.rmdir(os.path.join(self.package_folder, "share"))
コード例 #13
0
ファイル: autotools_test.py プロジェクト: Enhex/conan
def test_configure_arguments():
    tmp = temp_folder()
    os.chdir(tmp)
    save_toolchain_args({
        "configure_args": "my_configure_args",
        "make_args": "my_make_args"
    })
    runner = RunnerMock()
    conanfile = ConanFile(Mock(), runner=runner)
    conanfile.settings = MockSettings({})
    conanfile.folders.set_base_install(tmp)
    conanfile.folders.set_base_source(tmp)
    conanfile.conf = Conf()
    conanfile.conf["tools.gnu:make_program"] = "my_make"
    conanfile.conf["tools.build:jobs"] = "23"
    ab = Autotools(conanfile)
    ab.configure()
    assert "configure my_configure_args" in runner.command_called

    ab = Autotools(conanfile)
    ab.make()
    assert "my_make my_make_args -j23" in runner.command_called
コード例 #14
0
    def build(self):
        apply_conandata_patches(self)

        at = Autotools(self)

        build_script_folder = self._source_subfolder
        if self._is_msvc:
            self.conf["tools.gnu:make_program"] = "nmake"
            build_script_folder = os.path.join(build_script_folder, "win32")

            if "TMP" in os.environ:  # workaround for TMP in CCI containing both forward and back slashes
                os.environ["TMP"] = os.environ["TMP"].replace("/", "\\")

        with tools.vcvars(self):
            at.configure(build_script_folder=build_script_folder)
            at.make()
コード例 #15
0
 def build(self):
     at = Autotools(self)
     at.configure(build_script_folder=self._source_subfolder)
     at.make()
コード例 #16
0
 def build(self):
     save(self, os.path.join(self.source_folder, "libkmod", "docs", "gtk-doc.make"), "")
     autotools = Autotools(self)
     autotools.autoreconf()
     autotools.configure()
     autotools.make()