def run(self):
spacy_download_en()
_develop.run(self)
python类run()的实例源码
def run(self):
# download the binaries
self.execute(self._setup_binaries, (),
msg="Downloaded the binaries from tomato_binaries.")
# install tomato
_install.run(self)
# install requirements
subprocess.call(["pip install -Ur requirements"], shell=True)
def run(self):
develop.run(self)
def run(self):
install.run(self)
# Save version and author to __meta__.py
def run(self):
#os.system('') # add some commands for Cython functions
build_ext.run(self)
def run(self):
#os.system('') # add some commands for Cython functions
sdist.run(self)
def run(self):
#os.system('') # add some commands for Cython functions
install.run(self)
def run(self):
develop.run(self)
def run(self):
_install.run(self)
self.execute(_run_build_tables, (self.install_lib,),
msg="Build the lexing/parsing tables")
def run(self):
load_nltk_data()
install.run(self)
def run(self):
"""
Post install script
"""
cmd = [
'pod2man',
'--center=Container bootstrapping tool',
'--name=VIRT-BOOTSTRAP',
'--release=%s' % virtBootstrap.__version__,
'man/virt-bootstrap.pod',
'man/virt-bootstrap.1'
]
if subprocess.call(cmd) != 0:
raise RuntimeError("Building man pages has failed")
install.run(self)
def run(self):
"""
Call pycodestyle and pylint here.
"""
res = 0
files = ' '.join(["setup.py", "src/virtBootstrap/*.py", "tests/*.py"])
output_format = "colorized" if sys.stdout.isatty() else "text"
print(">>> Running pycodestyle ...")
cmd = "pycodestyle "
if (subprocess.call(cmd + files, shell=True) != 0):
res = 1
print(">>> Running pylint ...")
args = ""
if self.errors_only:
args = "-E"
cmd = "pylint %s --output-format=%s " % (args, format(output_format))
if (subprocess.call(cmd + files, shell=True) != 0):
res = 1
sys.exit(res)
# SdistCommand is reused from the libvirt python binding (GPLv2+)
def run(self):
check_call("python -m spacy download en".split())
develop.run(self)
def run(self):
check_call("python -m spacy download en".split())
install.run(self)
def run(self):
os.system('sh install_meshrender.sh')
develop.run(self)
def run(self):
os.system('sh install_meshrender.sh')
install.run(self)
def run(self):
"""Overridden method. Runs the build.
Library directories and include directories are checked here, first.
"""
# Add the numpy include directory.
self.include_dirs.insert(0, get_include())
# Call the base class method.
build_ext.run(self)
def run(self):
"""Overridden method. Runs the installation."""
install.run(self) # Call the base class method.
# Make sure all Python tasks are executable.
for file_path in self.get_outputs():
if 'tasks' in file_path and '.py' in file_path:
status = os.stat(file_path)
os.chmod(file_path, status.st_mode | 73)
def run(self):
self.discover_tests()
self.test_runner.run(self.test_suite)
if self.outfile:
self.outfile.close()
def run(self):
install.run(self)