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"))
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"))
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()
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)
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()
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()
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")
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()
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()
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()
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 '
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"))
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
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()
def build(self): at = Autotools(self) at.configure(build_script_folder=self._source_subfolder) at.make()
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()