aboutsummaryrefslogtreecommitdiff
path: root/setup.py
diff options
context:
space:
mode:
authorDylan Baker <dylan@pnwbakers.com>2018-03-05 10:37:42 -0800
committerJussi Pakkanen <jpakkane@gmail.com>2018-03-07 22:54:01 +0200
commit1ea96b710b646bf45b614b397d6e87d07427e38a (patch)
tree1139a9052ca094ed9f46436a9dbfea6d20b0b7f0 /setup.py
parent8bd33ab9814b1f9e131e47f1a9fa1f69adc6a85b (diff)
downloadmeson-1ea96b710b646bf45b614b397d6e87d07427e38a.zip
meson-1ea96b710b646bf45b614b397d6e87d07427e38a.tar.gz
meson-1ea96b710b646bf45b614b397d6e87d07427e38a.tar.bz2
setup.py: set the python_requires field
This instructs tools like pip that meson requires python 3.5 or greater, so if one tries to install on an older version pip will fall back to an older version of meson. This won't fix 0.45 since it's already in the wild (unless someone wants to delete and re-upload the version on pypi). But it should fix future versions. Retain the hand rolled version check, but update it to enforce our actual requirements.
Diffstat (limited to 'setup.py')
-rw-r--r--setup.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/setup.py b/setup.py
index 0852cd6..8382440 100644
--- a/setup.py
+++ b/setup.py
@@ -19,8 +19,9 @@ import sys
from mesonbuild.coredata import version
-if sys.version_info[0] < 3:
- print('Tried to install with Python 2, Meson only supports Python 3.')
+if sys.version_info < (3, 5, 0):
+ print('Tried to install with an unsupported version of Python. '
+ 'Meson requires Python 3.5.0 or greater')
sys.exit(1)
# We need to support Python installations that have nothing but the basic
@@ -62,6 +63,7 @@ setup(name='meson',
author_email='jpakkane@gmail.com',
url='http://mesonbuild.com',
license=' Apache License, Version 2.0',
+ python_requires='>=3.5',
packages=['mesonbuild',
'mesonbuild.backend',
'mesonbuild.compilers',