Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def __str__(self):
import pybind11
return pybind11.get_include(self.user)
def __str__(self):
import pybind11
return pybind11.get_include(self.user)
def __str__(self):
import pybind11
return pybind11.get_include(self.user)
def __str__(self):
import pybind11
return pybind11.get_include(self.user)
if has_flag(self.compiler, '-fvisibility=hidden'):
opts.append('-fvisibility=hidden')
elif ct == 'msvc':
opts.append('/DVERSION_INFO=\\"%s\\"' % self.distribution.get_version())
# extend include dirs here (don't assume numpy/pybind11 are installed when first run, since
# pip could have installed them as part of executing this script
import pybind11
import numpy as np
for ext in self.extensions:
ext.extra_compile_args.extend(opts)
ext.extra_link_args.extend(self.link_opts.get(ct, []))
ext.include_dirs.extend([
# Path to pybind11 headers
pybind11.get_include(),
pybind11.get_include(True),
# Path to numpy headers
np.get_include()
])
build_ext.build_extensions(self)
def __str__(self):
import pybind11
return pybind11.get_include(self.user)
def build_extensions(self):
# The include directory for the celerite headers
localincl = "vendor"
if not os.path.exists(os.path.join(localincl, "eigen_3.3.4", "Eigen",
"Core")):
raise RuntimeError("couldn't find Eigen headers")
# Add the pybind11 include directory
import numpy
import pybind11
include_dirs = [
os.path.join("george", "include"),
os.path.join(localincl, "eigen_3.3.4"),
numpy.get_include(),
pybind11.get_include(False),
pybind11.get_include(True),
]
for ext in self.extensions:
ext.include_dirs = include_dirs + ext.include_dirs
# Building on RTDs takes a bit of special care
if os.environ.get("READTHEDOCS", None) == "True":
for ext in self.extensions:
ext.extra_compile_args = ["-std=c++14", "-O0"]
_build_ext.build_extensions(self)
return
# Compiler flags
ct = self.compiler.compiler_type
opts = self.c_opts.get(ct, [])
if ct == "unix":
opts.append("-DVERSION_INFO=\"{0:s}\""
opts.append(cpp_flag(self.compiler))
if has_flag(self.compiler, '-fvisibility=hidden'):
opts.append('-fvisibility=hidden')
elif ct == 'msvc':
opts.append('/DVERSION_INFO=\\"%s\\"' % self.distribution.get_version())
# extend include dirs here (don't assume numpy/pybind11 are installed when first run, since
# pip could have installed them as part of executing this script
import pybind11
import numpy as np
for ext in self.extensions:
ext.extra_compile_args.extend(opts)
ext.extra_link_args.extend(self.link_opts.get(ct, []))
ext.include_dirs.extend([
# Path to pybind11 headers
pybind11.get_include(),
pybind11.get_include(True),
# Path to numpy headers
np.get_include()
])
build_ext.build_extensions(self)
def __str__(self):
import pybind11
return pybind11.get_include(self.user)
def setup_pybind11(cfg):
import pybind11
cfg['include_dirs'] += [pybind11.get_include(), pybind11.get_include(True)]
# Prefix with c++11 arg instead of suffix so that if a user specifies c++14 (or later!) then it won't be overridden.
cfg['compiler_args'] = ['-std=c++11', '-fvisibility=hidden'] + cfg['compiler_args']