Skip to content

Commit

Permalink
* Updating python port build to actually reference correct informatio…
Browse files Browse the repository at this point in the history
…n on Ubuntu Linux by default.

  * Compilation is broken however as many things have changed and Boost.Python requires very explicit bindings
  • Loading branch information
jredmondson committed Jun 29, 2018
1 parent 99d7166 commit 406d555
Show file tree
Hide file tree
Showing 2 changed files with 55 additions and 23 deletions.
9 changes: 5 additions & 4 deletions port/python/src/MadaraModule.cpp
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
#include "madara/knowledge/KnowledgeBase.h"
#include "madara/filters/GenericFilters.h"
#include "FunctionDefaults.h"

#include <boost/python.hpp>
#include <boost/python/detail/wrap_python.hpp>
#include <boost/python/suite/indexing/vector_indexing_suite.hpp>
#include <boost/python/suite/indexing/map_indexing_suite.hpp>

#include "madara/knowledge/KnowledgeBase.h"
#include "madara/filters/GenericFilters.h"
#include "FunctionDefaults.h"

/**
* @file MadaraModule.cpp
* @author James Edmondson <jedmondson@gmail.com>
Expand Down
69 changes: 50 additions & 19 deletions port/python/using_python.mpb
Original file line number Diff line number Diff line change
@@ -1,31 +1,62 @@
feature (python) {
expand(BOOST_ROOT_LIB) {
$BOOST_ROOT_LIB
$(BOOST_ROOT)/stage/lib
}

// b2 builds libboost_system with the following example formats:
// libboost_python-vc141-mt-gd-x64-1_67.lib (Debug)
// libboost_python-vc141-mt-x64-1_67.lib (Release)
// we want to allow Windows devs to customize their linked boost libs

specific (prop:static, prop:gnuace) {
macros += BOOST_PYTHON_STATIC_LIB
expand(BOOST_TOOLSET) {
$BOOST_TOOLSET
vc141
}

expand(BOOST_ARCH) {
$BOOST_ARCH
x64
}

expand(BOOST_VERSION) {
$BOOST_VERSION
1_67
}

specific (prop:static, prop:vc12) {
lit_libs += libboost_python3-vc120-mt-$(BOOST_VERSION)
macros += BOOST_PYTHON_STATIC_LIB
expand(PYTHON_ROOT) {
$PYTHON_ROOT
/usr
}

specific (!prop:static,gnuace) {
lit_libs += boost_python3-vc120-mt-$(BOOST_VERSION)
expand(PYTHON_VERSION) {
$PYTHON_VERSION
2.7
}

specific (!prop:microsoft) {
includes += $(PYTHON_ROOT)/python$(PYTHON_VERSION)
includes += /usr/include/boost
libs += boost_python-mt-$(BOOST_VERSION)
libs += python$(PYTHON_VERSION)
} else {
includes += $(BOOST_ROOT)
includes += $(PYTHON_ROOT)/include

libpaths += $(BOOST_ROOT)/stage/lib
libpaths += $(PYTHON_ROOT)/libs
DisableSpecificWarnings += 4267
expand(BOOST_PYTHON_DEBUG) {
$BOOST_PYTHON_DEBUG
$(BOOST_STATIC_LIB_PREFIX)boost_python-$(BOOST_TOOLSET)-mt-gd-$(BOOST_ARCH)-$(BOOST_VERSION)
}

expand(BOOST_PYTHON_RELEASE) {
$BOOST_PYTHON_RELEASE
$(BOOST_STATIC_LIB_PREFIX)boost_python-$(BOOST_TOOLSET)-mt-$(BOOST_ARCH)-$(BOOST_VERSION)
}

specific(prop:windows) {

macros += _WINSOCK_DEPRECATED_NO_WARNINGS BOOST_ALL_NO_LIB
DisableSpecificWarnings += 4267

macros += _MADARA_PYTHON_CALLBACKS_
Debug::lit_libs += $(BOOST_PYTHON_DEBUG)
Release::lit_libs += $(BOOST_PYTHON_RELEASE)
// end if windows build
} else {
includes += $(PYTHON_ROOT)/include/python$(PYTHON_VERSION)
libpaths += $(PYTHON_ROOT)/lib/python$(PYTHON_VERSION)
lit_libs += $(BOOST_STATIC_LIB_PREFIX)boost_python$(BOOST_CFG)
}
}

0 comments on commit 406d555

Please sign in to comment.