aboutsummaryrefslogtreecommitdiff
path: root/setup.py
diff options
context:
space:
mode:
authorJussi Pakkanen <jpakkane@gmail.com>2016-03-28 13:00:08 +0300
committerJussi Pakkanen <jpakkane@gmail.com>2016-03-28 13:00:08 +0300
commit46c324eb6e2af1bf7bfebfb57a8f59343641f6ee (patch)
tree8c42624aa92a4f4b5585c25080bb034599f94e51 /setup.py
parent84804fc53123e8681a381a38f5ea13db8d401a43 (diff)
downloadmeson-46c324eb6e2af1bf7bfebfb57a8f59343641f6ee.zip
meson-46c324eb6e2af1bf7bfebfb57a8f59343641f6ee.tar.gz
meson-46c324eb6e2af1bf7bfebfb57a8f59343641f6ee.tar.bz2
Error out if trying to install with Python 2.
Diffstat (limited to 'setup.py')
-rw-r--r--setup.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/setup.py b/setup.py
index 0acce4d..1c96435 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.