From 692ddc71b17196487dcad982836e074cab9a0f25 Mon Sep 17 00:00:00 2001 From: Martin Braun Date: Mon, 4 Feb 2019 16:00:16 +0100 Subject: python: Replace Boost.Python with PyBind11 This does not change the Python API itself, but it is still a significant change. Most importantly, it removes the dependency on Boost.Python. --- host/lib/usrp/fe_connection_python.hpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'host/lib/usrp/fe_connection_python.hpp') diff --git a/host/lib/usrp/fe_connection_python.hpp b/host/lib/usrp/fe_connection_python.hpp index 29bba1746..d1304909e 100644 --- a/host/lib/usrp/fe_connection_python.hpp +++ b/host/lib/usrp/fe_connection_python.hpp @@ -1,5 +1,6 @@ // // Copyright 2017-2018 Ettus Research, a National Instruments Company +// Copyright 2019 Ettus Research, a National Instruments Brand // // SPDX-License-Identifier: GPL-3.0-or-later // @@ -9,22 +10,22 @@ #include -void export_fe_connection() +void export_fe_connection(py::module& m) { using fe_connection_t = uhd::usrp::fe_connection_t; using sampling_t = fe_connection_t::sampling_t; - bp::enum_("sampling") + py::enum_(m, "sampling") .value("QUADRATURE", sampling_t::QUADRATURE) .value("HETERODYNE", sampling_t::HETERODYNE) .value("REAL" , sampling_t::REAL ) ; - bp::class_ - ("fe_connection", bp::init()) + py::class_(m, "fe_connection") // Constructors - .def(bp::init()) + .def(py::init()) + .def(py::init()) // Methods .def("get_sampling_mode", &fe_connection_t::get_sampling_mode) -- cgit v1.2.3