Public Member Functions | Private Member Functions | Private Attributes | List of all members
pybind11.setup_helpers.Pybind11Extension Class Reference
Inheritance diagram for pybind11.setup_helpers.Pybind11Extension:
Inheritance graph
[legend]

Public Member Functions

def __init__ (self, args, kwargs)
 
def cxx_std (self)
 
def cxx_std (self, level)
 

Private Member Functions

def _add_cflags (self, flags)
 
def _add_lflags (self, flags)
 

Private Attributes

 _cxx_level
 

Detailed Description

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 afterwords 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``.

Warning: do not use property-based access to the instance on Python 2 -
this is an ugly old-style class due to Distutils.

Definition at line 67 of file setup_helpers.py.

Constructor & Destructor Documentation

def pybind11.setup_helpers.Pybind11Extension.__init__ (   self,
  args,
  kwargs 
)

Definition at line 104 of file setup_helpers.py.

Member Function Documentation

def pybind11.setup_helpers.Pybind11Extension._add_cflags (   self,
  flags 
)
private

Definition at line 94 of file setup_helpers.py.

def pybind11.setup_helpers.Pybind11Extension._add_lflags (   self,
  flags 
)
private

Definition at line 99 of file setup_helpers.py.

def pybind11.setup_helpers.Pybind11Extension.cxx_std (   self)
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 register warning/error fix for Python 2 or macos-min 10.9
or 10.14.

Definition at line 143 of file setup_helpers.py.

def pybind11.setup_helpers.Pybind11Extension.cxx_std (   self,
  level 
)

Definition at line 154 of file setup_helpers.py.

Member Data Documentation

pybind11.setup_helpers.Pybind11Extension._cxx_level
private

Definition at line 106 of file setup_helpers.py.


The documentation for this class was generated from the following file:


gtsam
Author(s):
autogenerated on Sat May 8 2021 02:59:12