aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2023-05-22i18n module: check for a good enough msgfmt before permitting merge_fileEli Schwartz1-1/+10
The concept of merge_file intrinsically requires some GNU-specific functionality, so let's emit a useful error message during configuration, when we don't have that. The relevant GNU gettext versions date back to around 2015 so *probably* anyone has that too, but we may as well verify that while we are here.
2023-05-22i18n module: be broadly supportive of portable gettext toolsEli Schwartz1-1/+1
There are a number of implementations for msgfmt, supporting various options. The simplest, and most common, use case is to compile .po files into .mo files, and this should be able to work on gettext implementations other than the GNU one. The problem is that we were passing some pretty portable arguments in an unportable manner. The `-o` option-argument and its associated argument came after the input file operand, which violates the POSIX Utility Syntax Guidelines, and happens to not be supported by Solaris gettext. The GNU gettext doesn't care; GNU invented GNU argument permutation. Switch the order around so that our use respects the POSIX style.
2023-05-22intro: add more details to generated files(part 2)Charles Brunet2-2/+9
- add `extra_paths` to intro-tests.json to know paths needed to run a test on Windows; - add `depends` to alias targets in intro-targets.json to know what targets does an alias point to; - add `depends` to intro-dependencies.json to know libraries linked with an internal dependency; - renamed `deps` to `dependencies` in `intro-dependencies.json` for more uniformity.
2023-05-21Allow generator.process(generator.process(...))Volker Weißmann8-65/+148
Fixes #1141
2023-05-20rust: Add system libs used by rust std to staticlib external depsXavier Claessens4-10/+25
2023-05-20rust: Use Popen_safe() for sanity checksXavier Claessens1-11/+2
2023-05-20wrap: Check for common "provides" typoXavier Claessens1-0/+2
It is a common mistake that is hard to find because Meson silently ignore unknown sections. Better have an explicit error message.
2023-05-18Check dub version (#11794)Remi Thebault3-28/+62
* DubDependency._check_dub returns the version * check for compatible Dub version Dub versions starting at 1.32 have a new cache structure into which Meson doesn't know where to find compatible artifacts * skipping D tests involving Dub * refactor _check_dub makes mypy happier * make linters happy * localize some logic
2023-05-17summary: Add from which subproject each subproject have been calledXavier Claessens3-7/+13
2023-05-16rust compiler: use better sanity check logging comparable to the clike oneEli Schwartz1-7/+13
Don't spew debug-level info. Log the actual command line run.
2023-05-16meson_exe: print suitable debug information for DLL not found errorsEli Schwartz1-1/+2
It's particularly inscrutable if you do not know where DLLs weren't found because you don't know what the PATH was in the child process.
2023-05-15Metrowerks: move PCH args to the end of the command lineNomura1-1/+7
2023-05-13Make `dependency('foo', static: true, method: 'cmake') link staticallyVolker Weißmann3-1/+7
Fixes #1709
2023-05-13During reconfigure, show that no compiler was found, if compiler fails ↵Volker Weißmann6-19/+21
sanity check.
2023-05-13Fix paths of Fortran order dependenciesVolker Weißmann5-4/+22
Fixes #11047
2023-05-09docs: mention additional python modules needed for buildingEli Schwartz2-0/+14
Also check that they are available in meson.build. Closes #11772
2023-05-09docs: make the man page installableEli Schwartz1-0/+2
Users now have the *option* to run the documentation build and use `meson install` to install man pages.
2023-05-09docs: add option to skip building HTML docsEli Schwartz2-33/+40
Reorder meson targets to handle those all at the end, and exit early if HTML documentation is disabled. This makes it possible to build just the manpage, without hotdoc installed.
2023-05-09docs: add meson option to use the unsafe loaderEli Schwartz2-1/+4
2023-05-09Enable fatal warnings in HotDoc when building website.Jussi Pakkanen1-0/+1
2023-05-08docs/prebuilt: fix sanity check logic in the exampleJoel Rosdahl1-1/+1
2023-05-06Initial support for Metrowerks AssemblerNomura4-1/+127
2023-05-05mcompile: Fix target name suggestionsXavier Claessens1-1/+1
2023-05-05Fix building python extensions on win-arm64Radek Bartoň1-17/+8
2023-05-05Python module: emit warning for debug buildtypes with MSVC and no debug PythonRalf Gommers1-1/+24
CPython adds a hard to avoid hardcoded link flag to look for a debug libpython. This results in a very puzzling error, so emit a warning with a clear message. Note that pybind11 has a workaround for this, which undefines `_DEBUG`. So users who use only pybind11 can use non-release buildtypes, but they won't get debug symbols on Windows unless they have a debug build.
2023-05-05Fix unit test that hardcoded `/` and hence broke on WindowsRalf Gommers1-4/+4
2023-05-05Fix `ERROR: no toolchain found` when run from unittestsRalf Gommers1-1/+1
[skip actions]
2023-05-05Add Cython to Windows CI jobs on AzureRalf Gommers1-0/+3
[skip actions]
2023-05-05Use release buildtype in Cython tests, and skip unless ninja backendRalf Gommers5-21/+33
This matches the tests for Python extensions. Also include some other cleanups to these `meson.build` files: Adding `python_dep` is no longer needed, this is automatic now. Use a single line for `import('python').find_installation()`, because the result of `import('python')` by itself is not used for anything.
2023-05-03dependencies: allow config-tool to fallback to default program namesEli Schwartz2-1/+5
If the dependency permits it, we can just do a PATH search instead of mandating that it be listed in the cross file. This is useful for the limited case where a specific dependency is known to be compatible with any machine choice. Mark the pybind11 dependency as supporting this. It's a valid choice because pybind11 is a header-only C++ library.
2023-05-03cmake module: fix many typing issuesEli Schwartz1-23/+25
In #11761 it turned out that we failed to correctly handle all compiler.sizeof API changes in an old commit, breaking use of the module. And mypy could have caught this for us, except that the module is neither typed nor checked in CI. Partially solve this by adding lots of type annotations, greatly reducing the number of mypy errors in this file from 35 down to 12.
2023-05-03cmake module: make configured file correctly handle the do_conf_file APIEli Schwartz1-5/+5
This doesn't accept a dict, only an actual ConfigurationData object. Due to the way we poke at it, a dict can sort of work anyway, but might not if the internal layout isn't exactly correct. This is evidenced by the way we make the dict values be hard-to-read tuples containing emptiness, because that's how ConfigurationData objects handle descriptions. Simplify and make the seed dictionary readable, then actually convert it into a real ConfigurationData. Bonus: this now passes type checking.
2023-05-03cmake module: use more typed_pos_args for consistencyEli Schwartz2-20/+10
It's shorter and more descriptive. Although we always enforce the same rules either way, a unified decorator is one less line of code for each location, and also tells you how many "too few" arguments you *did* pass.
2023-05-03doc: Add link to argument detailsXavier Claessens2-3/+10
2023-05-03Visual studio: Generate vcxproj.filters files to adds filters to imitated ↵Renan Lavarec2-0/+66
directories to navigate more easily in the source files.
2023-05-03tests: fix `test_always_prefer_c_compiler_for_asm`Benoit Pierre1-1/+1
Handle the case where `sccache` is installed and used over `ccache`.
2023-05-03python bytecompile: use correct install tagEli Schwartz1-1/+1
2023-05-02unittests: add magic flag global to integrate utility methods with unittestEli Schwartz1-0/+5
The stdlib unittest module has a magic flag (undocumented) which indicates that a module is part of a unittest framework. > Truncates usercode tb at the first unittest frame. > > If the first frame of the traceback is in user code, > the prefix up to the first unittest frame is returned. > If the first frame is already in the unittest module, > the traceback is not modified. This avoids some ugliness, e.g. the following test error logs: ``` > self.assertPathListEqual(intro[0]['install_filename'], ['/usr/lib/libstat.aaa']) unittests/allplatformstests.py:432: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ unittests/baseplatformtests.py:393: in assertPathListEqual self.assertPathEqual(i[0], i[1]) unittests/baseplatformtests.py:384: in assertPathEqual self.assertEqual(PurePath(path1), PurePath(path2)) E AssertionError: PurePosixPath('/usr/lib/libstat.a') != PurePosixPath('/usr/lib/libstat.aaa') ``` Since assertPathListEqual is our own assertion helper, we don't need to give trace information about its internals. This change causes the error log to become: ``` > self.assertPathListEqual(intro[0]['install_filename'], ['/usr/lib/libstat.aaa']) E AssertionError: PurePosixPath('/usr/lib/libstat.a') != PurePosixPath('/usr/lib/libstat.aaa') unittests/allplatformstests.py:432: AssertionError ``` which is a lot more readable.
2023-05-02tests: add workarounds for python brokenness on WindowsEli Schwartz3-2/+22
msys2 is broken only on clang, due to -Werror issues in the python headers as patched by msys2. MSVC is simply weird... due to the use of an unversioned platlib/purelib directory, the python2 and python3 components overlap.
2023-05-02bytecompile: switch to handling destdir in the script launcher envEli Schwartz2-20/+20
2023-05-02tests: add a python test for bytecode compilationEli Schwartz11-8/+91
Some tweaks are added to the test case so that it supports python2 as well.
2023-05-02python module: add an automatic byte-compilation stepEli Schwartz8-7/+149
For all source `*.py` files installed via either py.install_sources() or an `install_dir: py.get_install_dir()`, produce `*.pyc` files at install time. Controllable via a module option.
2023-05-02update the devenv module hooks to support generic modifications to BuildEli Schwartz3-10/+10
We may want to do things like update install scripts as well, which have to happen before generating the backend. Instead of adding one module method per thing to do, use a single function that allows for modifying the Build object directly.
2023-05-02extend install scripts to allow specific directory variable exportsEli Schwartz3-5/+14
This is useful for internal scripts that want to know about something other than MESON_INSTALL_PREFIX and MESON_INSTALL_DESTDIR_PREFIX, which is very specific to the prefix.
2023-05-02fix regression in precomputing CMAKE_SIZEOF_VOID_PMaxHearnden1-1/+1
In commit 808d5934dd6c6a6c16f66e9dc51dae6e83e02cef, compiler.sizeof was refactored to introduce caching, but cmake subprojects did not adapt to that API change and ended up embedding the python repr of a tuple as a cmake variable.
2023-05-02Log python name when not foundCharles Brunet1-3/+3
Fixes #11686.
2023-05-02Find python3.xx on windowsCharles Brunet3-3/+12
2023-05-02Ensure python fallback has the right versionCharles Brunet1-1/+2
Fixes #11057
2023-05-01avoid re-uploading the docs when a PR is based on the upstream repoEli Schwartz1-3/+2
In this case, we have the secret available, and the workflow ran even though it wasn't on branch "master" because of the pull request trigger. Since the change hasn't landed on master, though, we do not want to update the website. So check for pushes to master, specifically.
2023-04-29wrap: Always pass posix paths to patchNirbheek Chauhan1-1/+2
patch on Windows is provided by MSYS, which only understands POSIX paths, with `/`. Using Windows paths with `\` results in a "file not found" error. We got a little lucky here because the path is relative, so the drive letter difference doesn't affect us.