From a9b97194f11a07560750f6d33586a8bf3fcc991b Mon Sep 17 00:00:00 2001 From: "Dipl.-Ing. Jonas Stienen" Date: Tue, 22 Aug 2017 09:33:11 +0200 Subject: [PATCH] Trying to parse arguments --- distutils_build.bat | 8 ++++++-- src/vasingleton.cpp | 9 ++++++++- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/distutils_build.bat b/distutils_build.bat index a59c4d1..64ed95a 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 65793bb..6167e03 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; } -- GitLab