Commit Graph

91 Commits

Author SHA1 Message Date
59d4f771d2 editorconfig: add setting to trim trailing whitespace
and clean up all outstanding issues

Skip 'test cases/common/141 special characters/meson.build' since it
intentionally uses trailing newlines.
2021-08-15 09:36:18 -04:00
3e396b3782 fix: Always explicitly set encoding for text files (fixes #8263) 2021-06-29 11:28:08 +02:00
765aff5a42 coverage: Enable coverage reports 2021-06-22 21:05:11 +03:00
769fd50373 docs: Generate a table of all wrapdb releases
wrapdb CI will trigger Meson's CI to regenerate the list when
releases.json is updated.
2021-06-05 17:01:34 -04:00
6a0fabc647 mass rewrite of string formatting to use f-strings everywhere
performed by running "pyupgrade --py36-plus" and committing the results
2021-03-04 17:16:11 -05:00
4340bf34fa various python neatness cleanups
All changes were created by running

"pyupgrade --py3-only --keep-percent-format"

and committing the results. I have not touched string formatting for
now.

- use set literals
- simplify .format() parameter naming
- remove __future__
- remove default "r" mode for open()
- use OSError rather than compatibility aliases
- remove stray parentheses in function(generator) scopes
2021-03-04 17:11:26 -05:00
ccb15bc0e9 gen_data.py: even more sorting
glob.glob() is not sorted, despite using shell-style wildcards, and the
documentation does not mention this: https://bugs.python.org/issue21748

Recently, it does start mentioning "Whether or not the results are
sorted depends on the file system." which does not really get to the
heart of the matter...

This is causing fuzz too.
2021-01-13 15:57:06 +00:00
0063bd35d7 gen_data.py: sort files when generating mesondata
The current way this works is chaos since the tool might return files in
any order and thus shuffle around the order of embedded files. This
results in big diffs that cannot be easily reviewed.

Also regenerate the data according to the, going forward, canonical
ordering algorithm.
2021-01-12 19:19:00 -05:00
c18a9715b8 Hotdoc: use template for Commands.md instead of generating the entire file (#8154)
* doc: fix hotdoc misuse for dynamically generated content

hotdoc has a native include feature for including files inline. Use this
to generate one file for each dynamically generated code block, and
include that file in Commands.md; see:
https://hotdoc.github.io/syntax-extensions.html#smart-file-inclusion-syntax

This permits us to move back to using the in-tree version of the hotdoc
*.md sources, thus fixing the incorrect inclusion of "builddir/" in the
"Edit on github" links which resulted from using copies as the source.

Fixes #8061

* doc: call the dummy file a "stamp" as it is a better known term
2021-01-10 14:48:34 +02:00
f6672c7a19 use real pathlib module
We added the _pathlib module to work around defeciencies in python 3.5's
implementation, since we now rely on 3.6 lets drop this
2020-11-20 15:08:40 -08:00
fc57089bc5 cmake: Disable the new (CMake 3.16) PCH support
Subprojects that use the CMake PCH feature will cause
compilation/linker errors. The CMake PCH support
should thus be disabled until this can be properly
translated to meson.
2020-10-24 19:31:15 +02:00
96c31d9dbc typing: fix mypy typing error 2020-10-12 00:23:59 +03:00
e681235e5f typing: fix code review 2020-09-08 20:15:58 +02:00
0d57e307b2 typing: fully annotate tools 2020-09-08 20:15:56 +02:00
019ed04331 mdata: Generate mesondata.py from */data folders 2020-07-16 21:03:18 +02:00
14cc2efcfe Store website build script. [skip ci] 2020-07-01 18:12:44 +03:00
b6981bd16e Made Commands.md dynamically generated (#7346) 2020-06-30 23:56:08 +03:00
85708facae Merge pull request #6620 from jon-turney/test-output-check
Add a mechanism for validating meson output in tests
2020-05-13 11:32:28 -07:00
59db1f18ea boost: Only use usage-requirements defines (fixes #7046) 2020-05-01 22:08:59 +03:00
630cfd84ad Update dircondenser.py tool to update paths in test.json as well
Update dircondenser.py tool to update paths appearing in the expected
stdout in test.json when the containing directory is renamed.
2020-04-30 20:41:36 +01:00
ee94cb6c15 cmake2meson fix if nesting (#6676) 2020-02-23 20:19:13 +02:00
893c246550 boost: Rewrite boost_names.py generator 2020-02-20 13:38:20 +01:00
09b53c534f types: import typing as T (fixes #6333) 2020-01-08 15:28:17 +01:00
c0a9bca627 Update Python2 syntax to Python3 syntax in ghwt.py 2019-12-06 14:43:21 +02:00
6e708208dd CI: add initial type annotation checking 2019-11-07 22:18:21 +02:00
ba7428c9d3 cmake2meson: improve exceptions, add type annotations, use argparse 2019-10-19 14:28:03 +03:00
3581839f4c Fix unused variables warnings 2019-04-29 12:22:50 +02:00
2ba2c7771f allow nested if loop
close paren
2019-01-16 23:43:30 +02:00
142cf1459f modernize library default syntax, be like CMake static default 2019-01-06 22:29:34 +02:00
b338add554 Fix flake8 whitespace reports
$ flake8 | grep -E '(E203|E221|E226|E303|W291|W293)'
./mesonbuild/build.py:964:5: E303 too many blank lines (2)
./tools/dircondenser.py:70:36: E221 multiple spaces before operator
2018-09-13 20:33:17 +03:00
10a07ebf70 Add script to condense test directory names. 2018-07-31 19:17:49 +03:00
14e7b0af25 Boost: Add Python libraries
Fixes: #2507
2017-10-25 21:08:54 +03:00
c97e7749a6 Boost: Jamfile has two syntaxes for boost libraries
Fixes #2456
2017-10-12 21:45:23 +03:00
bbdba876af Boost: Improve search algorithm
The new implementation will correctly pick boost from 3 possible
locations on windows and two locations on posix compatible OSs.

The new search algorithm also differentiates between debug and
release builds of Boost and multi or single threading builds.

It was also decided to map "Meson modules" to Boost software libraries
and not Boost modules since it there are a lot of options regarding
linking. Some modules can even be used either as headers-only or with
dynamic linking.

This commit also fixes a bug that prevented header-only use on Windows.

Fixes: #2274 #2239 #1803 #669
2017-10-01 18:49:27 +02:00
4cbca49976 cmake2meson: convert varexp to lowercase
since variable names in 'set' statements are converted to lowercase, the
variable itself should be converted to lower-case too when used.
2017-09-14 10:23:54 +02:00
567b51ac71 cmake2meson: strip comments from statements
Without this change, the following correct cmake will cause an error:

statement(
    arg1
    # arg2
    arg3
)
2017-09-14 10:18:26 +02:00
c60c21a60d cmake2meson: convert statements to lower case
cmake does not distinguish between upper and lower case, so convert it to
lower case for the later comparisons.
2017-09-14 10:17:25 +02:00
4c00297112 Improve ac_converter to print a help message. 2017-07-31 11:20:09 +01:00
b2a90f1838 Removed unnecessary pass statements. 2017-07-16 12:02:48 +03:00
cdfb416425 Removed duplicate key in dictionary. 2017-07-16 12:01:01 +03:00
5311a274e3 A few typo fixes in the converter script. 2017-06-04 20:19:15 +03:00
83e778118d Added more functions to the list of checks. 2017-06-04 14:14:14 +03:00
dac8351ff1 cleanup: Unbound local variable 2017-01-18 21:22:47 +02:00
969be1f679 cleanup: Remove redundant parentheses 2017-01-18 21:22:47 +02:00
22eed4c417 cleanup: Redundant character escape 2017-01-18 21:22:47 +02:00
5b626ab4cb style: [E1**] Indentation 2017-01-11 12:33:27 -05:00
84902cb93a style: [E301] expected 1 blank line, found 0 2017-01-11 12:33:27 -05:00
f0bc5568a7 style: fix E703 violations
E703: statement ends with a semicolon

Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
2017-01-01 12:02:05 -05:00
969dc7e995 style: fix E124 violations
E124: closing bracket does not match visual indentation

Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
2017-01-01 12:02:05 -05:00
ea570bcb67 style: fix E265 violations
E265: block comment should start with '# '

Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
2017-01-01 12:02:05 -05:00