Add msgpack.version as version tuple.

This commit is contained in:
INADA Naoki 2010-09-02 09:54:38 +09:00
parent 8d0d2bd3fc
commit 8fa64e3ab2
4 changed files with 14 additions and 3 deletions

1
python/.gitignore vendored
View File

@ -3,3 +3,4 @@ build/*
dist/* dist/*
*.pyc *.pyc
*.pyo *.pyo
msgpack/__version__.py

View File

@ -1,7 +1,12 @@
.PHONY: test all python3
all: all:
python setup.py build_ext -i -f python setup.py build_ext -i -f
python setup.py build sdist python setup.py build sdist
.PHONY: test python3:
python3 setup.py build_ext -i -f
python3 setup.py build sdist
test: test:
nosetests test nosetests test

View File

@ -1,4 +1,5 @@
# coding: utf-8 # coding: utf-8
from msgpack.__version__ import *
from msgpack._msgpack import * from msgpack._msgpack import *
# alias for compatibility to simplejson/marshal/pickle. # alias for compatibility to simplejson/marshal/pickle.

View File

@ -1,5 +1,6 @@
#!/usr/bin/env python #!/usr/bin/env python
# coding: utf-8 # coding: utf-8
version = (0, 1, 5, 'dev')
import os import os
from glob import glob from glob import glob
@ -14,7 +15,10 @@ except ImportError:
from distutils.command.build_ext import build_ext from distutils.command.build_ext import build_ext
have_cython = False 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. # take care of extension modules.
if have_cython: if have_cython:
@ -53,7 +57,7 @@ What's MessagePack? (from http://msgpack.sourceforge.net/)
setup(name='msgpack-python', setup(name='msgpack-python',
author='INADA Naoki', author='INADA Naoki',
author_email='songofacandy@gmail.com', author_email='songofacandy@gmail.com',
version=version, version=''.join(str(x) for x in version),
cmdclass={'build_ext': build_ext, 'sdist': Sdist}, cmdclass={'build_ext': build_ext, 'sdist': Sdist},
ext_modules=[msgpack_mod], ext_modules=[msgpack_mod],
packages=['msgpack'], packages=['msgpack'],