示例#1
0
文件: test_command.py 项目: khuno/rpg
 def test_command_concat(self):
     cmd = Command("cd %s" % self.test_project_dir)
     cmd.append_cmdlines("cmake ..")
     cmd.append_cmdlines(["make", "make test"])
     self.assertRaises(TypeError, cmd.append_cmdlines, 4)
     expected = "cd %s\ncmake ..\nmake\nmake test" % self.test_project_dir
     self.assertEqual(expected, str(cmd))
示例#2
0
文件: cmake.py 项目: khuno/rpg
 def patched(self, project_dir, spec, sack):
     if (project_dir / "CMakeLists.txt").is_file():
         logging.debug('CMakeLists.txt found')
         build = Command()
         build.append_cmdlines("cmake " + str(project_dir))
         build.append_cmdlines("make")
         install = Command("make install DESTDIR=$RPM_BUILD_ROOT")
         spec.scripts["%build"] = build
         spec.scripts["%install"] = install
示例#3
0
 def patched(self, project_dir, spec, sack):
     if (project_dir / "CMakeLists.txt").is_file():
         logging.debug('CMakeLists.txt found')
         build = Command()
         build.append_cmdlines("cmake " + str(project_dir))
         build.append_cmdlines("make")
         install = Command("make install DESTDIR=$RPM_BUILD_ROOT")
         spec.scripts["%build"] = build
         spec.scripts["%install"] = install