Hi
Is the neuron python module created by wrapping C/C++ code automatically (e.g. like boost-python), or is the code wrapped by hand?
How much effort would it be to re-write the configure system to use CMake or another, more portable build configure system?
Thanks for any hints/ideas...
Regards, Bryn
How is neuron python module created
Moderator: hines
Re: How is neuron python module created
It is not wrapped. I don't think boost would work since dynamically and user created classes, variables, functions, etc need to be
available to both python and hoc. The native interface is in nrn/src/nrnpython.
There are thoughts about replacing the native interface with a generic API and then using ctypes with a pure python replacement of
the nrnpython c++ code.
I'm perfectly happy with autotools but it certainly is complex. I've never used cmake.
There is a lot of effort that has been invested in the Makefile.am files. I wonder
if am2cmake allows an easy switch?
available to both python and hoc. The native interface is in nrn/src/nrnpython.
There are thoughts about replacing the native interface with a generic API and then using ctypes with a pure python replacement of
the nrnpython c++ code.
I'm perfectly happy with autotools but it certainly is complex. I've never used cmake.
There is a lot of effort that has been invested in the Makefile.am files. I wonder
if am2cmake allows an easy switch?
Re: How is neuron python module created
Because of my problems to compile on Windows, which obviously might related to the compiler and not the configure system, I would have liked to try out some things.
However, autotools is unreadable for my eyes and therefore uneditable.
I am usually quite quick at putting together a cmake configuration for a library, but it depends if only the compiler/linker is called or if autotools is starting any complicated scripts to wrap the code, or similar. Note that lots of scientific code is using cmake.
The am2cmake script works for a basic preparation, but things like configured headers and platform dependent stuff needs to done manually.
If there is real interest and if I have time I might have a look into writing a prototype.
BTW. I see that some "external" code in neuron (at least sundials) is shipped with cmake...
However, autotools is unreadable for my eyes and therefore uneditable.
I am usually quite quick at putting together a cmake configuration for a library, but it depends if only the compiler/linker is called or if autotools is starting any complicated scripts to wrap the code, or similar. Note that lots of scientific code is using cmake.
The am2cmake script works for a basic preparation, but things like configured headers and platform dependent stuff needs to done manually.
If there is real interest and if I have time I might have a look into writing a prototype.
BTW. I see that some "external" code in neuron (at least sundials) is shipped with cmake...