File tree Expand file tree Collapse file tree 2 files changed +8
-3
lines changed Expand file tree Collapse file tree 2 files changed +8
-3
lines changed Original file line number Diff line number Diff line change 30
30
PY_MARIADB_MAJOR_VERSION = 1
31
31
PY_MARIADB_MINOR_VERSION = 0
32
32
PY_MARIADB_PATCH_VERSION = 0
33
- PY_MARIADB_PRE_RELEASE_SEGMENT = ""
33
+ # PY_MARIADB_PRE_RELEASE_SEGMENT=""
34
34
35
35
PY_MARIADB_VERSION = "%s.%s.%s" % (PY_MARIADB_MAJOR_VERSION , PY_MARIADB_MINOR_VERSION , PY_MARIADB_PATCH_VERSION )
36
36
40
40
define_macros .append (("PY_MARIADB_MAJOR_VERSION" , PY_MARIADB_MAJOR_VERSION ))
41
41
define_macros .append (("PY_MARIADB_MINOR_VERSION" , PY_MARIADB_MINOR_VERSION ))
42
42
define_macros .append (("PY_MARIADB_PATCH_VERSION" , PY_MARIADB_PATCH_VERSION ))
43
- define_macros .append (("PY_MARIADB_PRE_RELEASE_SEGMENT" , PY_MARIADB_PRE_RELEASE_SEGMENT ))
43
+ # define_macros.append(("PY_MARIADB_PRE_RELEASE_SEGMENT", PY_MARIADB_PRE_RELEASE_SEGMENT))
44
44
45
45
setup (name = 'mariadb' ,
46
46
version = PY_MARIADB_VERSION ,
Original file line number Diff line number Diff line change @@ -142,6 +142,11 @@ PyMODINIT_FUNC PyInit_mariadb(void)
142
142
PyObject * module = PyModule_Create (& mariadb_module );
143
143
PyObject * version_info ;
144
144
struct st_constants * intvals = int_constants ;
145
+ const char * pre_release = "" ;
146
+
147
+ #ifdef PY_MARIADB_PRE_RELEASE_SEGMENT
148
+ pre_release = PY_MARIADB_PRE_RELEASE_SEGMENT ;
149
+ #endif
145
150
146
151
Py_TYPE (& MrdbConnection_Type ) = & PyType_Type ;
147
152
if (PyType_Ready (& MrdbConnection_Type ) == -1 )
@@ -207,7 +212,7 @@ PyMODINIT_FUNC PyInit_mariadb(void)
207
212
if (PyTuple_SetItem (version_info , 0 , PyLong_FromLong (PY_MARIADB_MAJOR_VERSION )) ||
208
213
PyTuple_SetItem (version_info , 1 , PyLong_FromLong (PY_MARIADB_MINOR_VERSION )) ||
209
214
PyTuple_SetItem (version_info , 2 , PyLong_FromLong (PY_MARIADB_PATCH_VERSION )) ||
210
- PyTuple_SetItem (version_info , 3 , PyUnicode_FromString (TOSTRING ( PY_MARIADB_PRE_RELEASE_SEGMENT ) )) ||
215
+ PyTuple_SetItem (version_info , 3 , PyUnicode_FromString (pre_release )) ||
211
216
PyTuple_SetItem (version_info , 4 , PyLong_FromLong (0L )))
212
217
{
213
218
goto error ;
You can’t perform that action at this time.
0 commit comments