From 46c324eb6e2af1bf7bfebfb57a8f59343641f6ee Mon Sep 17 00:00:00 2001 From: Jussi Pakkanen Date: Mon, 28 Mar 2016 13:00:08 +0300 Subject: Error out if trying to install with Python 2. --- setup.py | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'setup.py') diff --git a/setup.py b/setup.py index 0acce4d5e..1c964356c 100644 --- a/setup.py +++ b/setup.py @@ -14,6 +14,12 @@ # See the License for the specific language governing permissions and # limitations under the License. +import sys + +if sys.version_info[0] < 3: + print('Tried to install with Python 2, Meson only supports Python 3.') + sys.exit(1) + # We need to support Python installations that have nothing but the basic # Python installation. Use setuptools when possible and fall back to # plain distutils when setuptools is not available. -- cgit v1.2.3