Skip to content

Commit

Permalink
Implemented get_macros
Browse files Browse the repository at this point in the history
  • Loading branch information
siebenkopf committed May 25, 2016
1 parent 795127b commit 8b69328
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions bob/core/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,28 @@ def get_config():
return bob.extension.get_config(__name__, version.externals, version.api)


def get_macros():
"""get_macros() -> macros
Returns a list of preprocessor macros, such as ``[(HAVE_BOOST, 1), (BOOST_VERSION,xx)]``.
This function is automatically used by :py:func:`bob.extension.get_bob_libraries` to retrieve the prerpocessor definitions that are required to use the C bindings of this library in dependent classes.
You shouldn't normally need to call this function by hand.
**Returns:**
``macros`` : [str]
The list of preprocessor macros required to use the C bindings of this class.
"""
# try to use pkg_config first
from bob.extension.boost import boost
macros = []
try:
b = boost()
macros = b.macros()
except:
pass
return macros


# gets sphinx autodoc done right - don't remove it
__all__ = [_ for _ in dir() if not _.startswith('_')]

0 comments on commit 8b69328

Please sign in to comment.