Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions .github/workflows/images.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,9 @@ jobs:
- { name: Fedora, id: fedora }
- { name: Gentoo, id: gentoo }
- { name: OpenSUSE, id: opensuse }
- { name: Ubuntu Bionic, id: bionic }
- { name: Ubuntu Rolling, id: ubuntu-rolling }
steps:
# Need v3 because of bionic
- uses: actions/checkout@v3
- uses: actions/checkout@v6

# Login to dockerhub
- name: Docker login
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,7 @@ jobs:
- uses: actions/setup-python@v5
with:
python-version: '3.x'
# Pin mypy to version 1.8, so we retain the ability to lint for Python 3.7
- run: python -m pip install "mypy==1.8" strictyaml truststore types-PyYAML types-tqdm types-chevron
- run: python -m pip install mypy strictyaml truststore types-PyYAML types-tqdm types-chevron
- run: python run_mypy.py --allver
env:
PYTHONUNBUFFERED: 1
Expand Down
13 changes: 1 addition & 12 deletions .github/workflows/os_comp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,24 +42,13 @@ jobs:
- { name: Fedora, id: fedora }
- { name: Gentoo, id: gentoo }
- { name: OpenSUSE, id: opensuse }
- { name: Ubuntu Bionic, id: bionic }
container:
image: mesonbuild/${{ matrix.cfg.id }}:latest
volumes:
- ${{ matrix.cfg.id == 'bionic' && '/node20217:/node20217:rw,rshared' || ' ' }}
- ${{ matrix.cfg.id == 'bionic' && '/node20217:/__e/node20:ro,rshared' || ' ' }}
env:
MESON_CI_JOBNAME: linux-${{ matrix.cfg.id }}-gcc

steps:
- name: install nodejs20glibc2.17
if: ${{ matrix.cfg.id == 'bionic' }}
run: |
apt install curl -y
curl -LO https://unofficial-builds.nodejs.org/download/release/v20.9.0/node-v20.9.0-linux-x64-glibc-217.tar.xz
tar -xf node-v20.9.0-linux-x64-glibc-217.tar.xz --strip-components 1 -C /node20217
ldd /__e/node20/bin/node
- uses: actions/checkout@v4
- uses: actions/checkout@v6

- name: Run tests
# All environment variables are stored inside the docker image in /ci/env_vars.sh
Expand Down
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,13 @@ build system.

#### Dependencies

