aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJussi Pakkanen <jpakkane@gmail.com>2020-08-30 20:09:45 +0300
committerJussi Pakkanen <jpakkane@gmail.com>2020-10-30 11:18:11 +0200
commitbca90722ecfc541ac5db7c1c79fb63ceb6286cd4 (patch)
treed8c7669db3823f9bf7037cbced78605e87142edd
parent8fbf10c4bcb5e0294328b67512f9e2f0cbd8d94d (diff)
downloadmeson-bca90722ecfc541ac5db7c1c79fb63ceb6286cd4.zip
meson-bca90722ecfc541ac5db7c1c79fb63ceb6286cd4.tar.gz
meson-bca90722ecfc541ac5db7c1c79fb63ceb6286cd4.tar.bz2
Bump minimum supported Python version to 3.6. Closes #6297.
-rw-r--r--.github/workflows/os_comp.yml20
-rw-r--r--azure-pipelines.yml2
-rw-r--r--docs/markdown/snippets/pythonbump.md6
-rw-r--r--mesonbuild/mesonmain.py15
-rwxr-xr-xrun_project_tests.py5
5 files changed, 11 insertions, 37 deletions
diff --git a/.github/workflows/os_comp.yml b/.github/workflows/os_comp.yml
index 3b38bab..5f4df20 100644
--- a/.github/workflows/os_comp.yml
+++ b/.github/workflows/os_comp.yml
@@ -7,26 +7,6 @@ on:
pull_request:
jobs:
- xenial:
- name: Ubuntu 16.04
- runs-on: ubuntu-16.04
- steps:
- - uses: actions/checkout@v2
- - name: Install Dependencies
- run: |
- sudo apt update -yq
- sudo apt install -yq --no-install-recommends python3-setuptools python3-pip g++ gfortran gobjc gobjc++ zlib1g-dev python-dev python3-dev python3-jsonschema
- - name: Install ninja-build tool
- uses: seanmiddleditch/gha-setup-ninja@v1
- - name: Python version
- run: python3 --version
- - name: Ninja version
- run: ninja --version
- - name: Run tests
- run: LD_LIBRARY_PATH=/usr/local/share/boost/1.69.0/lib/:$(rustc --print sysroot)/lib:$LD_LIBRARY_PATH python3 run_tests.py
- env:
- XENIAL: '1'
-
arch:
name: ${{ matrix.cfg.name }}
runs-on: ubuntu-latest
diff --git a/azure-pipelines.yml b/azure-pipelines.yml
index bd36aaa..569216c 100644
--- a/azure-pipelines.yml
+++ b/azure-pipelines.yml
@@ -36,7 +36,7 @@ jobs:
steps:
- task: UsePythonVersion@0
inputs:
- versionSpec: '3.5'
+ versionSpec: '3.6'
addToPath: true
architecture: 'x64'
- template: ci/azure-steps.yml
diff --git a/docs/markdown/snippets/pythonbump.md b/docs/markdown/snippets/pythonbump.md
new file mode 100644
index 0000000..5a31291
--- /dev/null
+++ b/docs/markdown/snippets/pythonbump.md
@@ -0,0 +1,6 @@
+## Minimum required Python version updated to 3.6
+
+Meson now requires at least Python version 3.6 to run as Python 3.5
+reaches EOL on September 2020. In practice this should only affect
+people developing on Ubuntu Xenial, which will similarly reach EOL in
+April 2021.
diff --git a/mesonbuild/mesonmain.py b/mesonbuild/mesonmain.py
index e07c0df..9bf6ef6 100644
--- a/mesonbuild/mesonmain.py
+++ b/mesonbuild/mesonmain.py
@@ -111,7 +111,6 @@ class CommandLineParser:
return 0
def run(self, args):
- print_py35_notice = False
# If first arg is not a known command, assume user wants to run the setup
# command.
known_commands = list(self.commands.keys()) + ['-h', '--help']
@@ -125,17 +124,10 @@ class CommandLineParser:
args = args[1:]
else:
parser = self.parser
- command = None
args = mesonlib.expand_arguments(args)
options = parser.parse_args(args)
- if command is None:
- command = options.command
-
- if command in ('setup', 'compile', 'test', 'install') and sys.version_info < (3, 6):
- print_py35_notice = True
-
try:
return options.run_func(options)
except MesonException as e:
@@ -152,9 +144,6 @@ class CommandLineParser:
traceback.print_exc()
return 2
finally:
- if print_py35_notice:
- mlog.notice('You are using Python 3.5 which is EOL. Starting with v0.57, '
- 'Meson will require Python 3.6 or newer', fatal=False)
mlog.shutdown()
def run_script_command(script_name, script_args):
@@ -192,8 +181,8 @@ def ensure_stdout_accepts_unicode():
sys.stdout.buffer = sys.stdout.raw if hasattr(sys.stdout, 'raw') else sys.stdout
def run(original_args, mainfile):
- if sys.version_info < (3, 5):
- print('Meson works correctly only with python 3.5+.')
+ if sys.version_info < (3, 6):
+ print('Meson works correctly only with python 3.6+.')
print('You have python {}.'.format(sys.version))
print('Please update your environment')
return 1
diff --git a/run_project_tests.py b/run_project_tests.py
index acd8590..e4a458e 100755
--- a/run_project_tests.py
+++ b/run_project_tests.py
@@ -242,7 +242,6 @@ class AutoDeletedDir:
failing_logs = []
print_debug = 'MESON_PRINT_TEST_OUTPUT' in os.environ
under_ci = 'CI' in os.environ
-under_xenial_ci = under_ci and ('XENIAL' in os.environ)
skip_scientific = under_ci and ('SKIP_SCIENTIFIC' in os.environ)
do_debug = under_ci or print_debug
no_meson_log_msg = 'No meson-log.txt found.'
@@ -828,8 +827,8 @@ def have_java():
return False
def skippable(suite, test):
- # Everything is optional when not running on CI, or on Ubuntu 16.04 CI
- if not under_ci or under_xenial_ci:
+ # Everything is optional when not running on CI
+ if not under_ci:
return True
if not suite.endswith('frameworks'):