diff --git a/distutils_build.bat b/distutils_build.bat index a59c4d19fbd026d82587004adf54de47ff027cd4..64ed95abffded9714da5b0976b928e3404143d3c 100644 --- a/distutils_build.bat +++ b/distutils_build.bat @@ -1,3 +1,7 @@ -python.exe setup.py build --force +python.exe setup.py clean +python.exe setup.py build python.exe setup.py install --prefix dist -python.exe setup.py sdist --formats=zip \ No newline at end of file +python.exe setup.py sdist --formats=zip +# later: +#python.exe setup.py bdist_wininst +python.exe setup.py check diff --git a/src/vasingleton.cpp b/src/vasingleton.cpp index 65793bbfd09c4e7f1b9fdba603679f39dc9ef3c7..6167e039e228f8d6a85ec3d55084579a4d11ce12 100644 --- a/src/vasingleton.cpp +++ b/src/vasingleton.cpp @@ -1,6 +1,8 @@ #include #include "vasingletondoc.hpp" + +// All Python 2 VA methods. Also pulls in g_pVAError (Python error trace instance) #include "vasingletonmethods.hpp" // VA methods that will appear in Python if they are added to the following table @@ -175,5 +177,10 @@ static struct PyModuleDef vamoduledef = PyMODINIT_FUNC PyInit_va( void ) { - return PyModule_Create( &vamoduledef ); + PyObject* pModule = PyModule_Create( &vamoduledef ); + g_pVAError = PyErr_NewException( "va.error", NULL, NULL ); + Py_INCREF( g_pVAError ); + + //PyAdd + return pModule; }