Skip to content

Commit

Permalink
Merge pull request #28 from ifduyue/export_version
Browse files Browse the repository at this point in the history
Export VERSION and LZ4_VERSION. Close #19
  • Loading branch information
steeve committed Jul 28, 2014
2 parents 34aa012 + b81fd7d commit 9c564fb
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
4 changes: 3 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,11 @@
from setuptools import setup, find_packages, Extension

VERSION = (0, 7, 0)
VERSION_STR = ".".join([str(x) for x in VERSION])

setup(
name='lz4',
version=".".join([str(x) for x in VERSION]),
version=VERSION_STR,
description="LZ4 Bindings for Python",
long_description=open('README.rst', 'r').read(),
author='Steeve Morin',
Expand All @@ -26,6 +27,7 @@
"-Wall",
"-W",
"-Wundef",
"-DVERSION=\"%s\"" % VERSION_STR,
"-DLZ4_VERSION=\"r119\"",
])
],
Expand Down
3 changes: 3 additions & 0 deletions src/python-lz4.c
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,9 @@ void initlz4(void)
INITERROR;
}

PyModule_AddStringConstant(module, "VERSION", VERSION);
PyModule_AddStringConstant(module, "LZ4_VERSION", LZ4_VERSION);

#if PY_MAJOR_VERSION >= 3
return module;
#endif
Expand Down

0 comments on commit 9c564fb

Please sign in to comment.