mirror of
https://github.com/mesonbuild/meson.git
synced 2026-08-13 17:07:04 +00:00
Bump minimum supported Python version to 3.6. Closes #6297.
This commit is contained in:
20
.github/workflows/os_comp.yml
vendored
20
.github/workflows/os_comp.yml
vendored
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
6
docs/markdown/snippets/pythonbump.md
Normal file
6
docs/markdown/snippets/pythonbump.md
Normal file
@@ -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.
|
||||
@@ -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
|
||||
|
||||
@@ -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'):
|
||||
|
||||
Reference in New Issue
Block a user