diff --git a/python/src/pyapproxmc.cpp b/python/src/pyapproxmc.cpp index de2a7dd..80a727d 100644 --- a/python/src/pyapproxmc.cpp +++ b/python/src/pyapproxmc.cpp @@ -450,6 +450,8 @@ PyMODINIT_FUNC PyInit_pyapproxmc(void) // Add the version string // they're using. +#if defined(_MSC_VER) +#else if (PyModule_AddStringConstant(m, "__version__", APPMC_FULL_VERSION) == -1) { Py_DECREF(m); return NULL; @@ -458,6 +460,7 @@ PyMODINIT_FUNC PyInit_pyapproxmc(void) Py_DECREF(m); return NULL; } +#endif // Add the Counter type Py_INCREF(&pyapproxmc_CounterType); diff --git a/setup.py b/setup.py index a04bc92..8f1726e 100644 --- a/setup.py +++ b/setup.py @@ -48,7 +48,7 @@ def _parse_toml(pyproject_path): def gen_modules(version): if platform == "win32" or platform == "cygwin": - extra_compile_args_val = ['/std:c++17', "/DCMS_LOCAL_BUILD=1", "/DAPPMC_FULL_VERSION=\"\\\""+version+"\"\\\""] + extra_compile_args_val = ['/std:c++17', "/DCMS_LOCAL_BUILD=1", "/DAPPMC_FULL_VERSION=\""+version+"\""] define_macros_val = [("TRACE", "")] else: