From 2b14a942830e60eebd0f5ff079be21710b14cd5d Mon Sep 17 00:00:00 2001 From: Etoh Date: Sun, 3 Aug 2014 21:06:40 +0100 Subject: [PATCH] Add Python 2.7 check to buildPy2exe --- buildPy2exe.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/buildPy2exe.py b/buildPy2exe.py index 225d609..8c5e84e 100644 --- a/buildPy2exe.py +++ b/buildPy2exe.py @@ -1,11 +1,18 @@ #!/usr/bin/env python #coding:utf8 +import sys +try: + if (sys.version_info.major != 2) or (sys.version_info.minor < 7): + raise Exception("You must build Syncplay with Python 2.7!") +except AttributeError: + import warnings + warnings.warn("You must build Syncplay with Python 2.7!") + from distutils.core import setup from py2exe.build_exe import py2exe from string import Template import syncplay -import sys import os import subprocess