Public Member Functions | Public Attributes | 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

None __init__ (self, *Any args, **Any kwargs)
 
int cxx_std (self)
 
None cxx_std (self, int level)
 

Public Attributes

 cxx_std
 

Private Member Functions

None _add_cflags (self, List[str] flags)
 
None _add_ldflags (self, List[str] 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 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 87 of file setup_helpers.py.

Constructor & Destructor Documentation

◆ __init__()

None pybind11.setup_helpers.Pybind11Extension.__init__ (   self,
*Any  args,
**Any  kwargs 
)

Definition at line 120 of file setup_helpers.py.

Member Function Documentation

◆ _add_cflags()

None pybind11.setup_helpers.Pybind11Extension._add_cflags (   self,
List[str flags 
)
private

Definition at line 114 of file setup_helpers.py.

◆ _add_ldflags()

None pybind11.setup_helpers.Pybind11Extension._add_ldflags (   self,
List[str flags 
)
private

Definition at line 117 of file setup_helpers.py.

◆ cxx_std() [1/2]

int 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 macos-min 10.9 or 10.14 flag if MACOSX_DEPLOYMENT_TARGET is
unset.

Definition at line 159 of file setup_helpers.py.

◆ cxx_std() [2/2]

None pybind11.setup_helpers.Pybind11Extension.cxx_std (   self,
int  level 
)

Definition at line 170 of file setup_helpers.py.

Member Data Documentation

◆ _cxx_level

pybind11.setup_helpers.Pybind11Extension._cxx_level
private

Definition at line 121 of file setup_helpers.py.

◆ cxx_std

pybind11.setup_helpers.Pybind11Extension.cxx_std

Definition at line 144 of file setup_helpers.py.


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


gtsam
Author(s):
autogenerated on Tue Jun 25 2024 03:14:34