def testFillArgs(self):
     pm = PackageMaker()
     args = {'r': 'root', 'i': 'pkg_id', 'n': 'version', 't': 'title',
             'l': 'destination', 'o': 'output_file'}
     cmd = pm._cmd_with_args(args)
     self.assertEquals(cmd,
         "./PackageMaker  -i 'pkg_id' -l 'destination' -o 'output_file' "
         "-n 'version' -r 'root' -t 'title'")
 def testFillArgs(self):
     pm = PackageMaker()
     args = {'r': 'root', 'i': 'pkg_id', 'n': 'version', 't': 'title',
             'l': 'destination', 'o': 'output_file'}
     cmd = pm._cmd_with_args(args)
     self.assertEquals(cmd,
         "./PackageMaker  -i 'pkg_id' -l 'destination' -o 'output_file' "
         "-n 'version' -r 'root' -t 'title'")
Beispiel #3
0
 def _create_package(self, output_dir, install_dir, version):
     output_file = os.path.join(output_dir, '%s-%s-%s.pkg' %
             (self.name, self.package.version,
              self.config.target_arch))
     root = self.create_bundle()
     packagemaker = PackageMaker()
     packagemaker.create_package(root, self.package.identifier(),
         self.package.version, self.title, output_file,
         install_dir, target=None)
     return output_file
Beispiel #4
0
 def _create_package(self, package_type, output_dir, force, target):
     self.package.set_mode(package_type)
     files = self.files_list(package_type, force)
     output_file = os.path.join(output_dir, '%s-%s-%s.pkg' %
             (self.package.name, self.version, self.config.target_arch))
     root, resources = self._create_bundle(files, package_type)
     packagemaker = PackageMaker()
     packagemaker.create_package(root, self.package.identifier(),
         self.package.version, self.package.shortdesc, output_file,
         self._get_install_dir(), target, scripts_path=resources)
     return output_file
Beispiel #5
0
 def _create_pmdoc(self, package_type):
     self.package.set_mode(package_type)
     m.action(_("Creating pmdoc for package %s " % self.package))
     pmdoc = PMDoc(self.package, self.store, self.tmp,
             self.packages_paths[package_type],
             self.empty_packages[package_type], package_type)
     pmdoc_path = pmdoc.create()
     output_file = os.path.join(self.output_dir, self._package_name('.pkg'))
     output_file = os.path.abspath(output_file)
     pm = PackageMaker()
     pm.create_package_from_pmdoc(pmdoc_path, output_file)
     return output_file
Beispiel #6
0
 def _create_pmdoc(self, package_type):
     self.package.set_mode(package_type)
     m.action(_("Creating pmdoc for package %s " % self.package))
     pmdoc = PMDoc(self.package, self.store, self.tmp,
                   self.packages_paths[package_type],
                   self.empty_packages[package_type], package_type)
     pmdoc_path = pmdoc.create()
     output_file = os.path.join(self.output_dir, self._package_name('.pkg'))
     output_file = os.path.abspath(output_file)
     pm = PackageMaker()
     pm.create_package_from_pmdoc(pmdoc_path, output_file)
     return output_file
Beispiel #7
0
 def _create_package(self, output_dir, install_dir, version):
     output_file = os.path.join(
         output_dir, '%s-%s-%s.pkg' %
         (self.name, self.package.version, self.config.target_arch))
     root = self.create_bundle()
     packagemaker = PackageMaker()
     packagemaker.create_package(root,
                                 self.package.identifier(),
                                 self.package.version,
                                 self.title,
                                 output_file,
                                 install_dir,
                                 target=None)
     return output_file
Beispiel #8
0
 def _create_package(self, package_type, output_dir, force, target):
     self.package.set_mode(package_type)
     files = self.files_list(package_type, force)
     output_file = os.path.join(
         output_dir, '%s-%s-%s.pkg' %
         (self.package.name, self.version, self.config.target_arch))
     root, resources = self._create_bundle(files, package_type)
     packagemaker = PackageMaker()
     packagemaker.create_package(root,
                                 self.package.identifier(),
                                 self.package.version,
                                 self.package.shortdesc,
                                 output_file,
                                 self._get_install_dir(),
                                 target,
                                 scripts_path=resources)
     return output_file