Skip to content

Commit

Permalink
Add msgpack.version as version tuple.
Browse files Browse the repository at this point in the history
  • Loading branch information
methane committed Sep 2, 2010
1 parent 039542e commit 50ffd2c
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 3 deletions.
1 change: 1 addition & 0 deletions .gitignore
Expand Up @@ -3,3 +3,4 @@ build/*
dist/*
*.pyc
*.pyo
msgpack/__version__.py
7 changes: 6 additions & 1 deletion 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
1 change: 1 addition & 0 deletions 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.
Expand Down
8 changes: 6 additions & 2 deletions setup.py
@@ -1,5 +1,6 @@
#!/usr/bin/env python
# coding: utf-8
version = (0, 1, 5, 'dev')

import os
from glob import glob
Expand All @@ -14,7 +15,10 @@
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:
Expand Down Expand Up @@ -53,7 +57,7 @@ def __init__(self, *args, **kwargs):
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'],
Expand Down

0 comments on commit 50ffd2c

Please sign in to comment.