本文整理汇总了Python中builder.Builder.__init__方法的典型用法代码示例。如果您正苦于以下问题:Python Builder.__init__方法的具体用法?Python Builder.__init__怎么用?Python Builder.__init__使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类builder.Builder
的用法示例。
在下文中一共展示了Builder.__init__方法的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: __init__
# 需要导入模块: from builder import Builder [as 别名]
# 或者: from builder.Builder import __init__ [as 别名]
def __init__(self, pkgname=None, archivename=None, extractdir=None,
epicsbase=None, releasefile=None, srcdir=None,
fileprefix=None, dbprefix=None, *args, **kwargs):
Builder.__init__(self, pkgname=pkgname,
archivename=archivename,
extractdir=extractdir,
buildcommand="",
buildtargets=[""])
self.parallel = False
self._appname = os.getcwd().split(os.sep)[-2]
if epicsbase is None:
self._epicsBuild = False
self._srcdir = srcdir
srcOutDir = srcdir
dbOutDir = None
xmlOutDir = None
else:
self._epicsBuild = True
self._epicsbase = self.dep.get_install_path(epicsbase)
self._epicsbase = self._epicsbase.rstrip(os.sep)
self._srcdir = os.path.join(srcdir, 'src')
comm = os.path.join(os.path.dirname(self._epicsbase), "EpicsHostArch")
#self._epicsarch = utils.runcmd(comm)[0].strip() + '-debug'
self._epicsarch = utils.runcmd(comm)[0].strip()
srcOutDir = os.path.join(srcdir, 'src', 'O.' + self._epicsarch)
dbOutDir = os.path.join(srcdir, 'Db', 'O.Common')
xmlOutDir = os.path.join('install', 'epicsxml')
self._adePoints = []
self._adeParser = AdbeParser(self._appname, dbprefix, fileprefix, srcOutDir, dbOutDir, xmlOutDir, *args, **kwargs)
示例2: __init__
# 需要导入模块: from builder import Builder [as 别名]
# 或者: from builder.Builder import __init__ [as 别名]
def __init__(self,player,conf):
Builder.__init__(self,player)
#set the main tiles to pass by
first=self.find_first_target_tile(conf['x'],conf['y'])
self.add_to_path(first)
last=self.find_last_target_tile(conf['x'],conf['y'])
self.add_to_path(last)
示例3: __init__
# 需要导入模块: from builder import Builder [as 别名]
# 或者: from builder.Builder import __init__ [as 别名]
def __init__(self, pkgname=None, archivename=None, extractdir=None,
buildsubdir=None, buildtargets=[], buildcommand="ant",
installcommand="ant", installsubdir=""):
'''
The constructor sets up a package build "environment".
:param pkgname: The (optional) name of the package directory.
By default the directory name is used.
:param archivename: The (optional) archive name minus suffix.
The default is based on package name.
:param extractdir: The (optional) directory into which the archive
is extracted. It is created if it does not exist.
:param buildsubdir: The (optional) directory in which to start the
build.
:param buildtargets: The (optional) additional build targets.
:param buildcommand: The (optional) build command (default is 'ant').
:param installcommand: The (optional) install command (default is 'ant').
'''
Builder.__init__(self, pkgname=pkgname,
archivename=archivename,
extractdir=extractdir,
buildsubdir=buildsubdir,
buildcommand=buildcommand,
buildtargets=[""] + buildtargets,
installcommand=installcommand)
self.parallel = False
if installsubdir:
self.installdir = os.path.join(self._prefix, installsubdir)
else:
self.installdir = self._prefix
self._run_script = []
示例4: __init__
# 需要导入模块: from builder import Builder [as 别名]
# 或者: from builder.Builder import __init__ [as 别名]
def __init__(self, pkgname, pkgversion=None, exename=None):
Builder.__init__(self, pkgname=pkgname)
# Needed for os.chdir in _build
self._pkgversion = pkgversion
self._exename = exename
self._builddir = "."
self.parallel = False
示例5: __init__
# 需要导入模块: from builder import Builder [as 别名]
# 或者: from builder.Builder import __init__ [as 别名]
def __init__(self, pkgname=None, archivename=None, buildsubdir=None,
buildtargets=[], buildcommand=MAKE, confcommand="cmake",
installcommand=" ".join([MAKE, "install"])):
'''
The constructor sets up a package build "environment"
:param pkgname: The (optional) name of the package directory.
By default the current directory name is used.
:param archivename: The (optional) archive name minus suffix.
The default is based on package name.
:param extractdir: The (optional) directory into which the archive
is extracted. It is created if it does not exist.
:param buildsubdir: The (optional) directory in which to start the
build.
:param buildtargets: The (optional) additional build targets.
:param confcommand: The (optional) command to configure the package.
The default is 'cmake'.
:param buildcommand: The (optional) build command.
The default is 'make'.
:param installcommand: The (optional) install command.
The default is 'make install'.
'''
Builder.__init__(self,
pkgname=pkgname,
archivename=archivename,
buildsubdir=buildsubdir,
buildcommand=buildcommand,
buildtargets=['']+buildtargets,
confcommand=confcommand,
installcommand=installcommand)
self._cmakedir = 'build'
示例6: __init__
# 需要导入模块: from builder import Builder [as 别名]
# 或者: from builder.Builder import __init__ [as 别名]
def __init__(self, pkgname=None):
Builder.__init__(self,
pkgname=pkgname,
archivename=None,
buildsubdir=None,
buildcommand='slice2html',
buildtargets=[])
'''
The constructor sets up a package build 'environment'
:param pkgname: The (optional) name of the package directory.
By default the current directory name is used.
:param archivename: The (optional) archive name minus suffix.
The default is None.
:param buildsubdir: The (optional) directory in which to start the
build.
:param buildtargets: The (optional) additional build targets.
:param buildcommand: The (optional) build command.
The default is 'slice2html'.
'''
self._docdir = 'doc'
self.add_extra_clean_targets(self._docdir)
self.parallel = False
self.header = None
self.footer = None
# get the environment to pick up ice
pth = os.path.pathsep.join([os.environ.get('PATH'),
self.dep.get_path()])
self.add_ld_library_paths(self.dep.get_ld_library_path())
self.append_env('PATH', pth)
示例7: __init__
# 需要导入模块: from builder import Builder [as 别名]
# 或者: from builder.Builder import __init__ [as 别名]
def __init__(self):
Builder.__init__(self, {
'TotalTimeSeconds': SetAttrBuilder('total_time_seconds', float),
'DistanceMeters': SetAttrBuilder('distance_meters', float),
'MaximumSpeed': SetAttrBuilder('maximum_speed', float),
'Calories': SetAttrBuilder('calories', int),
'AverageHeartRateBpm': Builder({
'Value': SetAttrBuilder('average_heart_rate_bpm', int)}),
'MaximumHeartRateBpm': Builder({
'Value': SetAttrBuilder('maximum_heart_rate_bpm', int)}),
'Intensity': SetAttrBuilder('intensity'),
'TriggerMethod': SetAttrBuilder('trigger_method'),
'Track': TrackBuilder()})
示例8: __init__
# 需要导入模块: from builder import Builder [as 别名]
# 或者: from builder.Builder import __init__ [as 别名]
def __init__(self, pkgname=None, archivename=None, buildsubdir=None,
buildtargets=[], buildcommand='make', confcommand=None,
installcommand='make install', qtdep='qt4'):
Builder.__init__(self, pkgname=pkgname,
archivename=archivename,
buildsubdir=buildsubdir,
buildcommand=buildcommand,
buildtargets=[""]+buildtargets,
confcommand=confcommand,
installcommand=installcommand)
# Set path to Qt binaries (where qmake is located)
self.qtpath = self.dep.get_install_path(qtdep)
self._ccom = os.path.join(self.qtpath, 'bin', 'qmake')
# Add auto-generated Makefile to clean targets (prevent adding Makefile to repository)
self.add_extra_clean_targets('Makefile')
示例9: __init__
# 需要导入模块: from builder import Builder [as 别名]
# 或者: from builder.Builder import __init__ [as 别名]
def __init__(self, metapkgname=None, datadir=None, msibasedir=None, jarbasedir=None):
## The constructor sets up a package build "environment"
# @param self The current object.
# @param metapkgname The name of the meta-package directory. By default the
# current directory name is used (basename of current directory).
# @param datadir The base directory name to be copied recursively in install dir, i.e. every file and
# subdirectory will be copied recursively into install directory. Defaults to "files/data".
# @param msibasedir The base directory name of the msi template/substitutions files and subdirectories.
# It is pre-pended to every input directory entered in add_msi_template() and add_msi_template_dir() calls.
# Defaults to "files/msi".
# @param jarbasedir The base directory name of the jar configuration directories. It is pre-pended to
# input directories entered in the add_config_jar_dir() method.
Builder.__init__(self, pkgname='.')
self._quiet = False
if '-q' in self._comopts or '--quiet' in self._comopts:
self._quiet = True
self._versionstr = str(utils.get_svn_branch_info())
self._metapkgname = metapkgname or os.path.basename(os.path.abspath(os.curdir))
self._datadir = datadir or os.path.join('files', 'data')
# List of directories that needs to be copied to installdir
self._datatrees = []
if os.path.exists(self._datadir):
self._datatrees.append(self._datadir)
# List of jar command and outputdir that needs to be executed
self._jar_cmdlist = []
self._jarcmd = 'jar cvf'
self._jarbasedir = jarbasedir or os.path.join('files', 'jar')
# List of msi commands and outputdir that needs to be executed
self._msibasedir = msibasedir or os.path.join('files', 'msi')
self._msi_cmdlist = []
# Check that msi tool is in the dependencies
try:
msipath = self.dep.get_install_path('msi')
self._msi_in_dep = True
except:
msipath = ''
self._msi_in_dep = False
ea = self.dep.get_env().get('EPICS_HOST_ARCH', None)
if ea is None:
print "Couldn't determine EPICS architecture"
sys.exit(1)
os.environ['EPICS_HOST_ARCH'] = ea
self.epics_host_arch = ea
self._msicmd = ''
if self._msi_in_dep:
self._msicmd = os.path.join(msipath, 'bin', ea, 'msi')
示例10: __init__
# 需要导入模块: from builder import Builder [as 别名]
# 或者: from builder.Builder import __init__ [as 别名]
def __init__(self, pkgname=None, archivename=None, extractdir=None,
sconsversion=None):
Builder.__init__(self, pkgname=pkgname,
archivename=archivename,
extractdir=extractdir)
self.sconsversion = sconsversion
示例11: __init__
# 需要导入模块: from builder import Builder [as 别名]
# 或者: from builder.Builder import __init__ [as 别名]
def __init__(self, pkgname=None, archivename=None, buildsubdir=None):
Builder.__init__(self, pkgname=pkgname, buildsubdir=buildsubdir,
archivename=archivename)
self.parallel = False
self.has_extension = False
self._pycmd = os.path.abspath(os.path.join(self._askaproot, 'bin', 'python'))
示例12: __init__
# 需要导入模块: from builder import Builder [as 别名]
# 或者: from builder.Builder import __init__ [as 别名]
def __init__(self, pkgname=None, archivename=None, extractdir=None,
epicsbase=None, releasefile=None):
Builder.__init__(self, pkgname=pkgname,
archivename=archivename,
extractdir=extractdir,
buildcommand="make",
buildtargets=[""])
self.parallel = False
self._epicssupportdict = {} # support modules
self._iocbootdirsdict = {} # iocboot directories to install
self._implicit_deps = []
if epicsbase is None:
# We are building EPICS base (no need for RELEASE file)
self._epicsbase = os.path.join(os.path.abspath(os.curdir),
self._installdir)
self._is_epics_base = True
else:
self._epicsbase = self.dep.get_install_path(epicsbase)
self._is_epics_base = False
self._appname = os.getcwd().split(os.sep)[-2]
self._epicsbase = self._epicsbase.rstrip(os.sep)
# Set EPICS architecture using shell script in EPICS base directory.
comm = os.path.join(os.path.dirname(self._epicsbase), "EpicsHostArch")
self._epicsarch = utils.runcmd(comm)[0].strip()
self.add_env("EPICS_HOST_ARCH", self._epicsarch)
self._oldreleasefile = None
if releasefile is None:
self._releasefile = "RELEASE." + self._epicsarch + ".Common"
# Create old (<3.14.11) release file for compatibility with
# old style of CONFIG files that uses CONFIG_APP, for example
# asyn, modbus
self._oldreleasefile = 'RELEASE.' + self._epicsarch
self.add_extra_clean_targets(self._oldreleasefile,
os.path.join('configure',
self._oldreleasefile))
else:
self._releasefile = releasefile
self.add_extra_clean_targets(self._releasefile,
"package.info",
os.path.join('configure',
self._releasefile))
self._deps_file = os.path.join(self._bdir, "configure",
"ASKAPDEPS")
self.add_extra_clean_targets(self._deps_file)
ldname = "LD_LIBRARY_PATH"
if sys.platform == "darwin":
ldname = "DY"+ldname
if ldname in os.environ:
os.environ[ldname] = \
os.path.pathsep.join([self.dep.get_ld_library_path(),
os.environ[ldname]])
else:
os.environ[ldname] = self.dep.get_ld_library_path()
os.environ["PATH"] = os.path.pathsep.join([self.dep.get_path(),
os.environ["PATH"]])
# Setup version header file name if not epics base
if not self._is_epics_base:
self._version_header_filename = self._appname + '_version.h'
self.add_extra_clean_targets(self._version_header_filename)
self._csv_files = []