darkdragn / lz4tools

LZ4Frame Bindings and tools for Python
90 stars 30 forks source link

Anaconda build failure due to VERSION_STR #2

Open lJoublanc opened 9 years ago

lJoublanc commented 9 years ago

When building 1.2 release with Anaconda on windows, I get the following errors

src/python-lz4f.c: In function 'initlz4f':
src/python-lz4f.c:406:51: error: too many decimal points in number
src/python-lz4f.c:407:55: error: too many decimal points in number
src/python-lz4f.c:408:55: error: 'r123' undeclared (first use in this function)
src/python-lz4f.c:408:55: note: each undeclared identifier is reported only once

Replacing the versions with their literals in the abovementioned file, like so

    PyModule_AddStringConstant(module, "VERSION", "1.2.1.2");
    PyModule_AddStringConstant(module, "__version__", "1.2.1.2");
    PyModule_AddStringConstant(module, "LZ4_VERSION", "r123");

Resolves the problem. It looks like the string literals VERSION_STR in setup.py aren't being treated as strings, but numbers instead.