summaryrefslogtreecommitdiff
path: root/mesonbuild/mesonmain.py
Commit message (Collapse)AuthorAgeFilesLines
* report the context, if possible, on python tracebacksEli Schwartz2021-11-291-2/+8
| | | | | | | | | | | | The interpreter tries to catch any exception and add the latest node information to it, but currently we only used that to print better formatted error messages on MesonException. Since we should theoretically have that property for most/all exceptions, let's percolate that upward, and message the user that an unexpected traceback was encountered, that it should be reported as a bug, and the helpful information of "how far into parsing this meson.build did we get before erroring out, anyway?"
* Add --vsenv command line option and active VS only when neededXavier Claessens2021-10-101-91/+0
|
* pylint: turn on superflous-parensDylan Baker2021-08-311-1/+1
| | | | | | | | We have a lot of these. Some of them are harmless, if unidiomatic, such as `if (condition)`, others are potentially dangerous `assert(...)`, as `assert(condtion)` works as expected, but `assert(condition, message)` will result in an assertion that never triggers, as what you're actually asserting is `bool(tuple[2])`, which will always be true.
* fix bat_info UTF-8 string errorxth2021-08-031-0/+1
| | | | | | | " bat_info = json.loads(bat_json) " may produce error UnicodeDecodeError: 'utf-8' codec can't decode byte 0xc3 ... Because the vswhere.exe's output is not utf-8 by default Use UTF-8 encoding for vswhere.exe can fixing it .
* fix: Always explicitly set encoding for text files (fixes #8263)Daniel Mensinger2021-06-291-1/+1
|
* pathlib: Patch pathlib to work around some bugs (fixes #7295)Daniel Mensinger2021-06-291-0/+4
|
* typing: Fully annotate run_project_tests.pyDaniel Mensinger2021-06-091-1/+1
|
* vsenv: Recommend using "meson compile" wrapperXavier Claessens2021-05-281-1/+4
| | | | | When meson has setup the VS environment, running ninja to build won't work, user should use meson wrapper to compile.
* Remove `Microsoft.VisualStudio.Workload.WDExpress`Naveen M K2021-05-281-1/+0
|
* Find Visual Studio Build Tools 2019Naveen M K2021-05-281-9/+19
| | | | | Got the Idea from setuptools https://github.com/pypa/setuptools/blob/a5131f0b82e098da6c07a03a47f36f3a52f73fb6/setuptools/msvc.py#L176
* Also skip VS activation if gcc is found.Jussi Pakkanen2021-05-231-0/+2
|
* Better detection of Visual Studio compilerJacob Nielsen2021-05-221-0/+8
|
* Set up VS environment automatically when run.Jussi Pakkanen2021-05-131-1/+69
|
* Add `meson devenv` command and meson.add_devenv()Xavier Claessens2021-03-161-1/+3
|
* mass rewrite of string formatting to use f-strings everywhereEli Schwartz2021-03-041-2/+2
| | | | performed by running "pyupgrade --py36-plus" and committing the results
* Bump minimum supported Python version to 3.6. Closes #6297.Jussi Pakkanen2020-10-301-13/+2
|
* Add a notice about Python 3.5 supportNirbheek Chauhan2020-09-021-2/+14
| | | | | | | | This will be printed in bold at the end of interactive meson sub-commands that won't be parsed by a program. Specifically: setup, compile, test, and install. NOTICE: You are using [...]
* switch python2 %s for python3 .formatMichael2020-04-211-1/+1
|
* mesonbuild: Add mcompile commandDylan Baker2020-03-041-1/+3
| | | | | | | This is tested working with both msbuild and ninja/samu. Since our xcode support is pretty much broken I didn't bother. Fixes #6670
* Fix typos found by codespellWolfgang Stöggl2019-11-061-5/+5
| | | | - Typos were found by codespell v1.16.0
* Create multiple different archive types with dist.Jussi Pakkanen2019-07-231-1/+1
|
* Made dist a top level command.Jussi Pakkanen2019-07-231-1/+3
|
* Fix builtin variable namesDaniel Mensinger2019-04-291-15/+15
|
* Don't use len() to test for container emptinessDylan Baker2019-04-251-1/+1
| | | | | | I ran the numbers once before (it's in the meson history) but it's *much* faster to *not* use len for testing if a container is empty or not.
* Don't use mutable types as default argumentsDylan Baker2019-04-231-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | This isn't safe given the way python implements default arguments. Basically python store a reference to the instance it was passed, and then if that argument is not provided it uses the default. That means that two calls to the same function get the same instance, if one of them mutates that instance every subsequent call that gets the default will receive the mutated instance. The idiom to this in python is to use None and replace the None, def in(value: str, container: Optional[List[str]]) -> boolean: return src in (container or []) if there is no chance of mutation it's less code to use or and take advantage of None being falsy. If you may want to mutate the value passed in you need a ternary (this example is stupid): def add(value: str, container: Optional[List[str]]) -> None: container = container if container is not None else [] container.append(value) I've used or everywhere I'm sure that the value will not be mutated by the function and erred toward caution by using ternaries for the rest.
* Can run argument strings with internal Python. Closes #5217.Jussi Pakkanen2019-04-211-3/+7
|
* Merge pull request #2601 from 1ace/feature/completionJussi Pakkanen2019-03-041-0/+2
|\ | | | | Add completion scripts for Bash and Zsh
| * add note to keep completion scripts updatedEric Engestrom2019-02-201-0/+2
| |
* | rewriter: Remove command aliasDaniel Mensinger2019-03-041-1/+1
| |
* | rewriter: make flake8 happyDaniel Mensinger2019-03-041-1/+1
| |
* | better formating of the help outputDaniel Mensinger2019-03-041-7/+12
|/
* runpython: insert script's dir into import pathAndrei Alexeyev2019-02-181-0/+1
| | | | Fixes #4947
* pep8 py37Michael Hirsch, Ph.D2019-01-291-1/+1
|
* Merge pull request #4719 from ocrete/fix-posix-langJussi Pakkanen2019-01-171-0/+17
|\ | | | | Replace surrogates with valid codepoints to print env
| * mesonmain: Force to output UTF-8 even when the locale isn'tOlivier CrĂȘte2019-01-151-0/+17
| | | | | | | | | | | | | | Otherwise Python gets all confused and it makes testing difficult. Also minimally emulate the behaviour of the normal object to make the rest of the code happy.
* | Add new meson.py unstable-coredata subcommand.Martin Hostettler2019-01-071-1/+3
|/ | | | | | | | This adds a hidden option to dump the current otherwise hidden peristant state in coredata.dat. This interface is unstable as meson has no compatibility promises about coredata.dat.
* Add 'meson subprojects update' commandXavier Claessens2018-12-021-1/+3
| | | | This is inspired by gst-build's git-update script.
* Hide 'rewrite' and 'runpython' commands from helpXavier Claessens2018-10-041-6/+22
|
* Use a single ArgumentParser for all subcommandsXavier Claessens2018-10-041-51/+88
| | | | | | This has the adventage that "meson --help" shows a list of all commands, making them discoverable. This also reduce the manual parsing of arguments to the strict minimum needed for backward compatibility.
* Simplify run_script_command()Xavier Claessens2018-10-041-64/+24
|
* Move setup command handling to its own msetup.py fileXavier Claessens2018-10-041-228/+28
|
* Move set_meson_command() to mesonlibXavier Claessens2018-10-041-16/+1
|
* Return code 0 when builddir is already configuredXavier Claessens2018-09-241-1/+1
| | | | | | | | | This is a regression in Meson 0.48.0, commit 674ae46, Meson used to exit(0) when running setup command in a builddir already configured. Changing to exit(1) breaks some build tools that does "meson builddir && ninja -C builddir". Closes #4247.
* mesonmain: Add --reconfigure argumentXavier Claessens2018-09-051-17/+23
| | | | | | | | | | Allows to manually reconfigure a project the same way backends would do (e.g. ninja reconfigure). This has the advantage that new options can be set using "meson --reconfigure -Dfoo=bar" and solve situations where a project cannot be reconfigured because new options has been added with the wrong default value. Fixes #3543.
* mesonmain: Move builddir/sourcedir handling code inside MesonAppXavier Claessens2018-09-051-14/+14
|
* Add --fatal-meson-warnings command line optionXavier Claessens2018-09-041-1/+3
| | | | | | This makes any warning message printed by meson raise an exception, intended to be used by CI and developpers to easily catch deprecation warnings and other potential issues.
* Merge pull request #4016 from thiblahute/hotdocJussi Pakkanen2018-08-291-0/+3
|\ | | | | modules: Add an 'hotdoc' module
| * modules: Add an 'hotdoc' moduleThibault Saunier2018-08-281-0/+3
| | | | | | | | hotdoc: http://github.com/hotdoc/hotdoc/
* | Set wrap_mode to None by default to know if user passed a valueXavier Claessens2018-08-221-1/+1
| |
* | mesonmain: Use MesonException instead of RuntimeError in MesonApp initXavier Claessens2018-08-221-5/+5
|/