Classes | Functions | Variables
pybind11.setup_helpers Namespace Reference

Classes

class  build_ext
 
class  ParallelCompile
 
class  Pybind11Extension
 

Functions

def __init__
 
def _add_cflags
 
def _add_ldflags
 
def auto_cpp_level
 
def build_extensions (self)
 
def cxx_std (self)
 
def has_flag
 
def intree_extensions
 
def naive_recompile
 
def no_recompile
 
def tmp_chdir ()
 

Variables

 _cxx_level
 
 bound
 
 CCompilerMethod
 
 cpp_flag_cache
 
 cxx_std
 
 MACOS
 
 S
 
 STD_TMPL
 
 tmp_chdir_lock
 
 WIN
 

Detailed Description

This module provides helpers for C++11+ projects using pybind11.

LICENSE:

Copyright (c) 2016 Wenzel Jakob <wenzel.jakob@epfl.ch>, All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:

1. Redistributions of source code must retain the above copyright notice, this
   list of conditions and the following disclaimer.

2. Redistributions in binary form must reproduce the above copyright notice,
   this list of conditions and the following disclaimer in the documentation
   and/or other materials provided with the distribution.

3. Neither the name of the copyright holder nor the names of its contributors
   may be used to endorse or promote products derived from this software
   without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

Function Documentation

◆ __init__()

def pybind11.setup_helpers.__init__ (   self,
  args 
)

Definition at line 120 of file setup_helpers.py.

◆ _add_cflags()

def pybind11.setup_helpers._add_cflags (   self,
  flags 
)
private
Build a C++11+ Extension module with pybind11. This automatically adds the
recommended flags when you init the extension and assumes C++ sources - you
can further modify the options yourself.

The customizations are:

* ``/EHsc`` and ``/bigobj`` on Windows
* ``stdlib=libc++`` on macOS
* ``visibility=hidden`` and ``-g0`` on Unix

Finally, you can set ``cxx_std`` via constructor or afterwards to enable
flags for C++ std, and a few extra helper flags related to the C++ standard
level. It is _highly_ recommended you either set this, or use the provided
``build_ext``, which will search for the highest supported extension for
you if the ``cxx_std`` property is not set. Do not set the ``cxx_std``
property more than once, as flags are added when you set it. Set the
property to None to disable the addition of C++ standard flags.

If you want to add pybind11 headers manually, for example for an exact
git checkout, then set ``include_pybind11=False``.

Definition at line 114 of file setup_helpers.py.

◆ _add_ldflags()

def pybind11.setup_helpers._add_ldflags (   self,
  flags 
)
private

Definition at line 117 of file setup_helpers.py.

◆ auto_cpp_level()

def pybind11.setup_helpers.auto_cpp_level (   compiler)

Definition at line 256 of file setup_helpers.py.

◆ build_extensions()

def pybind11.setup_helpers.build_extensions (   self,
  None 
)
Customized build_ext that allows an auto-search for the highest supported
C++ level for Pybind11Extension. This is only needed for the auto-search
for now, and is completely optional otherwise.
Build extensions, injecting C++ std for Pybind11Extension if needed.

Definition at line 281 of file setup_helpers.py.

◆ cxx_std()

def pybind11.setup_helpers.cxx_std (   self,
  int 
)
The CXX standard level. If set, will add the required flags. If left at
0, it will trigger an automatic search when pybind11's build_ext is
used. If None, will have no effect.  Besides just the flags, this may
add a macos-min 10.9 or 10.14 flag if MACOSX_DEPLOYMENT_TARGET is
unset.

Definition at line 165 of file setup_helpers.py.

◆ has_flag()

def pybind11.setup_helpers.has_flag (   compiler)

Definition at line 232 of file setup_helpers.py.

◆ intree_extensions()

def pybind11.setup_helpers.intree_extensions (   paths)

Definition at line 294 of file setup_helpers.py.

◆ naive_recompile()

def pybind11.setup_helpers.naive_recompile (   obj)

Definition at line 335 of file setup_helpers.py.

◆ no_recompile()

def pybind11.setup_helpers.no_recompile (   obg)

Definition at line 344 of file setup_helpers.py.

◆ tmp_chdir()

def pybind11.setup_helpers.tmp_chdir (   Iterator,
  str 
)

Definition at line 216 of file setup_helpers.py.

Variable Documentation

◆ _cxx_level

pybind11.setup_helpers._cxx_level
private

Definition at line 122 of file setup_helpers.py.

◆ bound

pybind11.setup_helpers.bound

Definition at line 352 of file setup_helpers.py.

◆ CCompilerMethod

pybind11.setup_helpers.CCompilerMethod

Definition at line 354 of file setup_helpers.py.

◆ cpp_flag_cache

pybind11.setup_helpers.cpp_flag_cache

Definition at line 252 of file setup_helpers.py.

◆ cxx_std

def pybind11.setup_helpers.cxx_std

Definition at line 145 of file setup_helpers.py.

◆ MACOS

pybind11.setup_helpers.MACOS

Definition at line 76 of file setup_helpers.py.

◆ S

pybind11.setup_helpers.S

Definition at line 352 of file setup_helpers.py.

◆ STD_TMPL

pybind11.setup_helpers.STD_TMPL

Definition at line 77 of file setup_helpers.py.

◆ tmp_chdir_lock

pybind11.setup_helpers.tmp_chdir_lock

Definition at line 212 of file setup_helpers.py.

◆ WIN

pybind11.setup_helpers.WIN

Definition at line 75 of file setup_helpers.py.



gtsam
Author(s):
autogenerated on Tue Jul 4 2023 02:47:27