pflib v3.9.0-rc3-11-g2537d8f
Pretty Fine HGCROC Interaction Library
Loading...
Searching...
No Matches
bindings.h
1#pragma once
2
3// the boost::bind library was updated and these updates
4// had not made it into Boost.Python for the version we are using
5#define BOOST_BIND_GLOBAL_PLACEHOLDERS
6// the boost/iterator header was deprecated in favor of STL iterator
7#define BOOST_ALLOW_DEPRECATED_HEADERS
8
9#include <boost/python.hpp>
10#include <boost/python/dict.hpp>
11#include <boost/python/extract.hpp>
12#include <boost/python/numpy.hpp>
13#include <boost/python/stl_iterator.hpp>
14#include <boost/python/str.hpp>
15#include <boost/python/suite/indexing/vector_indexing_suite.hpp>
16#include <boost/python/tuple.hpp>
17
18#undef BOOST_ALLOW_DEPRECATED_HEADERS
19
21namespace bp = boost::python;
22
31#define BOOST_PYTHON_SUBMODULE(name) \
32 bp::object submodule( \
33 bp::handle<>(bp::borrowed(PyImport_AddModule("pypflib." #name)))); \
34 bp::scope().attr(#name) = submodule; \
35 bp::scope io_scope = submodule;