- [Python](https://python.org) (version 3.7 or newer)
- [Python](https://python.org) (version 3.10 or newer)
- [Ninja](https://ninja-build.org) (version 1.8.2 or newer)

Latest Meson version supporting previous Python versions:
- Python 3.9: **1.11**
- Python 3.8: **1.11**
- Python 3.7: **1.11**
- Python 3.6: **0.61.5**
- Python 3.5: **0.56.2**
- Python 3.4: **0.45.1**
Expand Down
8 changes: 0 additions & 8 deletions ci/ciimage/bionic/image.json

This file was deleted.

69 changes: 0 additions & 69 deletions ci/ciimage/bionic/install.sh

This file was deleted.

4 changes: 2 additions & 2 deletions ci/run.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -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.7.9\x86;C:\hostedtoolcache\windows\Python\3.7.9\x86\Scripts;$env:Path"
$env:Path = "C:\hostedtoolcache\windows\Python\3.10.19\x86;C:\hostedtoolcache\windows\Python\3.10.19\x86\Scripts;$env:Path"
}

# Set the CI env var for the meson test framework
Expand Down Expand Up @@ -92,7 +92,7 @@ python --version

# Needed for running unit tests in parallel.
echo ""
python -m pip --disable-pip-version-check install --upgrade pefile pytest-xdist pytest-subtests fastjsonschema
python -m pip --disable-pip-version-check install --upgrade pefile pytest-xdist pytest-subtests fastjsonschema

# Needed for running the Cython tests
python -m pip --disable-pip-version-check install cython
Expand Down
27 changes: 0 additions & 27 deletions docs/markdown/Continuous-Integration.md
Original file line number Diff line number Diff line change
Expand Up @@ -233,33 +233,6 @@ The following statement is sufficient for Meson to find Boost:
- cmd: set BOOST_ROOT=C:\Libraries\boost_1_67_0
```

## Travis without Docker

Non-Docker Travis-CI builds can use Linux, MacOS or Windows.
Set the desired compiler(s) in the build **matrix**.
This example is for **Linux** (Ubuntu 18.04) and **C**.

```yaml
dist: bionic
group: travis_latest

os: linux
language: python

matrix:
include:
- env: CC=gcc
- env: CC=clang

install:
- pip install meson ninja

script:
- meson setup builddir
- meson compile -C builddir
- meson test -C builddir
```

## GitHub Actions

GitHub Actions provides a versatile platform for continuous integration
Expand Down
5 changes: 4 additions & 1 deletion docs/markdown/FAQ.md
Original file line number Diff line number Diff line change
Expand Up @@ -345,7 +345,10 @@ bug fixes.

- python 3.5: [supported through Meson 0.56.2](Release-notes-for-0.56.0.md#python-35-support-will-be-dropped-in-the-next-release)
- python 3.6: [supported through Meson 0.61.5](Release-notes-for-0.61.0.md#python-36-support-will-be-dropped-in-the-next-release)
- python 3.7: currently actively supported by Meson
- python 3.7: [supported through Meson 1.11.x](Release-notes-for-1.11.0.md#last-major-version-supporting-python-37-38-and-39)
- python 3.8: [supported through Meson 1.11.x](Release-notes-for-1.11.0.md#last-major-version-supporting-python-37-38-and-39)
- python 3.9: [supported through Meson 1.11.x](Release-notes-for-1.11.0.md#last-major-version-supporting-python-37-38-and-39)
- python 3.10: Currently supported

We encourage projects to support a wide range of Meson versions if they are not
actually using the latest features anyway. In many, many cases it is quite
Expand Down
4 changes: 2 additions & 2 deletions docs/markdown/Getting-meson.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Getting Meson

Meson is implemented in Python 3, and requires 3.7 or newer. If your
Meson is implemented in Python 3, and requires 3.10 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
Expand All @@ -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.7 or newer.
/path/to/meson.py`, where `python` is Python 3.10 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
Expand Down
4 changes: 2 additions & 2 deletions docs/markdown/Getting-meson_ptbr.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Obtendo o Meson

Meson é implementado em Python 3, e requer a versão 3.7 ou mais nova.
Meson é implementado em Python 3, e requer a versão 3.10 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
Expand All @@ -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.7 ou mais novo.
/path/to/meson.py`, onde `python` é o Python 3.10 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
Expand Down
2 changes: 1 addition & 1 deletion docs/markdown/Getting-meson_zh.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# 获取Meson

Meson基于Python3运行,要求Python版本3.7以上。 如果你的操作系统提供包管理器, 你应该用包管理器安装python;如果没有包管理器,你应该在[Python主页]下载合适的Python3。相关请参阅[特殊平台的安装特例](#特殊平台的安装特例).
Meson基于Python3运行,要求Python版本3.10以上。 如果你的操作系统提供包管理器, 你应该用包管理器安装python;如果没有包管理器,你应该在[Python主页]下载合适的Python3。相关请参阅[特殊平台的安装特例](#特殊平台的安装特例).

## 下载Meson

Expand Down
4 changes: 2 additions & 2 deletions docs/yaml/builtins/build_machine.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ description: |
See [Cross-compilation](Cross-compilation.md).

Currently, these values are populated using
[`platform.system()`](https://docs.python.org/3.7/library/platform.html#platform.system) and
[`platform.machine()`](https://docs.python.org/3.7/library/platform.html#platform.machine).
[`platform.system()`](https://docs.python.org/3.10/library/platform.html#platform.system) and
[`platform.machine()`](https://docs.python.org/3.10/library/platform.html#platform.machine).
If you think the returned values for any of these are incorrect for
your system or CPU, or if your OS is not in the linked table, please
[file a bug](https://github.com/mesonbuild/meson/issues/new) report
Expand Down
4 changes: 2 additions & 2 deletions meson.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@

# Check python version before importing anything else, we might have an older
# Python that would error on f-string syntax for example.
if sys.version_info < (3, 7):
print('Meson works correctly only with python 3.7+.')
if sys.version_info < (3, 10):
print('Meson works correctly only with python 3.10+.')
print('You have python {}.'.format(sys.version))
print('Please update your environment')
sys.exit(1)
Expand Down
12 changes: 5 additions & 7 deletions mesonbuild/mesondata.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,8 @@ def write_to_private(self, env: 'Environment') -> Path:
if isinstance(resource, Path):
return resource
except AttributeError:
# fall through to python 3.7 compatible code
pass

out_file = Path(env.scratch_dir) / 'data' / self.path.name
out_file.parent.mkdir(exist_ok=True)
self.write_once(out_file)
return out_file
# fall through to zipapp compatible code
out_file = Path(env.scratch_dir) / 'data' / self.path.name
out_file.parent.mkdir(exist_ok=True)
self.write_once(out_file)
return out_file
6 changes: 3 additions & 3 deletions mesonbuild/mesonmain.py
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ def run(self, args: T.List[str]) -> int:
# support for old python. If this is already the oldest supported version, then
# this can never be true and does nothing.
pending_python_deprecation_notice = \
command in {'setup', 'compile', 'test', 'install'} and sys.version_info < (3, 7)
command in {'setup', 'compile', 'test', 'install'} and sys.version_info < (3, 10)

try:
return options.run_func(options)
Expand All @@ -198,8 +198,8 @@ def run(self, args: T.List[str]) -> int:
mlog.warning('Running the setup command as `meson [options]` instead of '
'`meson setup [options]` is ambiguous and deprecated.', fatal=False)
if pending_python_deprecation_notice:
mlog.notice('You are using Python 3.6 which is EOL. Starting with v0.62.0, '
'Meson will require Python 3.7 or newer', fatal=False)
mlog.notice(f'You are using Python 3.{sys.version_info.minor} which is EOL. Starting with v1.12.0, '
'Meson will require Python 3.10 or newer', fatal=False)
mlog.shutdown()

def run_script_command(script_name: str, script_args: T.List[str]) -> int:
Expand Down
2 changes: 1 addition & 1 deletion mesonbuild/minstall.py
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ def set_chown(path: str, user: T.Union[str, int, None] = None,
if sys.version_info >= (3, 13):
# pylint: disable=unexpected-keyword-arg
# cannot handle sys.version_info, https://github.com/pylint-dev/pylint/issues/9622
shutil.chown(path, user, group, dir_fd=dir_fd, follow_symlinks=follow_symlinks) # type: ignore[call-overload]
shutil.chown(path, user, group, dir_fd=dir_fd, follow_symlinks=follow_symlinks)
else:
real_os_chown = os.chown

Expand Down
2 changes: 1 addition & 1 deletion mesonbuild/modules/pkgconfig.py
Original file line number Diff line number Diff line change
Expand Up @@ -367,7 +367,7 @@ def _add_exclude(x: T.Union[str, build.CustomTarget, build.CustomTargetIndex, bu
# pylance/pyright gets this right, but for mypy we have to ignore the
# error
@T.overload
def _fn(xs: T.List[str], libs: bool = False) -> T.List[str]: ... # type: ignore
def _fn(xs: T.List[str], libs: bool = False) -> T.List[str]: ...

@T.overload
def _fn(xs: T.List[LIBS], libs: bool = False) -> T.List[LIBS]: ...
Expand Down
1 change: 0 additions & 1 deletion run_shell_checks.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
'ci/ciimage/ubuntu-rolling/test.sh',
'ci/ciimage/cuda-cross/install.sh',
'ci/ciimage/cuda/install.sh',
'ci/ciimage/bionic/install.sh',
'ci/ciimage/fedora/install.sh',
'ci/ciimage/arch/install.sh',
'ci/ciimage/gentoo/install.sh',
Expand Down
6 changes: 2 additions & 4 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -25,19 +25,17 @@ classifiers =
Operating System :: POSIX :: BSD
Operating System :: POSIX :: Linux
Programming Language :: Python :: 3 :: Only
Programming Language :: Python :: 3.7
Programming Language :: Python :: 3.8
Programming Language :: Python :: 3.9
Programming Language :: Python :: 3.10
Programming Language :: Python :: 3.11
Programming Language :: Python :: 3.12
Programming Language :: Python :: 3.13
Programming Language :: Python :: 3.14
Topic :: Software Development :: Build Tools
long_description = Meson is a cross-platform build system designed to be both as fast and as user friendly as possible. It supports many languages and compilers, including GCC, Clang, PGI, Intel, and Visual Studio. Its build definitions are written in a simple non-Turing complete DSL.

[options]
packages = find:
python_requires = >= 3.7
python_requires = >= 3.10

[options.entry_points]
console_scripts =
Expand Down
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@

import os, sys

if sys.version_info < (3, 7):
if sys.version_info < (3, 10):
raise SystemExit('ERROR: Tried to install Meson with an unsupported Python version: \n{}'
'\nMeson requires Python 3.7.0 or greater'.format(sys.version))
'\nMeson requires Python 3.10.0 or greater'.format(sys.version))

from setuptools import setup

Expand Down
2 changes: 1 addition & 1 deletion test cases/frameworks/16 sdl2/test.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
{ "val": "config-tool" },
{ "val": "sdlconfig" },
{ "val": "extraframework", "expect_skip_on_os": ["!darwin"], "expect_skip_on_jobname": ["macos"] },
{ "val": "cmake", "expect_skip_on_jobname": ["bionic"] }
{ "val": "cmake" }
]
}
},
Expand Down
2 changes: 1 addition & 1 deletion test cases/frameworks/26 netcdf/test.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"expect_skip_on_jobname": ["azure", "bionic", "cygwin", "fedora", "macos", "msys2", "opensuse", "ubuntu"]
"expect_skip_on_jobname": ["azure", "cygwin", "fedora", "macos", "msys2", "opensuse", "ubuntu"]
}
2 changes: 1 addition & 1 deletion test cases/frameworks/30 scalapack/test.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"expect_skip_on_jobname": ["azure", "bionic", "cygwin", "fedora", "msys2", "opensuse"]
"expect_skip_on_jobname": ["azure", "cygwin", "fedora", "msys2", "opensuse"]
}
2 changes: 1 addition & 1 deletion test cases/frameworks/34 gir static lib/test.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@
{"type": "file", "platform": "cygwin", "file": "usr/lib/libgirlib.dll.a"},
{"type": "file", "file": "usr/share/gir-1.0/Meson-1.0.gir"}
],
"expect_skip_on_jobname": ["azure", "bionic", "macos", "msys2"]
"expect_skip_on_jobname": ["azure", "macos", "msys2"]
}
2 changes: 1 addition & 1 deletion test cases/frameworks/40 qt qml/test.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,5 @@
{"type": "file", "file": "usr/qml/My/Module5/qmldir"},
{"type": "file", "file": "usr/qml/My/Module5/My_Module5.qmltypes"}
],
"expect_skip_on_jobname": ["cygwin", "msys2", "azure", "bionic", "macos"]
"expect_skip_on_jobname": ["cygwin", "msys2", "azure", "macos"]
}
Loading