本文整理汇总了Python中utils.copyfile函数的典型用法代码示例。如果您正苦于以下问题:Python copyfile函数的具体用法?Python copyfile怎么用?Python copyfile使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了copyfile函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Python代码示例。
示例1: handleOneIndex
def handleOneIndex(indexpath, subdir, indexname, fast):
print(indexpath, subdir, indexname)
indexstatuspath = indexpath + config.getStatusPostfix()
indexstatus = utils.load_status(indexstatuspath)
if not utils.check_epoch(indexstatus, 'Prepare'):
raise utils.EpochError('Please prepare first.\n')
if utils.check_epoch(indexstatus, 'Populate'):
return
workdir = config.getWordRecognizerDir() + os.sep + \
subdir + os.sep + indexname
print(workdir)
shmdir = config.getInMemoryFileSystem()
for i in range(1, N + 1):
if fast:
#copy file
filename = config.getNgramFileName(i)
filepath = workdir + os.sep + filename
shmfilepath = shmdir + os.sep + filename
utils.copyfile(filepath, shmfilepath)
handleOnePass(indexpath, shmdir, i)
pruneNgramTable(indexpath, shmdir, i)
utils.copyfile(shmfilepath, filepath)
os.unlink(shmfilepath)
else:
handleOnePass(indexpath, workdir, i)
pruneNgramTable(indexpath, workdir, i)
#sign epoch
utils.sign_epoch(indexstatus, 'Populate')
utils.store_status(indexstatuspath, indexstatus)
开发者ID:cmal,项目名称:trainer,代码行数:34,代码来源:populate.py
示例2: prepare_packages_posix
def prepare_packages_posix(self, vars):
if sys.platform.startswith('linux'):
# patchelf -> Shiboken/patchelf
copyfile(
"{script_dir}/patchelf",
"{dist_dir}/Shiboken/patchelf",
vars=vars)
so_ext = '.so'
so_star = so_ext + '.*'
elif sys.platform == 'darwin':
so_ext = '.dylib'
so_star = so_ext
makefile(
"{dist_dir}/Shiboken/__init__.py",
content="__all__ = ['shiboken']",
vars=vars)
# <build>/shiboken/doc/html/* -> <setup>/Shiboken/docs/shiboken
copydir(
"{build_dir}/shiboken/doc/html",
"{dist_dir}/Shiboken/docs/shiboken",
force=False, vars=vars)
# <install>/lib/site-packages/shiboken.so -> <setup>/Shiboken/shiboken.so
copyfile(
"{site_packages_dir}/shiboken.so",
"{dist_dir}/Shiboken/shiboken.so",
vars=vars)
# <install>/bin/* -> Shiboken/
copydir(
"{install_dir}/bin/",
"{dist_dir}/Shiboken",
filter=[
"shiboken",
],
recursive=False, vars=vars)
# <install>/lib/lib* -> Shiboken/
copydir(
"{install_dir}/lib/",
"{dist_dir}/Shiboken",
filter=[
"libshiboken*" + so_star,
],
recursive=False, vars=vars)
# <install>/include/* -> <setup>/Shiboken/include
copydir(
"{install_dir}/include",
"{dist_dir}/Shiboken/include",
vars=vars)
# Copy Qt libs to package
if OPTION_STANDALONE:
if sys.platform == 'darwin':
raise RuntimeError('--standalone not yet supported for OSX')
# <qt>/lib/* -> <setup>/Shiboken
copydir("{qt_lib_dir}", "{dist_dir}/Shiboken",
filter=[
"libQtCore*.so.?", "libQtXml*.so.?",
],
recursive=False, vars=vars)
开发者ID:PySide,项目名称:shiboken-setup,代码行数:57,代码来源:setup.py
示例3: copy_derivative_cmtfile
def copy_derivative_cmtfile(cmtfile_prefix, destdir):
if not os.path.exists(destdir):
os.makedirs(destdir)
exts = ("", "_Mrr", "_Mtt", "_Mpp", "_Mrt", "_Mrp", "_Mtp",
"_dep", "_lat", "_lon")
for _ext in exts:
cmtfile = cmtfile_prefix + _ext
destcmt = os.path.join(destdir, os.path.basename(cmtfile))
copyfile(cmtfile, destcmt)
开发者ID:wjlei1990,项目名称:source_inversion_toolkit,代码行数:9,代码来源:copy_files.py
示例4: copyoutInMemoryFile
def copyoutInMemoryFile(modelfile):
inmemoryfile = os.path.join\
(config.getInMemoryFileSystem(), inMemoryFile)
inmemoryreportfile = inmemoryfile + config.getReportPostfix()
reportfile = modelfile + config.getReportPostfix()
if os.access(inmemoryfile, os.F_OK):
utils.copyfile(inmemoryfile, modelfile)
if os.access(inmemoryreportfile, os.F_OK):
utils.copyfile(inmemoryreportfile, reportfile)
开发者ID:cmal,项目名称:trainer,代码行数:10,代码来源:generate.py
示例5: copy_cmtfiles
def copy_cmtfiles(_event, cmtfolder, targetcmtdir, generate_deriv_cmt,
deriv_cmt_list):
origincmt = os.path.join(cmtfolder, _event)
targetcmt = os.path.join(targetcmtdir, _event)
copyfile(origincmt, targetcmt, verbose=False)
if not generate_deriv_cmt:
# copy deriv cmt files
for deriv_type in deriv_cmt_list:
derivcmt = os.path.join(cmtfolder, "%s_%s" % (_event, deriv_type))
targetcmt = os.path.join(targetcmtdir, "%s_%s"
% (_event, deriv_type))
copyfile(derivcmt, targetcmt, verbose=False)
else:
# copy scripts to generate deriv cmt files
copytree("job_running_template/perturb_cmt",
os.path.dirname(targetcmtdir))
开发者ID:wjlei1990,项目名称:source_inversion_toolkit,代码行数:16,代码来源:X02_create_job.py
示例6: create_job_folder
def create_job_folder(template_folder, tag, eventlist_dict, cmtfolder,
stafolder, generate_deriv_cmt, deriv_cmt_list):
targetdir_list = []
print("*"*20 + "\nCreat job sub folder")
for _i in range(len(eventlist_dict)):
idx = _i + 1
targetdir = "job_" + tag + "_%02d" % idx
targetdir_list.append(targetdir)
check_job_folder_exist(targetdir_list)
for _i, targetdir in enumerate(targetdir_list):
idx = _i + 1
print("="*5 + "\nJob id: %d" % idx)
# copy eventlist file
eventlist_file = eventlist_dict[idx]
targetfile = os.path.join(targetdir, "XEVENTID")
copyfile(eventlist_file, targetfile)
# copy original cmt file and station file
targetcmtdir = os.path.join(targetdir, "cmtfile")
targetstadir = os.path.join(targetdir, "station")
print("copy cmt:[%s --> %s]" % (cmtfolder, targetcmtdir))
print("copy stattion:[%s --> %s]" % (stafolder, targetstadir))
events = read_txt_into_list(eventlist_file)
for _event in events:
copy_cmtfiles(_event, cmtfolder, targetcmtdir, generate_deriv_cmt,
deriv_cmt_list)
copy_stations(_event, stafolder, targetstadir)
print("Copy dir:[%s --> %s]" % (template_folder, targetdir))
# copy scripts template
copytree(template_folder, targetdir)
# copy config.yaml file
copyfile("config.yml", os.path.join(targetdir, "config.yml"))
开发者ID:wjlei1990,项目名称:source_inversion_toolkit,代码行数:37,代码来源:X02_create_job.py
示例7: print
cwdstatuspath = os.path.join(trydir, config.getFinalStatusFileName())
cwdstatus = utils.load_status(cwdstatuspath)
if not utils.check_epoch(cwdstatus, 'Prune'):
raise utils.EpochError('Please tryprune first.')
if utils.check_epoch(cwdstatus, 'Evaluate'):
sys.exit('already evaluated.')
print('checking')
checkData()
modelfile = os.path.join(trydir, config.getFinalModelFileName())
destfile = os.path.join(libpinyin_dir, 'data', \
config.getFinalModelFileName())
utils.copyfile(modelfile, destfile)
print('cleaning')
cleanUpData()
print('building')
buildData()
print('estimating')
reportfile = os.path.join(trydir, 'estimate' + config.getReportPostfix())
avg_lambda = estimateModel(reportfile)
print('average lambda:', avg_lambda)
cwdstatus['EvaluateAverageLambda'] = avg_lambda
utils.store_status(cwdstatuspath, cwdstatus)
开发者ID:epico,项目名称:trainer,代码行数:30,代码来源:evaluate.py
示例8: prepare_packages_win32
def prepare_packages_win32(self, vars):
pdbs = ['*.pdb'] if self.debug or self.build_type == 'RelWithDebInfo' else []
# <install>/lib/site-packages/PySide2/* -> <setup>/PySide2
copydir(
"{site_packages_dir}/PySide2",
"{dist_dir}/PySide2",
vars=vars)
if self.debug or self.build_type == 'RelWithDebInfo':
# <build>/pyside2/PySide2/*.pdb -> <setup>/PySide2
copydir(
"{build_dir}/pyside2/PySide2",
"{dist_dir}/PySide2",
filter=pdbs,
recursive=False, vars=vars)
# <build>/shiboken2/doc/html/* -> <setup>/PySide2/docs/shiboken2
copydir(
"{build_dir}/shiboken2/doc/html",
"{dist_dir}/PySide2/docs/shiboken2",
force=False, vars=vars)
# <install>/lib/site-packages/shiboken2.pyd -> <setup>/PySide2/shiboken2.pyd
copyfile(
"{site_packages_dir}/shiboken2{dbgPostfix}.pyd",
"{dist_dir}/PySide2/shiboken2{dbgPostfix}.pyd",
vars=vars)
if self.debug or self.build_type == 'RelWithDebInfo':
copyfile(
"{build_dir}/shiboken2/shibokenmodule/shiboken2{dbgPostfix}.pdb",
"{dist_dir}/PySide2/shiboken2{dbgPostfix}.pdb",
vars=vars)
# <install>/lib/site-packages/pysideuic/* -> <setup>/pysideuic
copydir(
"{site_packages_dir}/pysideuic",
"{dist_dir}/pysideuic",
force=False, vars=vars)
if sys.version_info[0] > 2:
rmtree("{dist_dir}/pysideuic/port_v2".format(**vars))
else:
rmtree("{dist_dir}/pysideuic/port_v3".format(**vars))
# <install>/bin/pyside2-uic -> PySide2/scripts/uic.py
makefile(
"{dist_dir}/PySide2/scripts/__init__.py",
vars=vars)
copyfile(
"{install_dir}/bin/pyside2-uic",
"{dist_dir}/PySide2/scripts/uic.py",
force=False, vars=vars)
# <install>/bin/*.exe,*.dll,*.pdb -> PySide2/
copydir(
"{install_dir}/bin/",
"{dist_dir}/PySide2",
filter=["*.exe", "*.dll"] + pdbs,
recursive=False, vars=vars)
# <install>/lib/*.lib -> PySide2/
copydir(
"{install_dir}/lib/",
"{dist_dir}/PySide2",
filter=["*.lib"],
recursive=False, vars=vars)
# <install>/share/PySide2/typesystems/* -> <setup>/PySide2/typesystems
copydir(
"{install_dir}/share/PySide2/typesystems",
"{dist_dir}/PySide2/typesystems",
vars=vars)
# <install>/include/* -> <setup>/PySide2/include
copydir(
"{install_dir}/include",
"{dist_dir}/PySide2/include",
vars=vars)
if not OPTION_NOEXAMPLES:
# <sources>/pyside2-examples/examples/* -> <setup>/PySide2/examples
folder = get_extension_folder('pyside2-examples')
copydir(
"{sources_dir}/%s/examples" % folder,
"{dist_dir}/PySide2/examples",
force=False, vars=vars)
# Re-generate examples Qt resource files for Python 3 compatibility
if sys.version_info[0] == 3:
examples_path = "{dist_dir}/PySide2/examples".format(**vars)
pyside_rcc_path = "{install_dir}/bin/pyside2-rcc".format(**vars)
pyside_rcc_options = '-py3'
regenerate_qt_resources(examples_path, pyside_rcc_path,
pyside_rcc_options)
# <ssl_libs>/* -> <setup>/PySide2/openssl
copydir("{ssl_libs_dir}", "{dist_dir}/PySide2/openssl",
filter=[
"libeay32.dll",
"ssleay32.dll"],
force=False, vars=vars)
# <qt>/bin/*.dll -> <setup>/PySide2
copydir("{qt_bin_dir}", "{dist_dir}/PySide2",
filter=[
"*.dll",
"designer.exe",
"linguist.exe",
"lrelease.exe",
"lupdate.exe",
"lconvert.exe"],
ignore=["*d4.dll"],
recursive=False, vars=vars)
#.........这里部分代码省略.........
开发者ID:GrandHsu,项目名称:pyside2-setup,代码行数:101,代码来源:setup.py
示例9: prepare_packages_posix
def prepare_packages_posix(self, vars):
executables = []
if sys.platform.startswith('linux'):
so_ext = '.so'
so_star = so_ext + '.*'
elif sys.platform == 'darwin':
so_ext = '.dylib'
so_star = so_ext
# <build>/shiboken2/doc/html/* -> <setup>/PySide2/docs/shiboken2
copydir(
"{build_dir}/shiboken2/doc/html",
"{dist_dir}/PySide2/docs/shiboken2",
force=False, vars=vars)
# <install>/lib/site-packages/PySide2/* -> <setup>/PySide2
copydir(
"{site_packages_dir}/PySide2",
"{dist_dir}/PySide2",
vars=vars)
# <install>/lib/site-packages/shiboken2.so -> <setup>/PySide2/shiboken2.so
copyfile(
"{site_packages_dir}/shiboken2.so",
"{dist_dir}/PySide2/shiboken2.so",
vars=vars)
# <install>/lib/site-packages/pysideuic/* -> <setup>/pysideuic
copydir(
"{site_packages_dir}/pysideuic",
"{dist_dir}/pysideuic",
force=False, vars=vars)
if sys.version_info[0] > 2:
rmtree("{dist_dir}/pysideuic/port_v2".format(**vars))
else:
rmtree("{dist_dir}/pysideuic/port_v3".format(**vars))
# <install>/bin/pyside2-uic -> PySide2/scripts/uic.py
makefile(
"{dist_dir}/PySide2/scripts/__init__.py",
vars=vars)
copyfile(
"{install_dir}/bin/pyside2-uic",
"{dist_dir}/PySide2/scripts/uic.py",
force=False, vars=vars)
# <install>/bin/* -> PySide2/
executables.extend(copydir(
"{install_dir}/bin/",
"{dist_dir}/PySide2",
filter=[
"pyside2-lupdate",
"pyside2-rcc",
"shiboken2",
],
recursive=False, vars=vars))
# <install>/lib/lib* -> PySide2/
copydir(
"{install_dir}/lib/",
"{dist_dir}/PySide2",
filter=[
"libpyside*" + so_star,
"libshiboken*" + so_star,
],
recursive=False, vars=vars)
# <install>/share/PySide2/typesystems/* -> <setup>/PySide2/typesystems
copydir(
"{install_dir}/share/PySide2/typesystems",
"{dist_dir}/PySide2/typesystems",
vars=vars)
# <install>/include/* -> <setup>/PySide2/include
copydir(
"{install_dir}/include",
"{dist_dir}/PySide2/include",
vars=vars)
if not OPTION_NOEXAMPLES:
# <sources>/pyside2-examples/examples/* -> <setup>/PySide2/examples
folder = get_extension_folder('pyside2-examples')
copydir(
"{sources_dir}/%s/examples" % folder,
"{dist_dir}/PySide2/examples",
force=False, vars=vars)
# Re-generate examples Qt resource files for Python 3 compatibility
if sys.version_info[0] == 3:
examples_path = "{dist_dir}/PySide2/examples".format(**vars)
pyside_rcc_path = "{install_dir}/bin/pyside2-rcc".format(**vars)
pyside_rcc_options = '-py3'
regenerate_qt_resources(examples_path, pyside_rcc_path,
pyside_rcc_options)
# Copy Qt libs to package
if OPTION_STANDALONE:
if sys.platform == 'darwin':
raise RuntimeError('--standalone not yet supported for OSX')
# <qt>/bin/* -> <setup>/PySide2
executables.extend(copydir("{qt_bin_dir}", "{dist_dir}/PySide2",
filter=[
"designer",
"linguist",
"lrelease",
"lupdate",
"lconvert",
],
recursive=False, vars=vars))
# <qt>/lib/* -> <setup>/PySide2
copydir("{qt_lib_dir}", "{dist_dir}/PySide2",
filter=[
#.........这里部分代码省略.........
开发者ID:GrandHsu,项目名称:pyside2-setup,代码行数:101,代码来源:setup.py
示例10: copy_cmtfile
def copy_cmtfile(cmtfile, targetdir):
destfile = os.path.join(targetdir, "DATA/CMTSOLUTION")
copyfile(cmtfile, destfile)
开发者ID:wjlei1990,项目名称:source_inversion_toolkit,代码行数:3,代码来源:copy_files.py
示例11: print
#export textual format
print('exporting')
exportfile = os.path.join(trydir, 'kmm_merged.text')
exportModel(mergedmodel, exportfile)
#prune merged model
print('pruning')
prunedmodel = os.path.join(trydir, 'pruned.db')
if args.fast:
shmmodel = os.path.join(config.getInMemoryFileSystem(), 'pruned.db')
if os.access(shmmodel, os.F_OK):
os.unlink(shmmodel)
#copy to memory
utils.copyfile(mergedmodel, shmmodel)
pruneModel(shmmodel, args.k, args.CDF)
#copy to filesystem
utils.copyfile(shmmodel, prunedmodel)
else:
#backup merged model
utils.copyfile(mergedmodel, prunedmodel)
pruneModel(prunedmodel, args.k, args.CDF)
#validate pruned model
print('validating')
validateModel(prunedmodel)
#export textual format
print('exporting')
exportfile = os.path.join(trydir, 'kmm_pruned.text')
开发者ID:cmal,项目名称:trainer,代码行数:30,代码来源:tryprune.py
示例12: run
def run(self,iso=None,buildisodir=None,profiles=None,systems=None,distro=None,standalone=None,source=None,exclude_dns=None,mkisofs_opts=None):
# the distro option is for stand-alone builds only
if not standalone and distro is not None:
utils.die(self.logger,"The --distro option should only be used when creating a standalone ISO")
# if building standalone, we only want --distro,
# profiles/systems are disallowed
if standalone:
if profiles is not None or systems is not None:
utils.die(self.logger,"When building a standalone ISO, use --distro only instead of --profiles/--systems")
elif distro is None:
utils.die(self.logger,"When building a standalone ISO, you must specify a --distro")
if source != None and not os.path.exists(source):
utils.die(self.logger,"The source specified (%s) does not exist" % source)
# if iso is none, create it in . as "kickstart.iso"
if iso is None:
iso = "kickstart.iso"
if buildisodir is None:
buildisodir = self.settings.buildisodir
else:
if not os.path.isdir(buildisodir):
utils.die(self.logger,"The --tempdir specified is not a directory")
(buildisodir_head,buildisodir_tail) = os.path.split(os.path.normpath(buildisodir))
if buildisodir_tail != "buildiso":
buildisodir = os.path.join(buildisodir, "buildiso")
self.logger.info("using/creating buildisodir: %s" % buildisodir)
if not os.path.exists(buildisodir):
os.makedirs(buildisodir)
else:
shutil.rmtree(buildisodir)
os.makedirs(buildisodir)
# if base of buildisodir does not exist, fail
# create all profiles unless filtered by "profiles"
imagesdir = os.path.join(buildisodir, "images")
isolinuxdir = os.path.join(buildisodir, "isolinux")
self.logger.info("building tree for isolinux")
if not os.path.exists(imagesdir):
os.makedirs(imagesdir)
if not os.path.exists(isolinuxdir):
os.makedirs(isolinuxdir)
self.logger.info("copying miscellaneous files")
isolinuxbin = "/usr/share/syslinux/isolinux.bin"
if not os.path.exists(isolinuxbin):
isolinuxbin = "/usr/lib/syslinux/isolinux.bin"
menu = "/usr/share/syslinux/menu.c32"
if not os.path.exists(menu):
menu = "/var/lib/cobbler/loaders/menu.c32"
chain = "/usr/share/syslinux/chain.c32"
if not os.path.exists(chain):
chain = "/usr/lib/syslinux/chain.c32"
files = [ isolinuxbin, menu, chain ]
for f in files:
if not os.path.exists(f):
utils.die(self.logger,"Required file not found: %s" % f)
else:
utils.copyfile(f, os.path.join(isolinuxdir, os.path.basename(f)), self.api)
if standalone:
self.generate_standalone_iso(imagesdir,isolinuxdir,distro,source)
else:
self.generate_netboot_iso(imagesdir,isolinuxdir,profiles,systems,exclude_dns)
if mkisofs_opts == None:
mkisofs_opts = ""
else:
mkisofs_opts = mkisofs_opts.strip()
# removed --quiet
cmd = "mkisofs -o %s %s -r -b isolinux/isolinux.bin -c isolinux/boot.cat" % (iso,mkisofs_opts)
cmd = cmd + " -no-emul-boot -boot-load-size 4"
cmd = cmd + " -boot-info-table -V Cobbler\ Install -R -J -T %s" % buildisodir
rc = utils.subprocess_call(self.logger, cmd, shell=True)
if rc != 0:
utils.die(self.logger,"mkisofs failed")
self.logger.info("ISO build complete")
self.logger.info("You may wish to delete: %s" % buildisodir)
self.logger.info("The output file is: %s" % iso)
return True
开发者ID:ciupicri,项目名称:cobbler,代码行数:93,代码来源:action_buildiso.py
示例13: prepare_packages_win32
def prepare_packages_win32(self, vars):
# <install>/lib/site-packages/PySide/* -> <setup>/PySide
copydir(
"{install_dir}/lib/site-packages/PySide",
"{setup_dir}/PySide",
logger=log, vars=vars)
if self.debug:
# <build>/pyside/PySide/*.pdb -> <setup>/PySide
copydir(
"{build_dir}/pyside/PySide",
"{setup_dir}/PySide",
filter=["*.pdb"],
recursive=False, logger=log, vars=vars)
# <install>/lib/site-packages/shiboken.pyd -> <setup>/PySide/shiboken.pyd
copyfile(
"{install_dir}/lib/site-packages/shiboken.pyd",
"{setup_dir}/PySide/shiboken.pyd",
logger=log, vars=vars)
# <install>/lib/site-packages/pysideuic/* -> <setup>/pysideuic
copydir(
"{install_dir}/lib/site-packages/pysideuic",
"{setup_dir}/pysideuic",
force=False, logger=log, vars=vars)
# <install>/bin/pyside-uic -> PySide/scripts/uic.py
makefile(
"{setup_dir}/PySide/scripts/__init__.py",
logger=log, vars=vars)
copyfile(
"{install_dir}/bin/pyside-uic",
"{setup_dir}/PySide/scripts/uic.py",
force=False, logger=log, vars=vars)
# <install>/bin/*.exe,*.dll -> PySide/
copydir(
"{install_dir}/bin/",
"{setup_dir}/PySide",
filter=["*.exe", "*.dll"],
recursive=False, logger=log, vars=vars)
# <install>/lib/*.lib -> PySide/
copydir(
"{install_dir}/lib/",
"{setup_dir}/PySide",
filter=["*.lib"],
recursive=False, logger=log, vars=vars)
# <install>/share/PySide/typesystems/* -> <setup>/PySide/typesystems
copydir(
"{install_dir}/share/PySide/typesystems",
"{setup_dir}/PySide/typesystems",
logger=log, vars=vars)
# <install>/include/* -> <setup>/PySide/include
copydir(
"{install_dir}/include",
"{setup_dir}/PySide/include",
logger=log, vars=vars)
# <sources>/pyside-examples/examples/* -> <setup>/PySide/examples
copydir(
"{sources_dir}/pyside-examples/examples",
"{setup_dir}/PySide/examples",
force=False, logger=log, vars=vars)
# <ssl_libs>/* -> <setup>/PySide/
copydir("{ssl_libs_dir}", "{setup_dir}/PySide",
filter=[
"libeay32.dll",
"ssleay32.dll"],
force=False, logger=log, vars=vars)
# <qt>/bin/*.dll -> <setup>/PySide
copydir("{qt_bin_dir}", "{setup_dir}/PySide",
filter=[
"*.dll",
"designer.exe",
"linguist.exe",
"lrelease.exe",
"lupdate.exe",
"lconvert.exe"],
ignore=["*d4.dll"],
recursive=False, logger=log, vars=vars)
if self.debug:
# <qt>/bin/*d4.dll -> <setup>/PySide
copydir("{qt_bin_dir}", "{setup_dir}/PySide",
filter=["*d4.dll"],
recursive=False, logger=log, vars=vars)
# <qt>/plugins/* -> <setup>/PySide/plugins
copydir("{qt_plugins_dir}", "{setup_dir}/PySide/plugins",
filter=["*.dll"],
logger=log, vars=vars)
# <qt>/imports/* -> <setup>/PySide/imports
copydir("{qt_imports_dir}", "{setup_dir}/PySide/imports",
filter=["qmldir", "*.dll"],
logger=log, vars=vars)
# <qt>/translations/* -> <setup>/PySide/translations
copydir("{qt_translations_dir}", "{setup_dir}/PySide/translations",
filter=["*.qm"],
logger=log, vars=vars)
开发者ID:enthought,项目名称:pyside-setup,代码行数:92,代码来源:setup.py
示例14: prepare_packages_linux
def prepare_packages_linux(self, vars):
# patchelf -> PySide/patchelf
copyfile(
"{setup_dir}/patchelf",
"{setup_dir}/PySide/patchelf",
logger=log, vars=vars)
# <install>/lib/site-packages/PySide/* -> <setup>/PySide
copydir(
"{install_dir}/lib/python{py_version}/site-packages/PySide",
"{setup_dir}/PySide",
logger=log, vars=vars)
# <install>/lib/site-packages/shiboken.so -> <setup>/PySide/shiboken.so
copyfile(
"{install_dir}/lib/python{py_version}/site-packages/shiboken.so",
"{setup_dir}/PySide/shiboken.so",
logger=log, vars=vars)
# <install>/lib/site-packages/pysideuic/* -> <setup>/pysideuic
copydir(
"{install_dir}/lib/python{py_version}/site-packages/pysideuic",
"{setup_dir}/pysideuic",
force=False, logger=log, vars=vars)
# <install>/bin/pyside-uic -> PySide/scripts/uic.py
makefile(
"{setup_dir}/PySide/scripts/__init__.py",
logger=log, vars=vars)
copyfile(
"{install_dir}/bin/pyside-uic",
"{setup_dir}/PySide/scripts/uic.py",
force=False, logger=log, vars=vars)
# <install>/bin/* -> PySide/
copydir(
"{install_dir}/bin/",
"{setup_dir}/PySide",
filter=[
"pyside-lupdate",
"pyside-rcc",
"shiboken",
],
recursive=False, logger=log, vars=vars)
# <install>/lib/lib* -> PySide/
copydir(
"{install_dir}/lib/",
"{setup_dir}/PySide",
filter=[
"libpyside*.so.*",
"libshiboken*.so.*",
],
recursive=False, logger=log, vars=vars)
# <install>/share/PySide/typesystems/* -> <setup>/PySide/typesystems
copydir(
"{install_dir}/share/PySide/typesystems",
"{setup_dir}/PySide/typesystems",
logger=log, vars=vars)
# <install>/include/* -> <setup>/PySide/include
copydir(
"{install_dir}/include",
"{setup_dir}/PySide/include",
logger=log, vars=vars)
# <sources>/pyside-examples/examples/* -> <setup>/PySide/examples
copydir(
"{sources_dir}/pyside-examples/examples",
"{setup_dir}/PySide/examples",
force=False, logger=log, vars=vars)
# Copy Qt libs to package
if OPTION_STANDALONE:
# <qt>/bin/* -> <setup>/PySide
copydir("{qt_bin_dir}", "{setup_dir}/PySide",
filter=[
"designer",
"linguist",
"lrelease",
"lupdate",
"lconvert",
],
recursive=False, logger=log, vars=vars)
# <qt>/lib/* -> <setup>/PySide
copydir("{qt_lib_dir}", "{setup_dir}/PySide",
filter=[
"libQt*.so.?",
"libphonon.so.?",
],
recursive=False, logger=log, vars=vars)
# <qt>/plugins/* -> <setup>/PySide/plugins
copydir("{qt_plugins_dir}", "{setup_dir}/PySide/plugins",
filter=["*.so"],
logger=log, vars=vars)
# <qt>/imports/* -> <setup>/PySide/imports
if float(vars["qt_version"][:3]) > 4.6:
copydir("{qt_imports_dir}", "{setup_dir}/PySide/imports",
filter=["qmldir", "*.so"],
logger=log, vars=vars)
# <qt>/translations/* -> <setup>/PySide/translations
copydir("{qt_translations_dir}", "{setup_dir}/PySide/translations",
filter=["*.qm"],
logger=log, vars=vars)
开发者ID:enthought,项目名称:pyside-setup,代码行数:95,代码来源:setup.py
示例15: __download_item
def __download_item(self, item):
src = item['url']
dst = os.path.join(NOAH_DOWNLOAD_HOME, item['type'], item['name'])
self.logger.info("Downloading " + src + " to " + dst)
copyfile(src, dst)
pass
开发者ID:wangchen1ren,项目名称:aliyun,代码行数:6,代码来源:downloader.py
示例16: copy_stations
def copy_stations(_event, stationfolder, targetstadir):
originsta = os.path.join(stationfolder, "STATIONS.%s" % _event)
targetsta = os.path.join(targetstadir, "STATIONS.%s" % _event)
if os.path.exists(originsta):
copyfile(originsta, targetsta, verbose=False)
开发者ID:wjlei1990,项目名称:source_inversion_toolkit,代码行数:5,代码来源:X02_create_job.py
示例17: prepare_packages_posix
def prepare_packages_posix(self, vars):
if sys.platform == 'linux2':
# patchelf -> PySide/patchelf
copyfile(
"{script_dir}/patchelf",
"{dist_dir}/PySide/patchelf",
logger=log, vars=vars)
so_ext = '.so'
so_star = so_ext + '.*'
elif sys.platform == 'darwin':
so_ext = '.dylib'
so_star = so_ext
# <build>/shiboken/doc/html/* -> <setup>/PySide/docs/shiboken
copydir(
"{build_dir}/shiboken/doc/html",
"{dist_dir}/PySide/docs/shiboken",
force=False, logger=log, vars=vars)
# <install>/lib/site-packages/PySide/* -> <setup>/PySide
copydir(
"{install_dir}/lib/python{py_version}/site-packages/PySide",
"{dist_dir}/PySide",
logger=log, vars=vars)
# <install>/lib/site-packages/shiboken.so -> <setup>/PySide/shiboken.so
copyfile(
"{install_dir}/lib/python{py_version}/site-packages/shiboken.so",
"{dist_dir}/PySide/shiboken.so",
logger=log, vars=vars)
# <install>/lib/site-packages/pysideuic/* -> <setup>/pysideuic
copydir(
"{install_dir}/lib/python{py_version}/site-packages/pysideuic",
"{dist_dir}/pysideuic",
force=False, logger=log, vars=vars)
# <install>/bin/pyside-uic -> PySide/scripts/uic.py
makefile(
"{dist_dir}/PySide/scripts/__init__.py",
logger=log, vars=vars)
copyfile(
"{install_dir}/bin/pyside-uic",
"{dist_dir}/PySide/scripts/uic.py",
force=False, logger=log, vars=vars)
# <install>/bin/* -> PySide/
copydir(
"{install_dir}/bin/",
"{dist_dir}/PySide",
filter=[
"pyside-lupdate",
"pyside-rcc",
"shiboken",
],
recursive=False, logger=log, vars=vars)
# <install>/lib/lib* -> PySide/
copydir(
"{install_dir}/lib/",
"{dist_dir}/PySide",
filter=[
"libpyside*" + so_star,
"libshiboken*" + so_star,
],
recursive=False, logger=log, vars=vars)
# <install>/share/PySide/typesystems/* -> <setup>/PySide/typesystems
copydir(
"{install_dir}/share/PySide/typesystems",
"{dist_dir}/PySide/typesystems",
logger=log, vars=vars)
# <install>/include/* -> <setup>/PySide/include
copydir(
"{install_dir}/include",
"{dist_dir}/PySide/include",
logger=log, vars=vars)
# <sources>/pyside-examples/examples/* -> <setup>/PySide/examples
copydir(
"{sources_dir}/pyside-examples/examples",
"{dist_dir}/PySide/examples",
force=False, logger=log, vars=vars)
# Copy Qt libs to package
if OPTION_STANDALONE:
if sys.platform == 'darwin':
raise RuntimeError('--standalone not yet supported for OSX')
# <qt>/bin/* -> <setup>/PySide
copydir("{qt_bin_dir}", "{dist_dir}/PySide",
filter=[
"designer",
"linguist",
"lrelease",
"lupdate",
"lconvert",
],
recursive=False, logger=log, vars=vars)
# <qt>/lib/* -> <setup>/PySide
copydir("{qt_lib_dir}", "{dist_dir}/PySide",
filter=[
"libQt*.so.?",
"libphonon.so.?",
],
recursive=False, logger=log, vars=vars)
# <qt>/plugins/* -> <setup>/PySide/plugins
copydir("{qt_plugins_dir}", "{dist_dir}/PySide/plugins",
filter=["*.so"],
logger=log, vars=vars)
# <qt>/imports/* -> <setup>/PySide/imports
#.........这里部分代码省略.........
开发者ID:deivguerrero,项目名称:pyside-setup,代码行数:101,代码来源:setup.py
示例18: test_rustfmt_handler
def test_rustfmt_handler(self):
fixture = os.path.join('fixtures', 'main.rs')
data = {'filename': copyfile(fixture), 'settings': self.settings}
handler = RustFMTHandler("format", data, 0, 0, self._check_rustfmt)
handler.run()
开发者ID:DamnWidget,项目名称:anaconda_rust_test,代码行数:5,代码来源:test_rustfmt.py
示例19: prepare_packages_win32
def prepare_packages_win32(self, vars):
pdbs = ['*.pdb'] if self.debug or self.build_type == 'RelWithDebInfo' else []
# <install>/lib/site-packages/PySide/* -> <setup>/PySide
copydir(
"{install_dir}/lib/site-packages/PySide",
"{dist_dir}/PySide",
logger=log, vars=vars)
if self.debug or self.build_type == 'RelWithDebInfo':
# <build>/pyside/PySide/*.pdb -> <setup>/PySide
copydir(
"{build_dir}/pyside/PySide",
"{dist_dir}/PySide",
filter=pdbs,
recursive=False, logger=log, vars=vars)
# <build>/shiboken/doc/html/* -> <setup>/PySide/docs/shiboken
copydir(
"{build_dir}/shiboken/doc/html",
"{dist_dir}/PySide/docs/shiboken",
force=False, logger=log, vars=vars)
# <install>/lib/site-packages/shiboken.pyd -> <setup>/PySide/shiboken.pyd
copyfile(
"{install_dir}/lib/site-packages/shiboken{dbgPostfix}.pyd",
"{dist_dir}/PySide/shiboken{dbgPostfix}.pyd",
logger=log, vars=vars)
if self.debug or self.build_type == 'RelWithDebInfo':
copyfile(
"{build_dir}/shiboken/shibokenmodule/shiboken{dbgPostfix}.pdb",
"{dist_dir}/PySide/shiboken{dbgPostfix}.pdb",
logger=log, vars=vars)
# <install>/lib/site-packages/pysideuic/* -> <setup>/pysideuic
copydir(
"{install_dir}/lib/site-packages/pysideuic",
"{dist_dir}/pysideuic",
force=False, logger=log, vars=vars)
# <install>/bin/pyside-uic -> PySide/scripts/uic.py
mak
|
请发表评论