Skip to content
This repository
Browse code

Add msgpack.version as version tuple.

  • Loading branch information...
commit 50ffd2c489fdab81da2d994794b9582e0cadf5f4 1 parent 039542e
INADA Naoki authored September 02, 2010
1  .gitignore
@@ -3,3 +3,4 @@ build/*
3 3
 dist/*
4 4
 *.pyc
5 5
 *.pyo
  6
+msgpack/__version__.py
7  Makefile
... ...
@@ -1,7 +1,12 @@
  1
+.PHONY: test all python3
  2
+
1 3
 all:
2 4
 	python setup.py build_ext -i -f
3 5
 	python setup.py build sdist
4 6
 
5  
-.PHONY: test
  7
+python3:
  8
+	python3 setup.py build_ext -i -f
  9
+	python3 setup.py build sdist
  10
+
6 11
 test:
7 12
 	nosetests test
1  msgpack/__init__.py
... ...
@@ -1,4 +1,5 @@
1 1
 # coding: utf-8
  2
+from msgpack.__version__ import *
2 3
 from msgpack._msgpack import *
3 4
 
4 5
 # alias for compatibility to simplejson/marshal/pickle.
8  setup.py
... ...
@@ -1,5 +1,6 @@
1 1
 #!/usr/bin/env python
2 2
 # coding: utf-8
  3
+version = (0, 1, 5, 'dev')
3 4
 
4 5
 import os
5 6
 from glob import glob
@@ -14,7 +15,10 @@
14 15
     from distutils.command.build_ext import build_ext
15 16
     have_cython = False
16 17
 
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()
18 22
 
19 23
 # take care of extension modules.
20 24
 if have_cython:
@@ -53,7 +57,7 @@ def __init__(self, *args, **kwargs):
53 57
 setup(name='msgpack-python',
54 58
       author='INADA Naoki',
55 59
       author_email='songofacandy@gmail.com',
56  
-      version=version,
  60
+      version=''.join(str(x) for x in version),
57 61
       cmdclass={'build_ext': build_ext, 'sdist': Sdist},
58 62
       ext_modules=[msgpack_mod],
59 63
       packages=['msgpack'],

0 notes on commit 50ffd2c

Please sign in to comment.
Something went wrong with that request. Please try again.