本文整理汇总了Python中cerbero.packages.PackagerBase类的典型用法代码示例。如果您正苦于以下问题:Python PackagerBase类的具体用法?Python PackagerBase怎么用?Python PackagerBase使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了PackagerBase类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: __init__
def __init__(self, config, package, store):
PackagerBase.__init__(self, config, package, store)
self.package_prefix = ''
self.package_prefix = self._package_prefix(self.package)
self.full_package_name = self._full_package_name()
self.packager = self.config.packager
self._check_packager()
示例2: pack
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
示例3: __init__
def __init__(self, config, package, store):
PackagerBase.__init__(self, config, package, store)
self._with_wine = config.platform != Platform.WINDOWS
self.wix_prefix = get_wix_prefix()
# Init wix wine prefix in the case of using it.
self.wix_wine_prefix = None
self.tmpdir = None
示例4: pack
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
示例5: pack
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
示例6: pack
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]
示例7: __init__
def __init__(self, config, package, store):
PackagerBase.__init__(self, config, package, store)
self.package = package
self.prefix = config.prefix
self.package_prefix = ""
if self.config.packages_prefix is not None:
self.package_prefix = "%s-" % self.config.packages_prefix
示例8: __init__
def __init__(self, package, name, desc, uuid):
self.package = Package(package.config, package.store, None)
self.package.name = name
self.package.shortdesc = desc
self.package.version = package.version
self.package.sdk_version = package.sdk_version
self.package.uuid = uuid
self.package.deps = []
self.package.org = package.org
self.package.install_dir = package.install_dir
self.package.osx_framework_library = package.osx_framework_library
PackagerBase.__init__(self, package.config, self.package, package.store)
示例9: __init__
def __init__(self, package, pkgname, desc, uuid):
self.package = Package(package.config, package.store, None)
self.package.name = pkgname
self.package.shortdesc = desc
self.package.version = package.version
self.package.sdk_version = package.sdk_version
self.package.uuid = uuid
self.package.deps = []
self.package.org = package.org
self.package.install_dir = package.install_dir
self.package.osx_framework_library = package.osx_framework_library
self.package.resources_preinstall = package.resources_preinstall
self.package.resources_postinstall = package.resources_postinstall
self.package.__file__ = package.__file__
PackagerBase.__init__(self, package.config, self.package, package.store)
示例10: pack
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
示例11: files_list
def files_list(self, package_type, force):
if self.config.target_arch != Architecture.UNIVERSAL:
# Nothing special to do for normal arches, just chain up
return PackagerBase.files_list(self, package_type, force)
else:
# For the universal architecture, collect files from each
# sub-archtecture
if package_type == PackageType.DEVEL:
files = self.package.devel_files_list()
else:
files = self.package.files_list()
all_files = []
if isinstance(self.config.universal_archs, list):
archs = self.config.universal_archs
elif isinstance(self.config.universal_archs, dict):
archs = self.config.universal_archs.keys()
else:
raise ConfigurationError('universal_archs must be a list or a dict')
for arch in archs:
all_files += [os.path.join(str(arch), f) for f in files]
return all_files
示例12: files_list
def files_list(self, package_type):
if isinstance(self.package, MetaPackage):
return ''
return PackagerBase.files_list(self, package_type, self.force)
示例13: __init__
def __init__(self, config, package, store):
PackagerBase.__init__(self, config, package, store)
self._with_wine = config.platform != Platform.WINDOWS
self.wix_prefix = get_wix_prefix()
示例14: __init__
def __init__(self, config, package, store):
PackagerBase.__init__(self, config, package, store)
self.bundle_name = "%s-%s-%s" %(self.package.name, self.package.version, self.config.arch)
if not hasattr(self.package, "desktop_file"):
raise FatalError("Can not create a linux bundle if the package does "
"not have a 'desktop_file' property set")
示例15: __init__
def __init__(self, config, package, store):
PackagerBase.__init__(self, config, package, store)