本文整理汇总了Python中setuptools.Distribution.finalize_options方法的典型用法代码示例。如果您正苦于以下问题:Python Distribution.finalize_options方法的具体用法?Python Distribution.finalize_options怎么用?Python Distribution.finalize_options使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类setuptools.Distribution
的用法示例。
在下文中一共展示了Distribution.finalize_options方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: finalize_options
# 需要导入模块: from setuptools import Distribution [as 别名]
# 或者: from setuptools.Distribution import finalize_options [as 别名]
def finalize_options(self):
self.cmdclass['config'] = config
self.cmdclass['build'] = build
self.cmdclass['build_exe'] = build_exe
self.cmdclass['build_qk'] = build_qk
self.cmdclass['build_ext'] = build_ext
self.cmdclass['build_qext'] = build_qext
self.cmdclass['install'] = install
self.cmdclass['install_exe'] = install_exe
self.cmdclass['install_qlib'] = install_qlib
self.cmdclass['install_qext'] = install_qext
self.cmdclass['test'] = PyTest
default_qhome_root = os.getenv('SystemDrive') + '\\' if platform == 'Windows' else os.getenv('HOME')
self.qhome = os.getenv('QHOME') or os.path.join(default_qhome_root, 'q')
bits = BITS
if platform == 'Linux':
o = 'l'
elif platform == 'SunOS':
o = 'v' if uname()[-1] == 'i86pc' else 's'
elif platform == 'Darwin':
o = 'm'
bits = 32
elif platform == 'Windows':
o = 'w'
bits = 32 # FIXME: We test with 32-bit kdb+ on Windows, so forcing 32-bit version.
else:
sys.stderr.write("Unknown platform: %s\n" % str(platform))
sys.exit(1)
self.qarch = "%s%d" % (o, bits)
self.install_data = os.path.join(self.qhome, self.qarch)
self.kxver = self.get_kxver(self.qhome)
self.qexecutable = os.path.join(self.qhome, self.qarch, 'q')
_Distribution.finalize_options(self)
for ext in self.ext_modules + self.qext_modules:
ext.define_macros.append(('KXVER', self.kxver.split('.')[0]))
ext.define_macros.append(('QVER', self.kxver.split('.')[0]))
if sys.hexversion >= 0x3000000:
ext.define_macros.append(('PY3K', "%s%s" % sys.version_info[:2]))
示例2: finalize_options
# 需要导入模块: from setuptools import Distribution [as 别名]
# 或者: from setuptools.Distribution import finalize_options [as 别名]
def finalize_options(self):
self.cmdclass['config'] = config
self.cmdclass['build'] = build
self.cmdclass['build_exe'] = build_exe
self.cmdclass['build_qk'] = build_qk
self.cmdclass['build_ext'] = build_ext
self.cmdclass['build_qext'] = build_qext
self.cmdclass['install'] = install
self.cmdclass['install_exe'] = install_exe
self.cmdclass['install_qlib'] = install_qlib
self.cmdclass['install_qext'] = install_qext
self.cmdclass['test'] = PyTest
self.qhome = os.getenv('QHOME') or os.path.join(os.getenv('HOME'), 'q')
bits = 8 * get_config_var('SIZEOF_VOID_P')
u = os.uname()
if u[0] == 'Linux':
o = 'l'
elif u[0] == 'SunOS':
o = 'v' if u[-1] == 'i86pc' else 's'
elif u[0] == 'Darwin':
o = 'm'
bits = 32
else:
sys.stderr.write("Unknown platform: %s\n" % str(u))
sys.exit(1)
self.qarch = "%s%d" % (o, bits)
self.install_data = os.path.join(self.qhome, self.qarch)
self.kxver = self.get_kxver(self.qhome)
self.qexecutable = os.path.join(self.qhome, self.qarch, 'q')
_Distribution.finalize_options(self)
for ext in self.ext_modules + self.qext_modules:
ext.define_macros.append(('KXVER', self.kxver.split('.')[0]))
ext.define_macros.append(('QVER', self.kxver.split('.')[0]))
if sys.hexversion >= 0x3000000:
ext.define_macros.append(('PY3K', "%s%s" % sys.version_info[:2]))