本文整理匯總了Python中setuptools.command.build_py方法的典型用法代碼示例。如果您正苦於以下問題:Python command.build_py方法的具體用法?Python command.build_py怎麽用?Python command.build_py使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類setuptools.command
的用法示例。
在下文中一共展示了command.build_py方法的6個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: run
# 需要導入模塊: from setuptools import command [as 別名]
# 或者: from setuptools.command import build_py [as 別名]
def run(self):
setuptools.command.build_py.build_py.run(self)
if self.dry_run:
return
target_file = os.path.join(self.build_lib, 'aaf2', "__init__.py")
source_file = os.path.join(os.path.dirname(__file__), 'aaf2', "__init__.py")
# get the base data from the original file
with open(source_file, 'r') as fi:
src_data = fi.read()
# write that + the suffix to the target file
with open(target_file, 'w') as fo:
fo.write(src_data)
fo.write(METADATA_TEMPLATE.format(**PROJECT_METADATA))
示例2: run
# 需要導入模塊: from setuptools import command [as 別名]
# 或者: from setuptools.command import build_py [as 別名]
def run(self):
self.create_version_file()
setuptools.command.build_py.build_py.run(self)
示例3: run
# 需要導入模塊: from setuptools import command [as 別名]
# 或者: from setuptools.command import build_py [as 別名]
def run(self):
self.run_command('create_version')
setuptools.command.build_py.build_py.run(self)
示例4: run
# 需要導入模塊: from setuptools import command [as 別名]
# 或者: from setuptools.command import build_py [as 別名]
def run(self):
self.run_command("create_version_file")
setuptools.command.build_py.build_py.run(self)
示例5: run
# 需要導入模塊: from setuptools import command [as 別名]
# 或者: from setuptools.command import build_py [as 別名]
def run(self):
if platform.system() != 'Windows':
self.run_command('build_manpage')
setuptools.command.build_py.build_py.run(self)
示例6: run
# 需要導入模塊: from setuptools import command [as 別名]
# 或者: from setuptools.command import build_py [as 別名]
def run(self):
self.run_command("build_ext")
self.create_version_file()
setuptools.command.build_py.build_py.run(self)