bump minimum required version of python to 3.7

Comment out the pending deprecation notice. It cannot be reached
anymore, but is still useful for the next time we do a version bump.
pull/9510/head
Eli Schwartz 3 years ago
parent 0c30db20b1
commit ad525dcce4
No known key found for this signature in database
GPG Key ID: CEB167EFB5722BD6
  1. 2
      README.md
  2. 2
      azure-pipelines.yml
  3. 2
      ci/run.ps1
  4. 4
      docs/markdown/Getting-meson.md
  5. 4
      docs/markdown/Getting-meson_ptbr.md
  6. 7
      docs/markdown/snippets/about_minimum_python_version.md
  7. 7
      mesonbuild/mesonmain.py
  8. 3
      setup.cfg
  9. 4
      setup.py

@ -14,7 +14,7 @@ build system.
#### Dependencies
- [Python](https://python.org) (version 3.6 or newer)
- [Python](https://python.org) (version 3.7 or newer)
- [Ninja](https://ninja-build.org) (version 1.8.2 or newer)
#### Installing from source

@ -62,7 +62,7 @@ jobs:
steps:
- task: UsePythonVersion@0
inputs:
versionSpec: '3.6'
versionSpec: '3.7'
addToPath: true
architecture: 'x64'
- task: PowerShell@2

@ -20,7 +20,7 @@ if ($env:arch -eq 'x64') {
# Rust puts its shared stdlib in a secret place, but it is needed to run tests.
$env:Path += ";$HOME/.rustup/toolchains/stable-i686-pc-windows-msvc/bin"
# Need 32-bit Python for tests that need the Python dependency
$env:Path = "C:\hostedtoolcache\windows\Python\3.6.8\x86;C:\hostedtoolcache\windows\Python\3.6.8\x86\Scripts;$env:Path"
$env:Path = "C:\hostedtoolcache\windows\Python\3.7.9\x86;C:\hostedtoolcache\windows\Python\3.7.9\x86\Scripts;$env:Path"
}
# Set the CI env var for the meson test framework

@ -1,6 +1,6 @@
# Getting Meson
Meson is implemented in Python 3, and requires 3.6 or newer. If your
Meson is implemented in Python 3, and requires 3.7 or newer. If your
operating system provides a package manager, you should install it
with that. For platforms that don't have a package manager, you need
to download it from [Python's home page]. See below for
@ -14,7 +14,7 @@ itself without doing anything special.
On Windows, if you did not install Python with the installer options
that make Python scripts executable, you will have to run `python
/path/to/meson.py`, where `python` is Python 3.6 or newer.
/path/to/meson.py`, where `python` is Python 3.7 or newer.
The newest development code can be obtained directly from [Git], and
we strive to ensure that it will always be working and usable. All

@ -1,6 +1,6 @@
# Obtendo o Meson
Meson é implementado em Python 3, e requer a versão 3.6 ou mais nova.
Meson é implementado em Python 3, e requer a versão 3.7 ou mais nova.
se o seu sistema operacional provê um gerenciador de pacotes, você deve
instalar o Meson com ele. Para plataformas que não tem um gerenciador de
pacotes, você precisa baixa-lo da [página inicial do Python]. Veja abaixo
@ -14,7 +14,7 @@ do git sem fazer nada de especial.
No Windows, se você não instalar o Python com a opção do instalador que fazem
os *scripts* Python executáveis, você vai ter que executar `python
/path/to/meson.py`, onde `python` é o Python 3.6 ou mais novo.
/path/to/meson.py`, onde `python` é o Python 3.7 ou mais novo.
O código de desenvolvimento mais recente pode ser obtido diretamente do [Git],
e nós lutamos para garatir que ele vai estar sempre funcionando e usável. Todos

@ -0,0 +1,7 @@
## Minimum required Python version updated to 3.7
Meson now requires at least Python version 3.7 to run as Python 3.6 reached EOL
on December 2021. In practice this should only affect people developing on
Ubuntu Bionic, who will need to manually install python3.8 from the official
repositories.

@ -139,6 +139,9 @@ class CommandLineParser:
if command is None:
command = options.command
# Bump the version here in order to add a pre-exit warning that we are phasing out
# support for old python. If this is already the oldest supported version, then
# this can never be true and does nothing.
if command in ('setup', 'compile', 'test', 'install') and sys.version_info < (3, 7):
pending_python_deprecation_notice = True
@ -204,8 +207,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, 6):
print('Meson works correctly only with python 3.6+.')
if sys.version_info < (3, 7):
print('Meson works correctly only with python 3.7+.')
print(f'You have python {sys.version}.')
print('Please update your environment')
return 1

@ -23,7 +23,6 @@ classifiers =
Operating System :: POSIX :: BSD
Operating System :: POSIX :: Linux
Programming Language :: Python :: 3 :: Only
Programming Language :: Python :: 3.6
Programming Language :: Python :: 3.7
Programming Language :: Python :: 3.8
Programming Language :: Python :: 3.9
@ -32,7 +31,7 @@ long_description = Meson is a cross-platform build system designed to be both as
[options]
packages = find:
python_requires = >= 3.6
python_requires = >= 3.7
setup_requires =
setuptools

@ -16,9 +16,9 @@
import sys
if sys.version_info < (3, 6):
if sys.version_info < (3, 7):
raise SystemExit('ERROR: Tried to install Meson with an unsupported Python version: \n{}'
'\nMeson requires Python 3.6.0 or greater'.format(sys.version))
'\nMeson requires Python 3.7.0 or greater'.format(sys.version))
from setuptools import setup

Loading…
Cancel
Save