Description: Better strinigification of version macro setup.py defines a preprocessor macro called PYTHON_SVIPC_VERSION. The way it includes quotes make some recent compilers choke. This patch defines the string without quotes and let the C preprocessor do the strinigification. Author: Thibaut Paumard Origin: vendor Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=917672 Forwarded: no Last-Update: 2019-01-09 --- This patch header follows DEP-3: http://dep.debian.net/deps/dep3/ --- a/setup.py +++ b/setup.py @@ -28,7 +28,7 @@ ] define_macros=[ - ('PYTHON_SVIPC_VERSION', '\\\"%s\\\"' % version), + ('PYTHON_SVIPC_VERSION', version), ('SVIPC_NOSEGFUNC', None), ] --- a/python/svipc_module.c +++ b/python/svipc_module.c @@ -31,6 +31,10 @@ #include "svipc.h" +#define STRINGIFY(a) _STRINGIFY(a) +#define _STRINGIFY(a) #a + + PyObject *python_svipc_module; PyObject *python_svipc_error; @@ -866,7 +870,7 @@ /* Add symbolic constants to the module */ PyModule_AddStringConstant(python_svipc_module, "version", - PYTHON_SVIPC_VERSION); + STRINGIFY(PYTHON_SVIPC_VERSION)); /* define module generic error */ python_svipc_error = PyErr_NewException("svipc.error", NULL, NULL);