本文整理汇总了Python中setuptools.command.build_py.build_py.run函数的典型用法代码示例。如果您正苦于以下问题:Python run函数的具体用法?Python run怎么用?Python run使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了run函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: run
def run(self):
if not check_dependencies_once():
return
# Add software that requires Numpy to be installed.
if is_Numpy_installed():
self.packages.extend(NUMPY_PACKAGES)
build_py.run(self)
示例2: run
def run(self):
build_py.run(self)
if self.dry_run:
return
self.generate_files(self.here, self.build_lib)
示例3: run
def run(self):
compile_gemtools()
compile_gemtools_cnv()
parent_dir = os.path.split(os.path.abspath(__file__))[0]
target_dir = "%s/%s" % (parent_dir, "python/gem/gembinaries")
_install_bundle(target_dir, base=parent_dir + "/downloads")
_build_py.run(self)
示例4: run
def run(self):
try:
# Create build date file. This is used to determine if the java jar and python code are
# compatible with each other
f = open('pyboof/build_date.txt', 'w')
f.write(str(int(round(time.time() * 1000))))
f.close()
# See if javac is available for compiling the java code
if check_for_command("javac"):
if call(["bash", "gradlew", "allJar"]) != 0:
print "Gradle build failed."
exit(1)
else:
print "javac isn't installed on your systems. exiting now"
# TODO Should download instead if possible?
exit(1)
except Exception as e:
print "Exception message:"
print str(e)
print e.message
print
if not os.path.isfile('python/pyboof/PyBoof-all.jar'):
print "Gradle build failed AND there is no PyBoof-all.jar"
print ""
print "Did you run build as a regular user first?"
print " ./setup.py build"
print "Is Gradle and Java installed? Test by typing the following:"
print " gradle allJar"
exit(1)
build_py.run(self)
示例5: run
def run(self):
import subprocess
import configparser
build_py.run(self)
proc = subprocess.Popen('git rev-parse --short HEAD',
stdout=subprocess.PIPE,
stderr=subprocess.PIPE,
shell=True)
repo_commit, _ = proc.communicate()
# Fix for python 3
if PY3:
repo_commit = repo_commit.decode()
# We write the installation commit even if it's empty
if PY3:
cfg_parser = configparser.RawConfigParser()
else:
cfg_parser = configparser.ConfigParser()
cfg_parser.read(pjoin('nipype', 'COMMIT_INFO.txt'))
cfg_parser.set('commit hash', 'install_hash', repo_commit.strip())
out_pth = pjoin(self.build_lib, 'nipype', 'COMMIT_INFO.txt')
if PY3:
cfg_parser.write(open(out_pth, 'wt'))
else:
cfg_parser.write(open(out_pth, 'wb'))
示例6: run
def run(self):
qsimDll = Path(QSHARP_PACKAGE_ROOT / "Microsoft.Quantum.Simulation.Simulators.dll")
if not qsimDll.exists():
self.run_command('nuget_copy')
self.write_version()
build_py.run(self)
示例7: run
def run(self):
if not self.dry_run:
target_dir = os.path.join(self.build_lib, MODEL_TARGET_DIR)
self.mkpath(target_dir)
build_stan_model(target_dir)
build_py.run(self)
示例8: run
def run(self, *args):
BuildCommand.run(self, *args)
for lang in langs:
mkmo(lang)
merge_i18n()
示例9: run
def run(self):
if CAN_COPY:
self.run_command('submodule_copy')
if THRIFT is not None:
self.run_command('gen_thrift')
_build_py.run(self)
示例10: run
def run(self):
# Compile the protobufs.
base_dir = os.getcwd()
os.chdir("proto")
subprocess.check_call(["make"], shell=True)
os.chdir(base_dir)
build_py.run(self)
示例11: run
def run(self):
"""Generate the parsetab file so that we can install that too before
calling the regular installer in the super class"""
from pyoracc import _generate_parsetab
_generate_parsetab()
# Can't use super because build_py is an old style class in the Maven
# Jython plugin setuptools version 0.6...
build_py.run(self)
示例12: run
def run(self):
# distutils uses old-style classes, so no super()
build_py.run(self)
# Use a fresh version of the python file
copyfile(VERSION_METADATA_FILE, os.path.join(self.build_lib, VERSION_METADATA_FILE))
add_git_metadata(self.build_lib)
示例13: run
def run(self):
if not self.dry_run:
target_dir = os.path.join(self.build_lib, 'ctplot/static')
self.mkpath(os.path.join(target_dir, 'de'))
self.mkpath(os.path.join(target_dir, 'en'))
generate_static_files(target_dir)
build_py.run(self)
示例14: run
def run(self):
try:
assert(0 == subprocess.call(['make', 'bdist-prep'], cwd=here))
except:
print "Error building package. Try running 'make'."
exit(1)
else:
build_py.run(self)
示例15: run
def run(self):
if not self.dry_run:
_build_requirements()
lib_war = os.path.join(self.build_lib, 'weblabdeusto_data', 'war')
if os.path.exists(lib_war):
shutil.rmtree(lib_war)
shutil.copytree(os.path.join('weblabdeusto_data', 'war'), lib_war)
_build_py.run(self)