Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master' into HEAD
Browse files Browse the repository at this point in the history
  • Loading branch information
rgommers committed Jun 25, 2024
2 parents 31161ee + 7ec1fc5 commit 5f71595
Show file tree
Hide file tree
Showing 131 changed files with 2,872 additions and 1,676 deletions.
3 changes: 3 additions & 0 deletions .pylintrc
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ disable=
cell-var-from-loop,
consider-using-f-string,
consider-using-with,
contextmanager-generator-missing-cleanup,
cyclic-import,
deprecated-decorator,
duplicate-code,
Expand Down Expand Up @@ -47,6 +48,7 @@ disable=
not-an-iterable,
not-callable,
pointless-string-statement,
possibly-used-before-assignment,
protected-access,
raise-missing-from,
redeclared-assigned-name,
Expand Down Expand Up @@ -75,6 +77,7 @@ disable=
unsubscriptable-object,
unused-argument,
unused-variable,
used-before-assignment,
useless-super-delegation,
wrong-import-order,
wrong-import-position,
4 changes: 2 additions & 2 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ trigger:
- 'test cases'
- 'unittests'
- 'azure-pipelines.yml'
- 'ci/azure-steps.yml'
- 'ci/run.ps1'
- 'run_project_tests.py'
- 'run_tests.py'
- 'run_unittests.py'
Expand All @@ -41,7 +41,7 @@ pr:
- 'test cases'
- 'unittests'
- 'azure-pipelines.yml'
- 'ci/azure-steps.yml'
- 'ci/run.ps1'
- 'run_project_tests.py'
- 'run_tests.py'
- 'run_unittests.py'
Expand Down
5 changes: 0 additions & 5 deletions ci/ciimage/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,11 +80,6 @@ def gen_bashrc(self) -> None:
fi
'''

if self.data_dir.name == 'gentoo':
out_data += '''
source /etc/profile
'''

out_file.write_text(out_data, encoding='utf-8')

# make it executable
Expand Down
2 changes: 1 addition & 1 deletion ci/ciimage/cuda/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@ install_minimal_python_packages
# Manually remove cache to avoid GitHub space restrictions
rm -rf /var/cache/pacman

echo "source /etc/profile.d/cuda.sh" >> /ci/env_vars.sh
echo "source /etc/profile" >> /ci/env_vars.sh
2 changes: 2 additions & 0 deletions ci/ciimage/gentoo/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -156,3 +156,5 @@ rm /usr/lib/python/EXTERNALLY-MANAGED
python3 -m ensurepip
install_python_packages
python3 -m pip install "${base_python_pkgs[@]}"

echo "source /etc/profile" >> /ci/env_vars.sh
13 changes: 7 additions & 6 deletions ci/run.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -8,21 +8,22 @@ if ($LastExitCode -ne 0) {
$env:Path = ($env:Path.Split(';') | Where-Object { $_ -notmatch 'mingw|Strawberry|Chocolatey|PostgreSQL' }) -join ';'

if ($env:arch -eq 'x64') {
rustup default 1.77
# Rust puts its shared stdlib in a secret place, but it is needed to run tests.
$env:Path += ";$HOME/.rustup/toolchains/stable-x86_64-pc-windows-msvc/bin"
$env:Path += ";$HOME/.rustup/toolchains/1.77-x86_64-pc-windows-msvc/bin"
} elseif ($env:arch -eq 'x86') {
# Switch to the x86 Rust toolchain
rustup default stable-i686-pc-windows-msvc

# Also install clippy
rustup component add clippy
rustup default 1.77-i686-pc-windows-msvc

# 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"
$env:Path += ";$HOME/.rustup/toolchains/1.77-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"
}

# Also install clippy
rustup component add clippy

# Set the CI env var for the meson test framework
$env:CI = '1'

Expand Down
1 change: 1 addition & 0 deletions data/shell-completions/bash/meson
Original file line number Diff line number Diff line change
Expand Up @@ -580,6 +580,7 @@ _meson-test() {
quiet
timeout-multiplier
setup
max-lines
test-args
)

Expand Down
1 change: 1 addition & 0 deletions data/shell-completions/zsh/_meson
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,7 @@ local -a meson_commands=(
'(--quiet -q)'{'--quiet','-q'}'[produce less output to the terminal]'
'(--timeout-multiplier -t)'{'--timeout-multiplier','-t'}'[a multiplier for test timeouts]:Python floating-point number: '
'--setup[which test setup to use]:test setup: '
'--max-lines[Maximum number of lines to show from a long test log]:Python integer number: '
'--test-args[arguments to pass to the tests]: : '
'*:Meson tests:__meson_test_names'
)
Expand Down
3 changes: 2 additions & 1 deletion docs/markdown/Builtin-options.md
Original file line number Diff line number Diff line change
Expand Up @@ -408,7 +408,8 @@ interpreter directly, even if it is a venv. Setting to `venv` will instead use
the paths for the virtualenv the python found installation comes from (or fail
if it is not a virtualenv). Setting to `auto` will check if the found
installation is a virtualenv, and use `venv` or `system` as appropriate (but
never `prefix`). This option is mutually exclusive with the `platlibdir`/`purelibdir`.
never `prefix`). Note that Conda environments are treated as `system`.
This option is mutually exclusive with the `platlibdir`/`purelibdir`.

For backwards compatibility purposes, the default `install_env` is `prefix`.

Expand Down
13 changes: 13 additions & 0 deletions docs/markdown/FAQ.md
Original file line number Diff line number Diff line change
Expand Up @@ -695,3 +695,16 @@ directory. It glob ignores ```"*"```, since all generated files should not be
checked into git.

Users of older versions of Meson may need to set up ignore files themselves.

## How to add preprocessor defines to a target?

Just add `-DFOO` to `c_args` or `cpp_args`. This works for all known compilers.

```meson
mylib = library('mylib', 'mysource.c', c_args: ['-DFOO'])
```

Even though [MSVC documentation](https://learn.microsoft.com/en-us/cpp/build/reference/d-preprocessor-definitions)
uses `/D` for preprocessor defines, its [command-line syntax](https://learn.microsoft.com/en-us/cpp/build/reference/compiler-command-line-syntax)
accepts `-` instead of `/`.
It's not necessary to treat preprocessor defines specially in Meson ([GH-6269](https://github.com/mesonbuild/meson/issues/6269#issuecomment-560003922)).
9 changes: 9 additions & 0 deletions docs/markdown/Python-module.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,15 @@ authors:
This module provides support for finding and building extensions against
python installations, be they python 2 or 3.

If you want to build and package Python extension modules using tools
compatible with [PEP-517](https://peps.python.org/pep-0517/), check out
[meson-python](https://mesonbuild.com/meson-python/index.html).

If you are building Python extension modules against a Python interpreter
located in a venv or Conda environment, you probably want to set
`python.install_venv=auto`;
see [Python module options](Builtin-options.md#python-module) for details.

*Added 0.46.0*

## Functions
Expand Down
8 changes: 8 additions & 0 deletions docs/markdown/Unit-tests.md
Original file line number Diff line number Diff line change
Expand Up @@ -274,6 +274,14 @@ other useful information as the environmental variables. This is
useful, for example, when you run the tests on Travis-CI, Jenkins and
the like.

By default, the output from tests will be limited to the last 100 lines. The
maximum number of lines to show can be configured with the `--max-lines` option
*(added 1.5.0)*:

```console
$ meson test --max-lines=1000 testname
```

**Timeout**

In the test case options, the `timeout` option is specified in a number of seconds.
Expand Down
15 changes: 2 additions & 13 deletions docs/markdown/Users.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ topic](https://github.com/topics/meson).
- [fwupd](https://github.com/hughsie/fwupd), a simple daemon to allow session software to update firmware
- [GameMode](https://github.com/FeralInteractive/gamemode), a daemon/lib combo for Linux that allows games to request a set of optimisations be temporarily applied to the host OS
- [Geary](https://wiki.gnome.org/Apps/Geary), an email application built around conversations, for the GNOME 3 desktop.
- [GIMP](https://gitlab.gnome.org/GNOME/gimp), an image manipulation program (experimental replacing autoconf)
- [GIMP](https://gitlab.gnome.org/GNOME/gimp), an image manipulation program (master branch)
- [GLib](https://gitlab.gnome.org/GNOME/glib), cross-platform C library used by GTK+ and GStreamer
- [Glorytun](https://github.com/angt/glorytun), a multipath UDP tunnel
- [GNOME Boxes](https://gitlab.gnome.org/GNOME/gnome-boxes), a GNOME hypervisor
Expand Down Expand Up @@ -168,18 +168,7 @@ format files
- [ThorVG](https://www.thorvg.org/), vector-based scenes and animations library
- [Tilix](https://github.com/gnunn1/tilix), a tiling terminal emulator for Linux using GTK+ 3
- [Tizonia](https://github.com/tizonia/tizonia-openmax-il), a command-line cloud music player for Linux with support for Spotify, Google Play Music, YouTube, SoundCloud, TuneIn, Plex servers and Chromecast devices
- [FSCL XTest](https://github.com/fossil-lib/tscl-xtest-c), a framework for testing C/C++ code
- [FSCL XMock](https://github.com/fossil-lib/tscl-xmock-c), a framework for mocking C/C++ code
- [FSCL XCore](https://github.com/fossil-lib/tscl-xcore-c), essintal compoments for C code
- [FSCL XTool](https://github.com/fossil-lib/tscl-xtool-c), essintal tool for low-level related task
- [FSCL XString](https://github.com/fossil-lib/tscl-xstring-c), string and char types in C
- [FSCL XToFu](https://github.com/fossil-lib/tscl-xtofu-c), a framework for generic types in C
- [FSCL XJellyfish](https://github.com/fossil-lib/tscl-xfish-c), a framework for AI development using JellyFish in C
- [FSCL XStructure](https://github.com/fossil-lib/tscl-xstructure-c), a framework for data structures in C
- [FSCL XAlgorithm](https://github.com/fossil-lib/tscl-xalgorithm-c), a framework for algorithms C
- [FSCL XPattern](https://github.com/fossil-lib/tscl-xpattern-c), a framework for design patterns C
- [FSCL XScience](https://github.com/fossil-lib/tscl-xscience-c), a framework for scientific projects in C
- [FSCL XCube](https://github.com/fossil-lib/tscl-xcube-c), a framework for creating a portable curses TUI in C
- [Fossil Logic Standard](https://github.com/fossil-lib), a collection frameworks in C/C++, Objective-C and Objective-C++.
- [UFJF-MLTK](https://github.com/mateus558/UFJF-Machine-Learning-Toolkit), A C++ cross-platform framework for machine learning algorithms development and testing
- [Vala Language Server](https://github.com/benwaffle/vala-language-server), code intelligence engine for the Vala and Genie programming languages
- [Valum](https://github.com/valum-framework/valum), a micro web framework written in Vala
Expand Down
4 changes: 4 additions & 0 deletions docs/markdown/Wrap-dependency-system-manual.md
Original file line number Diff line number Diff line change
Expand Up @@ -377,6 +377,10 @@ Some naming conventions need to be respected:
- The `extra_deps` variable is pre-defined and can be used to add extra dependencies.
This is typically used as `extra_deps += dependency('foo')`.

Since *1.5.0* Cargo wraps can also be provided with `Cargo.lock` file at the root
of (sub)project source tree. Meson will automatically load that file and convert
it into a serie of wraps definitions.

## Using wrapped projects

Wraps provide a convenient way of obtaining a project into your
Expand Down
6 changes: 6 additions & 0 deletions docs/markdown/snippets/cargo_lock.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
## Added support `Cargo.lock` file

When a (sub)project has a `Cargo.lock` file at its root, it is loaded to provide
an automatic fallback for dependencies it defines, fetching code from
https://crates.io or git. This is identical as providing `subprojects/*.wrap`,
see [cargo wraps](Wrap-dependency-system-manual.md#cargo-wraps) dependency naming convention.
12 changes: 12 additions & 0 deletions docs/markdown/snippets/find_program_version_argument.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
## New version_argument kwarg for find_program

When finding an external program with `find_program`, the `version_argument`
can be used to override the default `--version` argument when trying to parse
the version of the program.

For example, if the following is used:
```meson
foo = find_program('foo', version_argument: '-version')
```

meson will internally run `foo -version` when trying to find the version of `foo`.
6 changes: 6 additions & 0 deletions docs/markdown/snippets/test_max_lines.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
## The Meson test program supports a new "--max-lines" argument

By default `meson test` only shows the last 100 lines of test output from tests
that produce large amounts of output. This default can now be changed with the
new `--max-lines` option. For example, `--max-lines=1000` will increase the
maximum number of log output lines from 100 to 1000.
9 changes: 8 additions & 1 deletion docs/yaml/functions/find_program.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -102,13 +102,20 @@ kwargs:
since: 0.52.0
description: |
Specifies the required version, see
[[dependency]] for argument format. The version of the program
[[dependency]] for argument format. By default, the version of the program
is determined by running `program_name --version` command. If stdout is empty
it fallbacks to stderr. If the output contains more text than simply a version
number, only the first occurrence of numbers separated by dots is kept.
If the output is more complicated than that, the version checking will have to
be done manually using [[run_command]].
version_argument:
type: str
since: 1.5.0
description: |
Specifies the argument to pass when trying to find the version of the program.
If this is unspecified, `program_name --version` will be used.
dirs:
type: list[str]
since: 0.53.0
Expand Down
Loading

0 comments on commit 5f71595

Please sign in to comment.