Esempio n. 1
0
    def make_package(self):
        full_name = '{0}-{1}'.format(self.meta['name'],
                                     self.meta['version'])
        tar_name = '{0}.fp'.format(full_name)
        tar_path = join_path(
            self.plugin_path,
            tar_name)

        utils.make_tar_gz(self.build_src_dir, tar_path, full_name)
Esempio n. 2
0
    def make_package(self):
        full_name = '{0}-{1}'.format(self.meta['name'],
                                     self.meta['version'])
        tar_name = '{0}.fp'.format(full_name)
        tar_path = join_path(
            self.plugin_path,
            tar_name)

        utils.make_tar_gz(self.build_src_dir, tar_path, full_name)
Esempio n. 3
0
 def test_make_tar_gz(self, tarfile_mock):
     src = 'dir'
     dst = '/tmp/file.fp'
     prefix = 'prefix_dir'
     tar_mock = mock.MagicMock()
     tarfile_mock.open.return_value = tar_mock
     utils.make_tar_gz(src, dst, prefix)
     tarfile_mock.open.assert_called_once_with(dst, 'w:gz')
     tar_mock.add.assert_called_once_with(src, arcname=prefix)
     tar_mock.close.assert_called_once_with()
Esempio n. 4
0
 def test_make_tar_gz(self, tarfile_mock):
     src = 'dir'
     dst = '/tmp/file.fp'
     prefix = 'prefix_dir'
     tar_mock = mock.MagicMock()
     tarfile_mock.open.return_value = tar_mock
     utils.make_tar_gz(src, dst, prefix)
     tarfile_mock.open.assert_called_once_with(dst, 'w:gz')
     tar_mock.add.assert_called_once_with(src, arcname=prefix)
     tar_mock.close.assert_called_once_with()
Esempio n. 5
0
    def make_package(self):
        """Builds rpm package
        """
        utils.create_dir(self.rpm_src_path)

        utils.make_tar_gz(self.build_src_dir, self.tar_path, self.full_name)
        utils.render_to_file(self.spec_src, self.spec_dst,
                             self._make_data_for_template())

        utils.exec_cmd('rpmbuild -vv --nodeps --define "_topdir {0}" '
                       '-bb {1}'.format(self.rpm_path, self.spec_dst))
        utils.copy_files_in_dir(self.rpm_packages_mask, self.plugin_path)
Esempio n. 6
0
    def make_package(self):
        """Builds rpm package
        """
        utils.create_dir(self.rpm_src_path)

        utils.make_tar_gz(self.build_src_dir, self.tar_path, self.full_name)
        utils.render_to_file(
            self.spec_src,
            self.spec_dst,
            self._make_data_for_template())

        utils.exec_cmd(
            'rpmbuild -vv --nodeps --define "_topdir {0}" '
            '-bb {1}'.format(self.rpm_path, self.spec_dst))
        utils.copy_files_in_dir(self.rpm_packages_mask, self.plugin_path)