changeset 679:3999088ab5b9

Guard against installing VIFF using a too old Python.
author Martin Geisler <mg@daimi.au.dk>
date Wed, 23 Apr 2008 21:19:02 +0200
parents dd5da8ca1fd4
children 503bf97f3561
files setup.py
diffstat 1 files changed, 4 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/setup.py	Wed Apr 23 20:29:50 2008 +0200
+++ b/setup.py	Wed Apr 23 21:19:02 2008 +0200
@@ -21,6 +21,10 @@
 # You should have received a copy of the GNU Lesser General Public
 # License along with VIFF. If not, see <http://www.gnu.org/licenses/>.
 
+import sys
+if not hasattr(sys, 'version_info') or sys.version_info < (2, 4, 0, 'final'):
+    raise SystemExit, "VIFF requires Python version 2.4 or later."
+
 from distutils.command.sdist import sdist
 from distutils.core import setup