aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/scripts
AgeCommit message (Collapse)AuthorFilesLines
2017-07-18Close files reliably.Jussi Pakkanen1-0/+5
2017-07-17gnome.gtkdoc: Handle absolute install_dirs correctlyNirbheek Chauhan1-3/+5
Must prepend DESTDIR in case it's absolute. Also document that by default it is relative to the gtk-doc html directory.
2017-07-16Return explicit 0 as it is used in a sys.exit statement (just like every ↵Jussi Pakkanen1-0/+1
other run function).
2017-07-16Use sys.exit rather than plain exit.Jussi Pakkanen1-1/+1
2017-06-21Merge pull request #1920 from QuLogic/hg-distJussi Pakkanen1-7/+29
Add Mercurial dist support
2017-06-13Add Mercurial dist support.Elliott Sales de Andrade1-4/+25
2017-06-13Remove extraneous os.path.split()s.Elliott Sales de Andrade1-3/+4
Since only one part is needed, they can be replaced by dirname, basename, or the originally joined file name.
2017-06-09gnome.yelp(): Handle file existing on symlinkPatrick Griffis1-1/+5
Fixes #1921
2017-06-09gnome.yelp(): Handle platforms where symlink not supportedPatrick Griffis1-2/+5
2017-06-09gnome.yelp(): Make copies of media files when symlink is falsePatrick Griffis1-1/+5
2017-06-07Merge pull request #1866 from ebassi/mkdb-argsJussi Pakkanen1-1/+10
Add mkdb_args support to gnome.gtkdoc()
2017-06-03Allow empty extra arguments in gettext scriptRene Lopez1-1/+1
2017-05-29Whitespace tweaks to reduce Flake8 warningsAlistair Thomas2-3/+3
2017-05-28Add mkdb_args support to gnome.gtkdoc()Emmanuele Bassi1-1/+10
There are cases where we need to specify arguments to gtkdoc-mkdb, like telling it to scan extensions that are not '.h' and '.c'. Let's add a new named argument to gnome.gtkdoc(), as well as the plumbing needed for the gtk-doc helper script.
2017-05-21Create helper function for a rmtree that works reliably on Windows.Jussi Pakkanen1-1/+2
2017-05-17Delete the correct directory in dist check.Elliott Sales de Andrade1-1/+1
2017-05-17Remove dead code paths.Elliott Sales de Andrade1-2/+1
2017-05-17Remove unused variables.Elliott Sales de Andrade2-4/+4
2017-05-17Remove unused imports.Elliott Sales de Andrade1-2/+1
2017-05-13Strip system directories and show coverage for files not executed at all. ↵Jussi Pakkanen1-19/+37
Closes #1721.
2017-05-13Moved coverage commands to a standalone script.Jussi Pakkanen1-0/+61
2017-05-12Add test and release notes.Jussi Pakkanen1-1/+1
2017-05-11Initialise submodules.Jussi Pakkanen1-15/+37
2017-05-11Test created tarball by doing a full build + test + install cycle.Jussi Pakkanen1-22/+63
2017-05-11Created a dist target. Closes #877.Jussi Pakkanen1-0/+85
2017-05-04Use American English: behaviour -> behaviorPeter Hutterer1-1/+1
2017-05-03Merge pull request #1587 from mesonbuild/tingping/msgfmt-datadirJussi Pakkanen1-0/+35
i18n: Improve data_dirs support
2017-05-02Don't use len() to test emptiness vs not emptinessDylan Baker2-2/+2
Meson has a common pattern of using 'if len(foo) == 0:' or 'if len(foo) != 0:', however, this is a common anti-pattern in python. Instead tests for emptiness/non-emptiness should be done with a simple 'if foo:' or 'if not foo:' Consider the following: >>> import timeit >>> timeit.timeit('if len([]) == 0: pass') 0.10730923599840025 >>> timeit.timeit('if not []: pass') 0.030033907998586074 >>> timeit.timeit('if len(['a', 'b', 'c', 'd']) == 0: pass') 0.1154778649979562 >>> timeit.timeit("if not ['a', 'b', 'c', 'd']: pass") 0.08259823200205574 >>> timeit.timeit('if len("") == 0: pass') 0.089759664999292 >>> timeit.timeit('if not "": pass') 0.02340641999762738 >>> timeit.timeit('if len("foo") == 0: pass') 0.08848102600313723 >>> timeit.timeit('if not "foo": pass') 0.04032287199879647 And for the one additional case of 'if len(foo.strip()) == 0', which can be replaced with 'if not foo.isspace()' >>> timeit.timeit('if len(" ".strip()) == 0: pass') 0.15294511600222904 >>> timeit.timeit('if " ".isspace(): pass') 0.09413968399894657 >>> timeit.timeit('if len(" abc".strip()) == 0: pass') 0.2023209120015963 >>> timeit.timeit('if " abc".isspace(): pass') 0.09571301700270851 In other words, it's always a win to not use len(), when you don't actually want to check the length.
2017-04-29i18n: Add data_dirs kwarg to merge_file()Patrick Griffis1-0/+35
For parity with gettext() Fixes #1565
2017-04-19Drop terminating fullstop from "Installing blah to blah" messagesPeter Hutterer3-7/+7
Grammatically, this full stop isn't needed and with file names it has a potential to be confusing: Installing /foo/bar/filename.1 to /foo/bar/dirname. The full stop caused me to do a double-take more than once, so let's drop it.
2017-04-17Do not obliterate old rpath because it might be used due to read only data ↵Jussi Pakkanen1-3/+12
sharing. Closes #1619.
2017-04-13gtkdochelper: Fix type file name optionRafael Fontenelle1-1/+1
'gtkdoc-scangobj' script was recently ported to Python (it was Perl), and it now requires providing '--type' option to specify the name of the file to store the types in. Without this option, 'gtkdockelper' will exit with error status 2 and will throw a message "gtkdoc-scangobj: error: unrecognized arguments: <typefile>"
2017-04-08Merge pull request #1518 from centricular/mesonintrospect-evarJussi Pakkanen2-6/+7
Export MESONINTROSPECT to postconf/install/run_command scripts
2017-04-06Ignore install as non-existent user or groupJon Turney1-1/+10
'test cases/common/12 data' and 'test cases/common/66 install subdir' both try to install something as 'root'. This user doesn't exist on Cygwin. Perhaps we should automatically convert this to some other user, but it's not clear which. For real projects, it's possibly better for the meson.build to explicitly handle this... 'test cases/common/12 data' also tries to install something with GID 0. There's no guarantee this group exists.
2017-04-06Use '.exe' extension for executables for CygwinJon Turney2-2/+6
Use '.exe' extension for executables for Cygwin when building and installing
2017-03-28Export MESONINTROSPECT to postconf/install/run_command scriptsNirbheek Chauhan2-6/+7
Points to the `mesonintrospect.py` script corresponding to the currently-running version of Meson. Includes a test for all three methods of running scripts/commands. Closes https://github.com/mesonbuild/meson/issues/1385
2017-03-02Install PDB files. Closes #1442.Jussi Pakkanen1-0/+5
2017-02-27Use cross stripper when cross compiling and allow overriding native strip ↵Jussi Pakkanen1-2/+2
executable. Closes #1414.
2017-02-06Do not strip jar targets. Closes #1343.Jussi Pakkanen1-0/+3
2017-01-24Support file perms for install_data and install_subdirNirbheek Chauhan1-2/+30
With the 'install_mode' kwarg, you can now specify the file and directory permissions and the owner and the group to be used while installing. You can pass either: * A single string specifying just the permissions * A list of strings with: - The first argument a string of permissions - The second argument a string specifying the owner or an int specifying the uid - The third argument a string specifying the group or an int specifying the gid Specifying `false` as any of the arguments skips setting that one. The format of the permissions kwarg is the same as the symbolic notation used by ls -l with the first character that specifies 'd', '-', 'c', etc for the file type omitted since that is always obvious from the context. Includes unit tests for the same. Sadly these only run on Linux right now, but we want them to run on all platforms. We do set the mode in the integration tests for all platforms but we don't check if they were actually set correctly.
2017-01-18cleanup: Remove redundant parenthesesMike Sinkovsky1-2/+2
2017-01-11style: [E1**] IndentationMike Sinkovsky1-2/+2
2017-01-11style: [E303] too many blank lines (2)Mike Sinkovsky1-1/+0
2017-01-03Merge pull request #1272 from mesonbuild/ignatenko/lintJussi Pakkanen1-1/+1
fix some linting errors
2017-01-03fix 'unreachable code' warningsMike Sinkovsky1-1/+1
2017-01-02style: fix E127 violationsIgor Gnatenko1-1/+1
E127: continuation line over-indented for visual indent Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
2017-01-01style: fix E703 violationsIgor Gnatenko1-7/+7
E703: statement ends with a semicolon Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
2017-01-01style: fix E124 violationsIgor Gnatenko2-3/+3
E124: closing bracket does not match visual indentation Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
2017-01-01style: fix E128 violationsIgor Gnatenko1-1/+3
E128: continuation line under-indented for visual indent Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
2017-01-01style: fix E265 violationsIgor Gnatenko1-9/+9
E265: block comment should start with '# ' Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>