Added __version__ attribute to the Cython module
This commit is contained in:
parent
4991ada305
commit
86db08ac88
4 changed files with 12 additions and 0 deletions
|
|
@ -1,4 +1,5 @@
|
|||
from ._cantera import *
|
||||
from ._cantera import __version__
|
||||
from .liquidvapor import *
|
||||
|
||||
import os as _os
|
||||
|
|
|
|||
|
|
@ -424,6 +424,8 @@ cdef extern from "cantera/oneD/Sim1D.h":
|
|||
|
||||
|
||||
cdef extern from "wrappers.h":
|
||||
# config definitions
|
||||
cdef string get_cantera_version()
|
||||
# ThermoPhase composition
|
||||
cdef void thermo_getMassFractions(CxxThermoPhase*, double*) except +
|
||||
cdef void thermo_setMassFractions(CxxThermoPhase*, double*) except +
|
||||
|
|
|
|||
|
|
@ -18,3 +18,5 @@ cdef pystr(string x):
|
|||
|
||||
def addDirectory(directory):
|
||||
CxxAddDirectory(stringify(directory))
|
||||
|
||||
__version__ = pystr(get_cantera_version())
|
||||
|
|
|
|||
|
|
@ -1,6 +1,13 @@
|
|||
#include "cantera/thermo/ThermoPhase.h"
|
||||
#include "cantera/transport/TransportBase.h"
|
||||
|
||||
|
||||
// Wrappers for preprocessor defines
|
||||
std::string get_cantera_version()
|
||||
{
|
||||
return std::string(CANTERA_VERSION);
|
||||
}
|
||||
|
||||
// Function which populates a 1D array
|
||||
#define ARRAY_FUNC(PREFIX, CLASS_NAME, FUNC_NAME) \
|
||||
void PREFIX ## _ ## FUNC_NAME(Cantera::CLASS_NAME* object, double* data) \
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue