本文整理匯總了Python中setuptools.command.develop.develop.run方法的典型用法代碼示例。如果您正苦於以下問題:Python develop.run方法的具體用法?Python develop.run怎麽用?Python develop.run使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類setuptools.command.develop.develop
的用法示例。
在下文中一共展示了develop.run方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: run
# 需要導入模塊: from setuptools.command.develop import develop [as 別名]
# 或者: from setuptools.command.develop.develop import run [as 別名]
def run(self):
_clean.run(self)
if os.path.exists('build'):
shutil.rmtree('build')
for dirpath, dirnames, filenames in os.walk('yatsm'):
for filename in filenames:
if any(filename.endswith(suffix) for suffix in
('.c', '.so', '.pyd', '.pyc')):
os.unlink(os.path.join(dirpath, filename))
continue
if (any(filename.endswith(suffix) for suffix in
('.pkl', '.json')) and
os.path.basename(dirpath) == 'pickles'):
os.unlink(os.path.join(dirpath, filename))
for dirname in dirnames:
if dirname == '__pycache__':
shutil.rmtree(os.path.join(dirpath, dirname))
# Create pickles when building
示例2: run
# 需要導入模塊: from setuptools.command.develop import develop [as 別名]
# 或者: from setuptools.command.develop.develop import run [as 別名]
def run(self):
from renku.core.commands.init import fetch_template, \
read_template_manifest
with TemporaryDirectory() as tempdir:
# download and extract template data
temppath = Path(tempdir)
print('downloading Renku templates...')
fetch_template(URL, REFERENCE, temppath)
read_template_manifest(temppath, checkout=True)
# copy templates
current_path = Path.cwd()
template_path = current_path / 'renku' / 'templates'
if template_path.exists():
shutil.rmtree(str(template_path))
shutil.copytree(
str(temppath),
str(template_path),
ignore=shutil.ignore_patterns('.git')
)
示例3: run
# 需要導入模塊: from setuptools.command.develop import develop [as 別名]
# 或者: from setuptools.command.develop.develop import run [as 別名]
def run(self):
try:
print("Building custom models:")
build_custom_models()
except ImportError as e:
print("Custom model compilation failed with: %s" % e)
develop.run(self)
示例4: run
# 需要導入模塊: from setuptools.command.develop import develop [as 別名]
# 或者: from setuptools.command.develop.develop import run [as 別名]
def run(self):
develop.run(self)
if sys.platform == 'win32':
for f in glob.glob(os.path.join('simnibs', 'lib', 'win', '*')):
shutil.copy(
f,
os.path.join('simnibs', 'cython_code', os.path.basename(f)))
if sys.platform == 'darwin':
for f in glob.glob(os.path.join('simnibs', 'lib', 'osx', '*')):
shutil.copy(
f,
os.path.join('simnibs', 'cython_code', os.path.basename(f)))
示例5: run
# 需要導入模塊: from setuptools.command.develop import develop [as 別名]
# 或者: from setuptools.command.develop.develop import run [as 別名]
def run(self):
develop.run(self)
install_dir = os.path.join(self.install_dir, 'nesmdb')
_build_vgm_play('/tmp/build_vgmplay', install_dir)
示例6: do_egg_install
# 需要導入模塊: from setuptools.command.develop import develop [as 別名]
# 或者: from setuptools.command.develop.develop import run [as 別名]
def do_egg_install(self):
path = os.path.abspath(
os.path.join(os.path.dirname(__file__), "rekall-core", "setup.py"))
if os.access(path, os.F_OK):
print("Installing rekall-core from local directory.")
subprocess.check_call([sys.executable, "setup.py", "install"],
cwd="rekall-core")
# Need to call this directly because _install.run does crazy stack
# walking and falls back to compatibility mode.
_install.do_egg_install(self)
示例7: run
# 需要導入模塊: from setuptools.command.develop import develop [as 別名]
# 或者: from setuptools.command.develop.develop import run [as 別名]
def run(self):
path = os.path.abspath(
os.path.join(os.path.dirname(__file__), "rekall-core", "setup.py"))
if os.access(path, os.F_OK):
print("Installing rekall-core from local directory.")
subprocess.check_call([sys.executable, "setup.py", "develop"],
cwd="rekall-core")
_develop.run(self)
示例8: run
# 需要導入模塊: from setuptools.command.develop import develop [as 別名]
# 或者: from setuptools.command.develop.develop import run [as 別名]
def run(self):
subprocess.check_call([sys.executable, build_protos_cmd, repo_root], env=os.environ.copy())
示例9: run
# 需要導入模塊: from setuptools.command.develop import develop [as 別名]
# 或者: from setuptools.command.develop.develop import run [as 別名]
def run(self):
print(self.install_dir)
with open("quarkchain/tools/" + PTH) as infp:
with open(self.target, "w") as outfp:
outfp.write(infp.read())
develop.run(self)
示例10: run
# 需要導入模塊: from setuptools.command.develop import develop [as 別名]
# 或者: from setuptools.command.develop.develop import run [as 別名]
def run(self):
if not self.dry_run:
target_dir = os.path.join(self.build_lib, MODEL_TARGET_DIR)
self.mkpath(target_dir)
build_models(target_dir)
build_py.run(self)
示例11: run
# 需要導入模塊: from setuptools.command.develop import develop [as 別名]
# 或者: from setuptools.command.develop.develop import run [as 別名]
def run(self):
command = ['pip', 'install', self.version, self.options]
subprocess.check_call(command)
示例12: run
# 需要導入模塊: from setuptools.command.develop import develop [as 別名]
# 或者: from setuptools.command.develop.develop import run [as 別名]
def run(self):
_develop.run(self)
self.execute(_hooks, (self.install_lib,), msg="Running develop preparation task")
示例13: run
# 需要導入模塊: from setuptools.command.develop import develop [as 別名]
# 或者: from setuptools.command.develop.develop import run [as 別名]
def run(self):
subprocess.check_call(['pipenv', 'install', '--dev', '--deploy', '--system'])
develop.run(self)
示例14: run
# 需要導入模塊: from setuptools.command.develop import develop [as 別名]
# 或者: from setuptools.command.develop.develop import run [as 別名]
def run(self):
import grpc_tools.command
grpc_tools.command.build_package_protos(self.distribution.package_dir[''])
示例15: run
# 需要導入模塊: from setuptools.command.develop import develop [as 別名]
# 或者: from setuptools.command.develop.develop import run [as 別名]
def run(self):
compileProtoBuf()
develop.run(self)