cppyabm  1.0.17
An agent-based library to integrate C++ and Python
Public Member Functions | List of all members
pybind11.setup_helpers.Pybind11Extension Class Reference
Inheritance diagram for pybind11.setup_helpers.Pybind11Extension:

Public Member Functions

def __init__ (self, *args, **kwargs)
 
def cxx_std (self)
 
def cxx_std (self, 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 75 of file setup_helpers.py.

Constructor & Destructor Documentation

◆ __init__()

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

Definition at line 111 of file setup_helpers.py.

Member Function Documentation

◆ cxx_std() [1/2]

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 154 of file setup_helpers.py.

◆ cxx_std() [2/2]

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

Definition at line 165 of file setup_helpers.py.


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