Skip to content
Snippets Groups Projects
Commit e3b7f1fa authored by Manuel Günther's avatar Manuel Günther
Browse files

Getting module imports correct

parent 3d1c75a7
Branches
Tags
No related merge requests found
...@@ -10,6 +10,7 @@ ...@@ -10,6 +10,7 @@
#endif #endif
#include <bob.blitz/capi.h> #include <bob.blitz/capi.h>
#include <bob.blitz/cleanup.h> #include <bob.blitz/cleanup.h>
#include <bob.core/api.h>
#include <bob.extension/documentation.h> #include <bob.extension/documentation.h>
...@@ -525,11 +526,8 @@ static PyObject* create_module (void) { ...@@ -525,11 +526,8 @@ static PyObject* create_module (void) {
(PyObject *)&PyBobMathLpInteriorPointLongstep_Type) < 0) return 0; (PyObject *)&PyBobMathLpInteriorPointLongstep_Type) < 0) return 0;
/* imports dependencies */ /* imports dependencies */
if (import_bob_blitz() < 0) { if (import_bob_blitz() < 0) return 0;
PyErr_Print(); if (import_bob_core_logging() < 0) return 0;
PyErr_Format(PyExc_ImportError, "cannot import `%s'", BOB_EXT_MODULE_NAME);
return 0;
}
return Py_BuildValue("O", m); return Py_BuildValue("O", m);
} }
......
...@@ -8,11 +8,8 @@ ...@@ -8,11 +8,8 @@
#include <bob.math/config.h> #include <bob.math/config.h>
#define BOB_IMPORT_VERSION #define BOB_IMPORT_VERSION
#ifdef NO_IMPORT_ARRAY #include <bob.blitz/config.h>
#undef NO_IMPORT_ARRAY #include <bob.core/config.h>
#endif
#include <bob.blitz/capi.h>
#include <bob.core/api.h>
static PyObject* build_version_dictionary() { static PyObject* build_version_dictionary() {
...@@ -20,7 +17,7 @@ static PyObject* build_version_dictionary() { ...@@ -20,7 +17,7 @@ static PyObject* build_version_dictionary() {
if (!retval) return 0; if (!retval) return 0;
auto retval_ = make_safe(retval); auto retval_ = make_safe(retval);
if (!dict_set(retval, "Blitz++", BZ_VERSION)) return 0; if (!dict_steal(retval, "Blitz++", blitz_version())) return 0;
if (!dict_steal(retval, "Boost", boost_version())) return 0; if (!dict_steal(retval, "Boost", boost_version())) return 0;
if (!dict_steal(retval, "Compiler", compiler_version())) return 0; if (!dict_steal(retval, "Compiler", compiler_version())) return 0;
if (!dict_steal(retval, "Python", python_version())) return 0; if (!dict_steal(retval, "Python", python_version())) return 0;
...@@ -68,9 +65,6 @@ static PyObject* create_module (void) { ...@@ -68,9 +65,6 @@ static PyObject* create_module (void) {
if (!externals) return 0; if (!externals) return 0;
if (PyModule_AddObject(m, "externals", externals) < 0) return 0; if (PyModule_AddObject(m, "externals", externals) < 0) return 0;
if (import_bob_blitz() < 0) return 0;
if (import_bob_core_logging() < 0) return 0;
return Py_BuildValue("O", m); return Py_BuildValue("O", m);
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment