The Meson Build System
http://mesonbuild.com/
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
71 lines
2.3 KiB
71 lines
2.3 KiB
Contributing to the Meson build system |
|
|
|
There are two simple ways to submit your patches. The preferred way is |
|
to send a github pull request. Small changes can also be sent as |
|
patches as emails to the Meson mailing list. Remember to add your name |
|
to the list of contributors in authors.txt. |
|
|
|
|
|
Python Coding style |
|
|
|
Meson follows the basic Python coding style. Additional rules are the |
|
following: |
|
|
|
- indent 4 spaces, no tabs ever |
|
- indent meson.build files with two spaces |
|
- try to keep the code as simple as possible |
|
- contact the mailing list before embarking on large scale projects |
|
to avoid wasted effort |
|
- all new features must come with a test (or several if it is |
|
a big feature) |
|
|
|
Meson uses Flake8 for style guide enforcement. The Flake8 options for |
|
the project are contained in setup.cfg. |
|
|
|
To run Flake8 on your local clone of Meson: |
|
|
|
$ python3 -m pip install flake8 |
|
$ cd meson |
|
$ flake8 |
|
|
|
C/C++ coding style |
|
|
|
Meson has a bunch of test code in several languages. The rules for |
|
those are simple. |
|
|
|
- indent 4 spaces, no tabs ever |
|
- brace always on the same line as if/for/else/function definition |
|
|
|
|
|
External dependencies |
|
|
|
The goal of Meson is to be as easily usable as possible. The user |
|
experience should be "get Python3 and Ninja, run", even on |
|
Windows. Unfortunately this means that we can't have dependencies on |
|
projects outside of Python's standard library. This applies only to |
|
core functionality, though. For additional helper programs etc the use |
|
of external dependencies may be ok. If you feel that you are dealing |
|
with this kind of case, please raise the issue on the mailing list |
|
first. |
|
|
|
|
|
What not to contribute? |
|
|
|
There are a few things that people seem to want to add to Meson but which |
|
are not there by design and will not be added either. |
|
|
|
The first one is defining your own functions or a generalized for loop. |
|
These are bad because they would make Meson's DSL Turing complete. The |
|
second feature is a Make backend. |
|
|
|
The FAQ has specific information why these two features will not be |
|
added to Meson: https://github.com/mesonbuild/meson/wiki/FAQ |
|
|
|
Merge requests adding either of these two features will be automatically |
|
rejected. Please save everyone's time (especially your own) and don't start |
|
working on these features. |
|
|
|
|
|
Do I need to sign a CLA? |
|
|
|
No. All contributions are welcome.
|
|
|