contributing.txt 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. Contributing to the Meson build system
  2. There are two simple ways to submit your patches. The preferred way is
  3. to send a github pull request. Small changes can also be sent as
  4. patches as emails to the Meson mailing list.
  5. Python Coding style
  6. Meson follows the basic Python coding style. Additional rules are the
  7. following:
  8. - indent 4 spaces, no tabs ever
  9. - indent meson.build files with two spaces
  10. - try to keep the code as simple as possible
  11. - contact the mailing list before embarking on large scale projects
  12. to avoid wasted effort
  13. - all new features must come with a test (or several if it is
  14. a big feature)
  15. Meson uses Flake8 for style guide enforcement. The Flake8 options for
  16. the project are contained in setup.cfg.
  17. To run Flake8 on your local clone of Meson:
  18. $ python3 -m pip install flake8
  19. $ cd meson
  20. $ flake8
  21. C/C++ coding style
  22. Meson has a bunch of test code in several languages. The rules for
  23. those are simple.
  24. - indent 4 spaces, no tabs ever
  25. - brace always on the same line as if/for/else/function definition
  26. External dependencies
  27. The goal of Meson is to be as easily usable as possible. The user
  28. experience should be "get Python3 and Ninja, run", even on
  29. Windows. Unfortunately this means that we can't have dependencies on
  30. projects outside of Python's standard library. This applies only to
  31. core functionality, though. For additional helper programs etc the use
  32. of external dependencies may be ok. If you feel that you are dealing
  33. with this kind of case, please raise the issue on the mailing list
  34. first.
  35. What not to contribute?
  36. There are a few things that people seem to want to add to Meson but which
  37. are not there by design and will not be added either.
  38. The first one is defining your own functions or a generalized for loop.
  39. These are bad because they would make Meson's DSL Turing complete. The
  40. second feature is a Make backend.
  41. The FAQ has specific information why these two features will not be
  42. added to Meson: https://github.com/mesonbuild/meson/wiki/FAQ
  43. Merge requests adding either of these two features will be automatically
  44. rejected. Please save everyone's time (especially your own) and don't start
  45. working on these features.
  46. Do I need to sign a CLA?
  47. No. All contributions are welcome.