summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--setup.py13
1 files changed, 11 insertions, 2 deletions
diff --git a/setup.py b/setup.py
index 8776361..8b8e0bf 100644
--- a/setup.py
+++ b/setup.py
@@ -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/",