summaryrefslogtreecommitdiff
path: root/mesonbuild/scripts
AgeCommit message (Collapse)Author
2017-05-17Remove unused variables.Elliott Sales de Andrade
2017-05-17Remove unused imports.Elliott Sales de Andrade
2017-05-13Strip system directories and show coverage for files not executed at all. ↵Jussi Pakkanen
Closes #1721.
2017-05-13Moved coverage commands to a standalone script.Jussi Pakkanen
2017-05-12Add test and release notes.Jussi Pakkanen
2017-05-11Initialise submodules.Jussi Pakkanen
2017-05-11Test created tarball by doing a full build + test + install cycle.Jussi Pakkanen
2017-05-11Created a dist target. Closes #877.Jussi Pakkanen
2017-05-04Use American English: behaviour -> behaviorPeter Hutterer
2017-05-03Merge pull request #1587 from mesonbuild/tingping/msgfmt-datadirJussi Pakkanen
i18n: Improve data_dirs support
2017-05-02Don't use len() to test emptiness vs not emptinessDylan Baker
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 Griffis
For parity with gettext() Fixes #1565
2017-04-19Drop terminating fullstop from "Installing blah to blah" messagesPeter Hutterer
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 Pakkanen
sharing. Closes #1619.
2017-04-13gtkdochelper: Fix type file name optionRafael Fontenelle
'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 Pakkanen
Export MESONINTROSPECT to postconf/install/run_command scripts
2017-04-06Ignore install as non-existent user or groupJon Turney
'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 Turney
Use '.exe' extension for executables for Cygwin when building and installing
2017-03-28Export MESONINTROSPECT to postconf/install/run_command scriptsNirbheek Chauhan
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 Pakkanen
2017-02-27Use cross stripper when cross compiling and allow overriding native strip ↵Jussi Pakkanen
executable. Closes #1414.
2017-02-06Do not strip jar targets. Closes #1343.Jussi Pakkanen
2017-01-24Support file perms for install_data and install_subdirNirbheek Chauhan
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 Sinkovsky
2017-01-11style: [E1**] IndentationMike Sinkovsky
2017-01-11style: [E303] too many blank lines (2)Mike Sinkovsky
2017-01-03Merge pull request #1272 from mesonbuild/ignatenko/lintJussi Pakkanen
fix some linting errors
2017-01-03fix 'unreachable code' warningsMike Sinkovsky
2017-01-02style: fix E127 violationsIgor Gnatenko
E127: continuation line over-indented for visual indent Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
2017-01-01style: fix E703 violationsIgor Gnatenko
E703: statement ends with a semicolon Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
2017-01-01style: fix E124 violationsIgor Gnatenko
E124: closing bracket does not match visual indentation Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
2017-01-01style: fix E128 violationsIgor Gnatenko
E128: continuation line under-indented for visual indent Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
2017-01-01style: fix E265 violationsIgor Gnatenko
E265: block comment should start with '# ' Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
2017-01-01style: fix E231 violationsIgor Gnatenko
E231: missing whitespace after ',' Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
2017-01-01style: fix E226 violationsIgor Gnatenko
E226: missing whitespace around arithmetic operator Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
2017-01-01style: fix E225 violationsIgor Gnatenko
E225: missing whitespace around operator Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
2016-12-31Fix space before :.Jussi Pakkanen
2016-12-31Add simple uninstall target. Closes #753.Jussi Pakkanen
2016-12-31Use the correct directory for scan-build command.Hemmo Nieminen
2016-12-23Merge pull request #1247 from centricular/fix-installed-soname-aliasesJussi Pakkanen
Fix soname symlinking after installation
2016-12-22Fix shared library symlink aliasing on installNirbheek Chauhan
Set the rules for the symlinking on the target itself, and then reuse that information while generating aliases during the build, and then pass it to the install script too.
2016-12-21Fix installation of statically linked executable for ELF binary.Matthieu Gautier
At installation, if the executable is a ELF file, we try to fix the dependencies in the binary section. If a executable has been compiled with the --static flag, there is no .dynamic section in the ELF binary and so we need to handle this case.
2016-12-21Merge pull request #1233 from mesonbuild/wip/ignatenko/code-styleJussi Pakkanen
Trivial cleanups in code
2016-12-19tree-wide: remove blank lines at EOFIgor Gnatenko
Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
2016-12-19tree-wide: remove unused variablesIgor Gnatenko
./mesonbuild/scripts/regen_checker.py:35:5: F841 local variable 'scriptdir' is assigned to but never used scriptdir = os.path.split(__file__)[0] ^ ./mesonbuild/scripts/yelphelper.py:84:13: F841 local variable 'symfile' is assigned to but never used symfile = os.path.join(install_dir, m) ^ ./mesonbuild/backend/backends.py:164:13: F841 local variable 'lang' is assigned to but never used lang = comp.get_language() ^ ./mesonbuild/backend/ninjabackend.py:1286:9: F841 local variable 'scriptdir' is assigned to but never used scriptdir = self.environment.get_script_dir() ^ ./mesonbuild/backend/vs2010backend.py:736:9: F841 local variable 'additional_options_set' is assigned to but never used additional_options_set = True ^ Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
2016-12-19tree-wide: remove unused importsIgor Gnatenko
./setup.py:17:1: F401 'os' imported but unused import os ^ ./setup.py:37:1: F401 'stat.ST_MODE' imported but unused from stat import ST_MODE ^ ./run_tests.py:17:1: F401 'os' imported but unused import subprocess, sys, os ^ ./run_tests.py:18:1: F401 'shutil' imported but unused import shutil ^ ./run_unittests.py:23:1: F401 'mesonbuild.dependencies.Qt5Dependency' imported but unused from mesonbuild.dependencies import PkgConfigDependency, Qt5Dependency ^ ./mesonbuild/build.py:15:1: F401 '.coredata' imported but unused from . import coredata ^ ./mesonbuild/interpreter.py:32:1: F401 'subprocess' imported but unused import os, sys, subprocess, shutil, uuid, re ^ ./mesonbuild/interpreter.py:32:1: F401 're' imported but unused import os, sys, subprocess, shutil, uuid, re ^ ./mesonbuild/dependencies.py:23:1: F401 'subprocess' imported but unused import os, stat, glob, subprocess, shutil ^ ./mesonbuild/mesonlib.py:17:1: F401 'sys' imported but unused import platform, subprocess, operator, os, shutil, re, sys ^ ./mesonbuild/modules/qt5.py:15:1: F401 'subprocess' imported but unused import os, subprocess ^ ./mesonbuild/modules/pkgconfig.py:15:1: F401 '..coredata' imported but unused from .. import coredata, build ^ ./mesonbuild/scripts/scanbuild.py:15:1: F401 'sys' imported but unused import sys, os ^ ./mesonbuild/scripts/meson_exe.py:20:1: F401 'subprocess' imported but unused import subprocess ^ ./mesonbuild/scripts/meson_exe.py:22:1: F401 '..mesonlib.MesonException' imported but unused from ..mesonlib import MesonException, Popen_safe ^ ./mesonbuild/scripts/symbolextractor.py:23:1: F401 'subprocess' imported but unused import os, sys, subprocess ^ ./mesonbuild/scripts/symbolextractor.py:25:1: F401 '..mesonlib.MesonException' imported but unused from ..mesonlib import MesonException, Popen_safe ^ ./mesonbuild/scripts/meson_install.py:19:1: F401 '..mesonlib.MesonException' imported but unused from ..mesonlib import MesonException, Popen_safe ^ ./mesonbuild/scripts/yelphelper.py:15:1: F401 'sys' imported but unused import sys, os ^ ./mesonbuild/scripts/yelphelper.py:20:1: F401 '..mesonlib.MesonException' imported but unused from ..mesonlib import MesonException ^ ./mesonbuild/backend/vs2010backend.py:17:1: F401 're' imported but unused import re ^ ./test cases/vala/8 generated sources/src/copy_file.py:3:1: F401 'os' imported but unused import os ^ ./test cases/common/107 postconf/postconf.py:3:1: F401 'sys' imported but unused import sys, os ^ ./test cases/common/129 object only target/obj_generator.py:5:1: F401 'shutil' imported but unused import sys, shutil, subprocess ^ ./test cases/common/57 custom target chain/usetarget/subcomp.py:3:1: F401 'os' imported but unused import sys, os ^ ./test cases/common/95 dep fallback/subprojects/boblib/genbob.py:3:1: F401 'os' imported but unused import os ^ ./test cases/common/98 gen extra/srcgen.py:4:1: F401 'os' imported but unused import os ^ ./test cases/common/113 generatorcustom/gen.py:3:1: F401 'os' imported but unused import sys, os ^ ./test cases/common/113 generatorcustom/catter.py:3:1: F401 'os' imported but unused import sys, os ^ ./test cases/common/59 object generator/obj_generator.py:5:1: F401 'shutil' imported but unused import sys, shutil, subprocess ^ Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
2016-12-19Use a script to clean-up custom-target output dirsNirbheek Chauhan
The script will manually delete all custom_target outputs that are directories instead of files. This is needed because on platforms other than Windows, Ninja only deletes directories while cleaning if they are empty. Closes #1220
2016-12-18Merge pull request #1216 from mesonbuild/ignatenko/shebangsJussi Pakkanen
Remove shebangs on files inside module
2016-12-18custom_target: Make directory outputs installableNirbheek Chauhan
This is useful in many cases where the list of files cannot be known in advance and is just dumped inside a directory. For example when generating documentation with doxygen and other tools that we don't have built-in support for. Includes a test for the same. Closes #893
2016-12-18Allow passing arguments to install scriptsNirbheek Chauhan
Closes #1213