Skip to content

Commit 50ffd2c

Browse files
committed
Add msgpack.version as version tuple.
1 parent 039542e commit 50ffd2c

File tree

4 files changed

+14
-3
lines changed

4 files changed

+14
-3
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,4 @@ build/*
33
dist/*
44
*.pyc
55
*.pyo
6+
msgpack/__version__.py

Makefile

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,12 @@
1+
.PHONY: test all python3
2+
13
all:
24
python setup.py build_ext -i -f
35
python setup.py build sdist
46

5-
.PHONY: test
7+
python3:
8+
python3 setup.py build_ext -i -f
9+
python3 setup.py build sdist
10+
611
test:
712
nosetests test

msgpack/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
# coding: utf-8
2+
from msgpack.__version__ import *
23
from msgpack._msgpack import *
34

45
# alias for compatibility to simplejson/marshal/pickle.

setup.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
#!/usr/bin/env python
22
# coding: utf-8
3+
version = (0, 1, 5, 'dev')
34

45
import os
56
from glob import glob
@@ -14,7 +15,10 @@
1415
from distutils.command.build_ext import build_ext
1516
have_cython = False
1617

17-
version = '0.1.4'
18+
# make msgpack/__verison__.py
19+
f = open('msgpack/__version__.py', 'w')
20+
f.write("version = %r\n" % (version,))
21+
f.close()
1822

1923
# take care of extension modules.
2024
if have_cython:
@@ -53,7 +57,7 @@ def __init__(self, *args, **kwargs):
5357
setup(name='msgpack-python',
5458
author='INADA Naoki',
5559
author_email='songofacandy@gmail.com',
56-
version=version,
60+
version=''.join(str(x) for x in version),
5761
cmdclass={'build_ext': build_ext, 'sdist': Sdist},
5862
ext_modules=[msgpack_mod],
5963
packages=['msgpack'],

0 commit comments

Comments
 (0)