diff options
author | cliechti <cliechti@f19166aa-fa4f-0410-85c2-fa1106f25c8a> | 2011-08-22 00:10:11 +0000 |
---|---|---|
committer | cliechti <cliechti@f19166aa-fa4f-0410-85c2-fa1106f25c8a> | 2011-08-22 00:10:11 +0000 |
commit | 4370b3def9f01a8f5bd565056b45c47023105c99 (patch) | |
tree | 0b2a33e3803db08c16bfa2b53756f4aeb5c63eb7 /setup.py | |
parent | 774f1b38c5c441a917174d66607767727144d8bb (diff) | |
download | pyserial-4370b3def9f01a8f5bd565056b45c47023105c99.tar.gz |
get version by regexp as import can not work w/ py 3k before 2to3 was run
git-svn-id: http://svn.code.sf.net/p/pyserial/code/trunk/pyserial@422 f19166aa-fa4f-0410-85c2-fa1106f25c8a
Diffstat (limited to 'setup.py')
-rw-r--r-- | setup.py | 13 |
1 files changed, 11 insertions, 2 deletions
@@ -33,12 +33,21 @@ if sys.version < '2.3': "supported - check http://pyserial.sf.net for older " "releases or upgrade your Python installation.") -import serial +# importing version does not work with Python 3 as files have not yet been +# converted. +#~ import serial +#~ version = serial.VERSION + +import re, os +version = re.search( + "VERSION.*'(.+)'", + open(os.path.join('serial', '__init__.py')).read()).group(1) + setup( name = "pyserial" + suffix, description = "Python Serial Port Extension", - version = serial.VERSION, + version = version, author = "Chris Liechti", author_email = "cliechti@gmx.net", url = "http://pyserial.sourceforge.net/", |