Hello,
I ran into issues when importing two extensions build using indexing_suite_v2.
My code ran fine, but after I rearranged it, it stopped with:
RuntimeError: get
The following code reproduces the this error.
ProjA:
{{{
#include <vector>
std::vector<double> create_vector_double_A()
{
std::vector<double> ret;
for(size_t i = 0; i < 10; i++)
ret.push_back(i);
return ret;
}
}}}
ProjB:
{{{
#include <vector>
std::vector<double> create_vector_double_B()
{
std::vector<double> ret;
for(size_t i = 0; i < 10; i++)
ret.push_back(i);
return ret;
}
}}}
Each project are build with:
mb = module_builder.module_builder_t( ... , indexing_suite_version=2)
bug.py
{{{
import sys
import os
sys.path.append( os.getcwd() + '/ProjA/build/src')
sys.path.append( os.getcwd() + '/ProjB/build/src')
import ProjA
import ProjB
dv = ProjA.create_vector_double_A()
for d in dv:
print d
}}}
Running it via
$ python bug.py
results in
{{{
bug.py:8: RuntimeWarning: to-Python converter for std::vector<double,
std::allocator<double> > already registered; second conversion method ignored.
import ProjB
0.0
1.0
2.0
3.0
4.0
5.0
6.0
7.0
8.0
9.0
Traceback (most recent call last):
File "bug.py", line 11, in <module>
for d in dv:
RuntimeError: get
}}}
Changing indexing_site_version to 1 makes it work fine. Is this a known
limitation or a bug?
Best,
-- Maik
PS: full code attached. Given cmake, boost, gccxml, pygccxml and pyplusplus
are installed you can run:
$ make -C ProjA
$ make -C ProjB
$ python bug.py
|