本文整理汇总了Python中cerbero.packages.PackagerBase.pack方法的典型用法代码示例。如果您正苦于以下问题:Python PackagerBase.pack方法的具体用法?Python PackagerBase.pack怎么用?Python PackagerBase.pack使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类cerbero.packages.PackagerBase
的用法示例。
在下文中一共展示了PackagerBase.pack方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: pack
# 需要导入模块: from cerbero.packages import PackagerBase [as 别名]
# 或者: from cerbero.packages.PackagerBase import pack [as 别名]
def pack(self, output_dir, devel=False, force=False, keep_temp=False):
PackagerBase.pack(self, output_dir, devel, force, keep_temp)
self._prepare_pack()
if isinstance(self.package, MetaPackage):
packager = self._create_framework_bundle_packager()
self._create_framework_bundle_layout(packager)
self._create_framework_bundle_package(packager)
self._create_packages()
paths = []
# create runtime package
r_path = self._create_product(PackageType.RUNTIME)
paths.append(r_path)
if devel:
# create devel package
d_path = self._create_product(PackageType.DEVEL)
paths.append(d_path)
self.package.set_mode(PackageType.RUNTIME)
self._create_packages_dmg()
if not keep_temp:
shutil.rmtree(self.tmp)
return paths
示例2: pack
# 需要导入模块: from cerbero.packages import PackagerBase [as 别名]
# 或者: from cerbero.packages.PackagerBase import pack [as 别名]
def pack(self, output_dir, devel=False, force=False, keep_temp=False):
PackagerBase.pack(self, output_dir, devel, force, keep_temp)
self.include_dirs = PkgConfig.list_all_include_dirs()
self.tmp = tempfile.mkdtemp()
self.empty_packages = {PackageType.RUNTIME: [], PackageType.DEVEL: []}
self.packages_paths = {PackageType.RUNTIME: {}, PackageType.DEVEL: {}}
if isinstance(self.package, SDKPackage):
self._create_framework_bundle_package()
self._create_packages()
paths = []
# create runtime package
r_path = self._create_pmdoc(PackageType.RUNTIME)
paths.append(r_path)
if devel:
# create devel package
d_path = self._create_pmdoc(PackageType.DEVEL)
paths.append(d_path)
# FIXME: Figure out why PackageMaker refuses to create flat meta-packages
# using flat packages created by himself
self.package.set_mode(PackageType.RUNTIME)
for path in paths:
self._create_dmgs(paths)
if not keep_temp:
shutil.rmtree(self.tmp)
return paths
示例3: pack
# 需要导入模块: from cerbero.packages import PackagerBase [as 别名]
# 或者: from cerbero.packages.PackagerBase import pack [as 别名]
def pack(
self,
output_dir,
devel=True,
force=False,
keep_temp=False,
version=None,
install_dir=None,
include_dirs=None,
sdk_version=None,
):
PackagerBase.pack(self, output_dir, devel, force, keep_temp)
self.install_dir = install_dir or self.package.get_install_dir()
self.version = version or self.package.version
self.sdk_version = sdk_version or self.version
self.include_dirs = include_dirs or PkgConfig.list_all_include_dirs()
# create the runtime package
try:
runtime_path = self._create_package(PackageType.RUNTIME, output_dir, force)
except EmptyPackageError, e:
if not devel:
raise e
runtime_path = None
示例4: pack
# 需要导入模块: from cerbero.packages import PackagerBase [as 别名]
# 或者: from cerbero.packages.PackagerBase import pack [as 别名]
def pack(self, output_dir, devel=False, force=False, keep_temp=False):
PackagerBase.pack(self, output_dir, devel, force, keep_temp)
self.tmp = tempfile.mkdtemp()
self.approot = os.path.join(self.tmp, 'app')
self.appdir = os.path.join(self.approot, '%s.app' % self.package.app_name)
# copy files to the bundle. it needs to be done first because the app
# bundle will try to create links for the main executable
self._create_bundle()
self._create_app_bundle()
homedir = os.path.join(self.appdir, 'Contents', 'Home')
self._strip_binaries(homedir)
self._relocate_binaries(homedir)
if self.package.osx_create_pkg:
pkg = self._create_product()
self._add_applications_link()
else:
pkg = ''
if self.package.osx_create_dmg:
dmg = self._create_dmg()
else:
dmg = ''
return [dmg, pkg]
示例5: pack
# 需要导入模块: from cerbero.packages import PackagerBase [as 别名]
# 或者: from cerbero.packages.PackagerBase import pack [as 别名]
def pack(self, output_dir, devel=False, force=False, keep_temp=False):
PackagerBase.pack(self, output_dir, devel, force, keep_temp)
paths = []
# create runtime package
p = self.create_merge_module(output_dir, PackageType.RUNTIME, force,
self.package.version, keep_temp)
paths.append(p)
if devel:
p = self.create_merge_module(output_dir, PackageType.DEVEL, force,
self.package.version, keep_temp)
paths.append(p)
return paths