本文整理汇总了Python中setuptools.command.build_ext.build_ext.finalize_options函数的典型用法代码示例。如果您正苦于以下问题:Python finalize_options函数的具体用法?Python finalize_options怎么用?Python finalize_options使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了finalize_options函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Python代码示例。
示例1: finalize_options
def finalize_options(self):
build_ext.finalize_options(self)
if self.compiler is None:
compiler = get_default_compiler()
else:
compiler = self.compiler
if compiler == "msvc":
# Add msvc specific hacks
if (sys.version_info.major, sys.version_info.minor) < (3, 3):
# The check above is a nasty hack. We're using the python
# version as a proxy for the MSVC version. 2008 doesn't
# have stdint.h, so is needed. 2010 does.
#
# We need to add the path to msvc includes
include_dirs.append(os.path.join(os.getcwd(), "include", "msvc_2008"))
# We need to prepend lib to all the library names
_libraries = []
for each_lib in self.libraries:
_libraries.append("lib" + each_lib)
self.libraries = _libraries
开发者ID:ng110,项目名称:pyFFTW,代码行数:26,代码来源:setup.py
示例2: finalize_options
def finalize_options(self):
from Cython.Build import cythonize
self.distribution.ext_modules[:] = cythonize(
self.distribution.ext_modules,
compiler_directives={'embedsignature': True},
)
_build_ext.finalize_options(self)
开发者ID:pombredanne,项目名称:yammh3,代码行数:7,代码来源:setup.py
示例3: finalize_options
def finalize_options(self):
# Validate the --enable-openmp and --disable-openmp command line options:
# the user should provide at most one of them.
if self.enable_openmp and self.disable_openmp:
raise _DistutilsOptionError("--enable-openmp and --disable-openmp are mutually exclusive")
# Chain to method in parent class.
_build_ext.finalize_options(self)
开发者ID:gravitationalarry,项目名称:bayestar-localization,代码行数:7,代码来源:setuptools_openmp.py
示例4: finalize_options
def finalize_options(self):
_build_ext.finalize_options(self)
# Prevent numpy from thinking it is still in its setup process
__builtins__.__NUMPY_SETUP__ = False
print('build_ext: including numpy files')
import numpy
self.include_dirs.append(numpy.get_include())
开发者ID:jf---,项目名称:cyassimp,代码行数:7,代码来源:setup.py
示例5: finalize_options
def finalize_options(self):
build_ext.finalize_options(self)
import builtins
# Prevent numpy from thinking it is still in its setup process:
builtins.__NUMPY_SETUP__ = False
import numpy
self.include_dirs.append(numpy.get_include())
开发者ID:jeromekelleher,项目名称:msprime,代码行数:7,代码来源:setup.py
示例6: finalize_options
def finalize_options(self):
_build_ext.finalize_options(self)
# Prevent numpy from thinking it is still in its setup process:
if hasattr(__builtins__, '__NUMPY_SETUP__'):
__builtins__.__NUMPY_SETUP__ = False
import numpy
self.include_dirs.append(numpy.get_include())
开发者ID:wmayner,项目名称:pyemd,代码行数:7,代码来源:setup.py
示例7: finalize_options
def finalize_options(self):
build_ext.finalize_options(self)
if not self.distribution.has_c_libraries():
return
# Go through individual extensions and set their rpath variable and
# library search paths
build_clib = self.get_finalized_command("build_clib")
libnames = [libname for libname, _ in build_clib.libraries]
rpaths_abs = [os.path.dirname(build_clib.get_fullpath(lib))
for lib in build_clib.libraries]
rpaths_abs = list(set(rpaths_abs))
libdirs = [os.path.join(build_clib.build_clib, p)
for p in rpaths_abs]
for ext in self.extensions:
ext_path = self.get_ext_filename(ext.name)
rpaths_rel = [os.path.relpath(p, os.path.dirname(ext_path))
for p in rpaths_abs]
ext.runtime_library_dirs.extend(
["$ORIGIN/{}".format(p) for p in rpaths_rel])
ext.libraries.extend(libnames)
ext.library_dirs.extend(libdirs)
开发者ID:mspraggs,项目名称:pyQCD,代码行数:28,代码来源:build_ext.py
示例8: finalize_options
def finalize_options(self):
_build_ext.finalize_options(self)
# prevent numpy from thinking it is still in its setup process
__builtins__.__NUMPY_SETUP__ = False
import numpy
# place numpy includes first, see gh #156
self.include_dirs.insert(0, numpy.get_include())
开发者ID:kwgoodman,项目名称:bottleneck,代码行数:7,代码来源:setup.py
示例9: finalize_options
def finalize_options(self):
options_pairs = []
if not self.with_mysql_capi:
options_pairs.append(('with_mysql_capi', 'with_mysql_capi'))
if not self.with_protobuf_include_dir:
options_pairs.append(('with_protobuf_include_dir',
'with_protobuf_include_dir'))
if not self.with_protobuf_lib_dir:
options_pairs.append(('with_protobuf_lib_dir',
'with_protobuf_lib_dir'))
if not self.with_protoc:
options_pairs.append(('with_protoc', 'with_protoc'))
if options_pairs:
self.set_undefined_options('install', *options_pairs)
build_ext.finalize_options(self)
print("# Python architecture: {0}".format(py_arch))
print("# Python ARCH_64BIT: {0}".format(ARCH_64BIT))
self.connc_lib = os.path.join(self.build_temp, 'connc', 'lib')
self.connc_include = os.path.join(self.build_temp, 'connc', 'include')
self.protobuf_lib = os.path.join(self.build_temp, 'protobuf', 'lib')
self.protobuf_include = os.path.join(self.build_temp, 'protobuf', 'include')
if self.with_mysql_capi:
self._finalize_connector_c(self.with_mysql_capi)
if not self.with_protobuf_include_dir:
self.with_protobuf_include_dir = \
os.environ.get("MYSQLXPB_PROTOBUF_INCLUDE_DIR")
if not self.with_protobuf_lib_dir:
self.with_protobuf_lib_dir = \
os.environ.get("MYSQLXPB_PROTOBUF_LIB_DIR")
if not self.with_protoc:
self.with_protoc = os.environ.get("MYSQLXPB_PROTOC")
if self.with_protobuf_include_dir:
print("# Protobuf include directory: {0}"
"".format(self.with_protobuf_include_dir))
else:
log.error("Unable to find Protobuf include directory.")
sys.exit(1)
if self.with_protobuf_lib_dir:
print("# Protobuf library directory: {0}"
"".format(self.with_protobuf_lib_dir))
else:
log.error("Unable to find Protobuf library directory.")
sys.exit(1)
if self.with_protoc:
print("# Protobuf protoc binary: {0}".format(self.with_protoc))
else:
log.error("Unable to find Protobuf protoc binary.")
sys.exit(1)
self._finalize_protobuf()
开发者ID:sanpingz,项目名称:mysql-connector,代码行数:60,代码来源:cpy_distutils.py
示例10: finalize_options
def finalize_options(self):
self.set_undefined_options('build')
try:
r_home = subprocess.check_output(("R", "RHOME"),
universal_newlines=True)
except:
raise SystemExit("Error: Tried to guess R's HOME but no R command in the PATH.")
r_home = r_home.split(os.linesep)
#Twist if 'R RHOME' spits out a warning
if r_home[0].startswith("WARNING"):
r_home = r_home[1].rstrip()
else:
r_home = r_home[0].rstrip()
rexec = RExec(r_home)
if rexec.version[0] == 'development' or \
cmp_version(rexec.version[:2], [2, 8]) == -1:
if self.ignore_check_rversion:
warnings.warn("R did not seem to have the minimum required version number")
else:
raise SystemExit("Error: R >= 2.8 required (and R told '%s')." %'.'.join(rexec.version))
try:
super(build_ext, self).finalize_options()
except TypeError:
# distutils parent class an old style Python class
_build_ext.finalize_options(self)
开发者ID:scottcode,项目名称:rpy2,代码行数:28,代码来源:setup.py
示例11: finalize_options
def finalize_options(self):
_build_ext.finalize_options(self)
self.set_undefined_options("build",
("force_pyx_compile", "force_pyx_compile"),
("force_template_update", "force_template_update")
)
开发者ID:000Nelson000,项目名称:pywt,代码行数:7,代码来源:commands.py
示例12: finalize_options
def finalize_options(self):
print("Finalizing options")
_build_ext.finalize_options(self)
# Prevent numpy from thinking it is still in its setup process:
__builtins__.__NUMPY_SETUP__ = False
import numpy
self.include_dirs.append(numpy.get_include())
开发者ID:jopohl,项目名称:urh,代码行数:7,代码来源:setup.py
示例13: finalize_options
def finalize_options(self):
build_ext.finalize_options(self)
if self.compiler is None:
compiler = get_default_compiler()
else:
compiler = self.compiler
开发者ID:grlee77,项目名称:pyFFTW,代码行数:8,代码来源:setup.py
示例14: finalize_options
def finalize_options(self):
_build_ext.finalize_options(self)
# Before importing numpy, we need to make sure it doesn't think it
# is still during its setup process:
__builtins__.__NUMPY_SETUP__ = False
import numpy
# Add location of numpy headers:
self.include_dirs.append(numpy.get_include())
开发者ID:cpyman,项目名称:cpymad,代码行数:8,代码来源:setup.py
示例15: finalize_options
def finalize_options(self):
self.set_undefined_options('install',
('with_mysql_capi', 'with_mysql_capi'))
build_ext.finalize_options(self)
if self.with_mysql_capi:
self._finalize_connector_c(self.with_mysql_capi)
开发者ID:itabulous,项目名称:mysql-connector-python,代码行数:8,代码来源:cpy_distutils.py
示例16: finalize_options
def finalize_options(self):
self.with_proj4 = self.truthify(self.with_proj4)
self.with_geos = self.truthify(self.with_geos)
self.with_geosadvanced = self.truthify(self.with_geosadvanced)
self.with_iconv = self.truthify(self.with_iconv)
self.with_freexl = self.truthify(self.with_freexl)
build_ext.finalize_options(self)
开发者ID:SeanHayes,项目名称:pyspatialite,代码行数:8,代码来源:setup.py
示例17: finalize_options
def finalize_options(self):
build_ext.finalize_options(self)
if self.compiler is None:
compiler = get_default_compiler()
else:
compiler = self.compiler
if compiler == 'msvc':
include_dirs.append('compat/win32')
开发者ID:datamade,项目名称:pylbfgs,代码行数:9,代码来源:setup.py
示例18: finalize_options
def finalize_options(self):
_build_ext.finalize_options(self)
# Prevent numpy from thinking it is still in its setup process
try:
del builtins.__NUMPY_SETUP__
except AttributeError:
pass
import numpy
self.include_dirs.append(numpy.get_include())
开发者ID:ndawe,项目名称:root_numpy,代码行数:9,代码来源:setup.py
示例19: finalize_options
def finalize_options(self):
# check if the "BOB_BUILD_DIRECTORY" environment variable is set
env = os.environ
if 'BOB_BUILD_DIRECTORY' in env and env['BOB_BUILD_DIRECTORY']:
# HACKISH: check if we are currently developed by inspecting the way we got called
if 'develop' in sys.argv:
self.build_temp = os.path.join(env['BOB_BUILD_DIRECTORY'], 'build_temp')
self.build_lib = os.path.join(env['BOB_BUILD_DIRECTORY'], 'build_lib')
_build_ext.finalize_options(self)
开发者ID:183amir,项目名称:bob.extension,代码行数:9,代码来源:__init__.py
示例20: finalize_options
def finalize_options(self):
global do_output
build_ext.finalize_options(self)
# I couldn't find an easy way to send the user option from my_install to my_buld_ext.
# So use a global variable. (UGH!)
if self.njobs is None and 'glob_njobs' in globals():
global glob_njobs
self.njobs = glob_njobs
add_dirs(self, output=do_output)
do_output = False
开发者ID:GalSim-developers,项目名称:GalSim,代码行数:10,代码来源:setup.py
注:本文中的setuptools.command.build_ext.build_ext.finalize_options函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论