diff options
| author | INADA Naoki <songofacandy@gmail.com> | 2010-09-02 09:54:38 +0900 |
|---|---|---|
| committer | INADA Naoki <songofacandy@gmail.com> | 2010-09-02 09:54:38 +0900 |
| commit | 8fa64e3ab2350faadfe40e0828bafafadac0990a (patch) | |
| tree | bb54c807419af9cef173c8af3b3ec323d2376ca8 | |
| parent | 8d0d2bd3fca404906aef8982a99a81b2acdc50a0 (diff) | |
| download | msgpack-python-8fa64e3ab2350faadfe40e0828bafafadac0990a.tar.gz | |
Add msgpack.version as version tuple.
| -rw-r--r-- | python/.gitignore | 1 | ||||
| -rw-r--r-- | python/Makefile | 7 | ||||
| -rw-r--r-- | python/msgpack/__init__.py | 1 | ||||
| -rwxr-xr-x | python/setup.py | 8 |
4 files changed, 14 insertions, 3 deletions
diff --git a/python/.gitignore b/python/.gitignore index 430c633..8531de3 100644 --- a/python/.gitignore +++ b/python/.gitignore @@ -3,3 +3,4 @@ build/* dist/* *.pyc *.pyo +msgpack/__version__.py diff --git a/python/Makefile b/python/Makefile index e06794d..245c09c 100644 --- a/python/Makefile +++ b/python/Makefile @@ -1,7 +1,12 @@ +.PHONY: test all python3 + all: python setup.py build_ext -i -f python setup.py build sdist -.PHONY: test +python3: + python3 setup.py build_ext -i -f + python3 setup.py build sdist + test: nosetests test diff --git a/python/msgpack/__init__.py b/python/msgpack/__init__.py index 86786a2..cdf045f 100644 --- a/python/msgpack/__init__.py +++ b/python/msgpack/__init__.py @@ -1,4 +1,5 @@ # coding: utf-8 +from msgpack.__version__ import * from msgpack._msgpack import * # alias for compatibility to simplejson/marshal/pickle. diff --git a/python/setup.py b/python/setup.py index 64e71ed..c79c148 100755 --- a/python/setup.py +++ b/python/setup.py @@ -1,5 +1,6 @@ #!/usr/bin/env python # coding: utf-8 +version = (0, 1, 5, 'dev') import os from glob import glob @@ -14,7 +15,10 @@ except ImportError: from distutils.command.build_ext import build_ext have_cython = False -version = '0.1.4' +# make msgpack/__verison__.py +f = open('msgpack/__version__.py', 'w') +f.write("version = %r\n" % (version,)) +f.close() # take care of extension modules. if have_cython: @@ -53,7 +57,7 @@ What's MessagePack? (from http://msgpack.sourceforge.net/) setup(name='msgpack-python', author='INADA Naoki', author_email='songofacandy@gmail.com', - version=version, + version=''.join(str(x) for x in version), cmdclass={'build_ext': build_ext, 'sdist': Sdist}, ext_modules=[msgpack_mod], packages=['msgpack'], |
