aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/scripts
AgeCommit message (Collapse)AuthorFilesLines
2017-01-01style: fix E231 violationsIgor Gnatenko1-1/+1
E231: missing whitespace after ',' Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
2017-01-01style: fix E226 violationsIgor Gnatenko4-17/+17
E226: missing whitespace around arithmetic operator Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
2017-01-01style: fix E225 violationsIgor Gnatenko1-4/+4
E225: missing whitespace around operator Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
2016-12-31Fix space before :.Jussi Pakkanen2-7/+7
2016-12-31Add simple uninstall target. Closes #753.Jussi Pakkanen1-0/+46
2016-12-31Use the correct directory for scan-build command.Hemmo Nieminen1-1/+2
2016-12-23Merge pull request #1247 from centricular/fix-installed-soname-aliasesJussi Pakkanen1-2/+2
Fix soname symlinking after installation
2016-12-22Fix shared library symlink aliasing on installNirbheek Chauhan1-2/+2
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 Gautier1-0/+7
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 Pakkanen6-11/+6
Trivial cleanups in code
2016-12-19tree-wide: remove blank lines at EOFIgor Gnatenko1-1/+0
Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
2016-12-19tree-wide: remove unused variablesIgor Gnatenko2-2/+0
./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 Gnatenko5-8/+6
./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 Chauhan1-0/+43
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 Pakkanen12-20/+2
Remove shebangs on files inside module
2016-12-18custom_target: Make directory outputs installableNirbheek Chauhan1-45/+68
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 Chauhan1-19/+8
Closes #1213
2016-12-18remove shebangs from scriptsIgor Gnatenko12-20/+2
meson.noarch: E: non-executable-script /usr/lib/python3.5/site-packages/mesonbuild/scripts/regen_checker.py 644 /usr/bin/python3 meson.noarch: E: non-executable-script /usr/lib/python3.5/site-packages/mesonbuild/scripts/meson_test.py 644 /usr/bin/python3 meson.noarch: E: non-executable-script /usr/lib/python3.5/site-packages/mesonbuild/scripts/meson_benchmark.py 644 /usr/bin/python3 meson.noarch: E: non-executable-script /usr/lib/python3.5/site-packages/mesonbuild/scripts/meson_exe.py 644 /usr/bin/python3 meson.noarch: E: non-executable-script /usr/lib/python3.5/site-packages/mesonbuild/scripts/symbolextractor.py 644 /usr/bin/python3 meson.noarch: E: non-executable-script /usr/lib/python3.5/site-packages/mesonbuild/scripts/commandrunner.py 644 /usr/bin/python3 meson.noarch: E: non-executable-script /usr/lib/python3.5/site-packages/mesonbuild/scripts/gtkdochelper.py 644 /usr/bin/python3 meson.noarch: E: non-executable-script /usr/lib/python3.5/site-packages/mesonbuild/scripts/meson_install.py 644 /usr/bin/python3 meson.noarch: E: non-executable-script /usr/lib/python3.5/site-packages/mesonbuild/scripts/depfixer.py 644 /usr/bin/python3 meson.noarch: E: non-executable-script /usr/lib/python3.5/site-packages/mesonbuild/scripts/dirchanger.py 644 /usr/bin/python3 meson.noarch: E: non-executable-script /usr/lib/python3.5/site-packages/mesonbuild/scripts/delwithsuffix.py 644 /usr/bin/python3 meson.noarch: E: non-executable-script /usr/lib/python3.5/site-packages/mesonbuild/scripts/vcstagger.py 644 /usr/bin/python3 Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
2016-12-17gettext: Respect the --subdir argument before the MESON_SUBDIR varThibault Saunier1-1/+3
In the case of subproject we will properly setup the --subdir argument but the MESON_SUBDIR is never adapted and will point to an empty string leading to the following backtrace when building `gst-build`: msgfmt: error while opening "/home/thiblahute/devel/gstreamer/gst-build/af.po" for reading: No such file or directory Traceback (most recent call last): File "/home/thiblahute/devel/gstreamer/gst-build/meson/meson.py", line 37, in <module> sys.exit(main()) File "/home/thiblahute/devel/gstreamer/gst-build/meson/meson.py", line 34, in main return mesonmain.run(launcher, sys.argv[1:]) File "/home/thiblahute/devel/gstreamer/gst-build/meson/mesonbuild/mesonmain.py", line 248, in run sys.exit(run_script_command(args[1:])) File "/home/thiblahute/devel/gstreamer/gst-build/meson/mesonbuild/mesonmain.py", line 236, in run_script_command return cmdfunc(cmdargs) File "/home/thiblahute/devel/gstreamer/gst-build/meson/mesonbuild/scripts/gettext.py", line 111, in run if gen_gmo(src_sub, bld_sub, langs) != 0: File "/home/thiblahute/devel/gstreamer/gst-build/meson/mesonbuild/scripts/gettext.py", line 66, in gen_gmo '-o', os.path.join(bld_sub, l + '.gmo')]) File "/usr/lib/python3.5/subprocess.py", line 581, in check_call raise CalledProcessError(retcode, cmd) subprocess.CalledProcessError: Command '['msgfmt', '/home/thiblahute/devel/gstreamer/gst-build/af.po', '-o', '/home/thiblahute/devel/gstreamer/gst-build/build/af.gmo']' returned non-zero exit status 1 Failed to run install script: /usr/bin/python3 /home/thiblahute/devel/gstreamer/gst-build/meson/meson.py --internal gettext install --subdir=subprojects/gstreamer/po --localedir=share/locale --pkgname=gstreamer-1.0 --langs=af@@az@@be@@bg@@ca@@cs@@da@@de@@el@@en_GB@@eo@@es@@eu@@fi@@fr@@gl@@hr@@hu@@id@@it@@ja@@lt@@nb@@nl@@pl@@pt_BR@@ro@@ru@@rw@@sk@@sl@@sq@@sr@@sv@@tr@@uk@@vi@@zh_CN@@zh_TW FAILED: install '/usr/bin/python3' '/home/thiblahute/devel/gstreamer/gst-build/meson/meson.py' '--internal' 'install' '/home/thiblahute/devel/gstreamer/gst-build/build/meson-private/install.dat'
2016-12-12gnome.gtkdoc(): Include builddir variant of include dirs alsoPatrick Griffis1-1/+9
This avoids the need for users to constantly join paths themselves as this is commonly included.
2016-12-11Use universal_newlines=True for all Popen callsNirbheek Chauhan4-32/+23
Instead of adding it everywhere manually, create a wrapper called mesonlib.Popen_safe and use that everywhere that we call an executable and extract its output. This will also allow us to tweak it to do more/different things if needed for some locales and/or systems. Closes #1079
2016-12-06Merge pull request #1086 from Keruspe/masterJussi Pakkanen1-3/+13
Allow specifying some toolchain executables using env
2016-12-06Merge pull request #1151 from mesonbuild/tingping/gtk-docJussi Pakkanen1-14/+34
gnome: Various improvements to gtkdoc
2016-12-06gnome.gtkdoc(): Add keyword to override the modePatrick Griffis1-7/+24
I'm not entirely sure if you ever want to mix and match but I can say that glib required none of them to be passed so this allows for that.
2016-12-07misc: Use relative imports everywhereNirbheek Chauhan5-9/+9
Using 'mesonbuild' as the module can cause it to use the system-installed module and can also break if we rename the directory, so avoid that by always using relative imports.
2016-12-06i18n: Improve language handlingPatrick Griffis1-1/+20
- Fix LINGUAS changes not being picked up - Fix multiple langs per line in LINGUAS - Make empty languages acceptable Fixes #1127
2016-12-06gnome.gtkdoc(): Add namespace keywordPatrick Griffis1-2/+6
2016-12-06gnome.gtkdoc(): Allow passing multiple source dirsPatrick Griffis1-7/+6
This is valid and used by glib for example.
2016-12-06gnome.gtkdoc(): Fix including doc source dir in pathPatrick Griffis1-1/+1
2016-12-05allow overriding nm with NMMarc-Antoine Perennou1-1/+6
Signed-off-by: Marc-Antoine Perennou <Marc-Antoine@Perennou.com>
2016-12-05allow overriding readelf with READELFMarc-Antoine Perennou1-2/+7
Signed-off-by: Marc-Antoine Perennou <Marc-Antoine@Perennou.com>
2016-11-18All testing is now in mesontest.py, which simplifies a lot of stuff.Jussi Pakkanen2-324/+0
2016-11-18Made Meson test into a class rather than abusing global variables and as ↵Jussi Pakkanen1-178/+174
preparation for moving it elsewhere.
2016-11-18Run all tests if none are specified.Jussi Pakkanen1-4/+5
2016-11-18Use the same code for tests and benchmarks.Jussi Pakkanen2-89/+30
2016-11-18Removed Valgrind from core.Jussi Pakkanen1-4/+1
2016-11-18New test runner.Jussi Pakkanen1-1/+1
2016-11-13Use portable path separator in wrappers.Elliott Sales de Andrade2-2/+4
The semicolon only separates paths on Windows, but the wrapper is sometimes used on other platforms.
2016-11-12Fixed SyntaxError in itstool invocation in yelphelper.py duringOlexa Bilaniuk1-4/+3
installation. During a `python3.4 setup.py install`, the yelphelper.py script errors out with: "SyntaxError: can use starred expression only as assignment target". Fix this problem.
2016-11-12scripts/gtkdochelper: ignore_headers is a listNirbheek Chauhan1-4/+5
Also, only add it if it's defined. Closes #1020
2016-11-10vs backend: coredata.meson_script_file was renamedNirbheek Chauhan1-1/+1
2016-11-09Can specify scan-build executable with an environment variable. Closes #1015.Jussi Pakkanen1-6/+7
2016-11-08Implement mlog.warning and use it everywhere for warningsNirbheek Chauhan1-1/+1
Prepends the string with 'WARNING:' in ANSI yellow. Closes https://github.com/mesonbuild/meson/issues/961
2016-11-02gettext: Use argparse to handle argumentsPatrick Griffis1-26/+28
2016-11-01gtkdoc: Add `ignore_headers` positional argumentEmmanuele Bassi1-3/+6
Not all headers are public, or contain public types. GTK-Doc allows adding headers to be ignored during the "scan" phase, by passing the `--ignore-headers` command line argument to gtkdoc-scan. Currently, you can do something like: ignored_headers = [ 'foo-private.h', 'bar-private.h', ] gnome.gtkdoc(... scan_args: [ '--ignore-headers=' + ' '.join(ignored_headers), ], ...) But it does not guarantee escaping rules and it's definitely not nice. We can add a simpler version of that mechanism through a new positional argument, `ignore_headers`, which behaves like `content_files` or `html_assets`, and takes an array of header files to ignore: gnome.gtkdoc(... ignore_headers: ignored_headers, ...)
2016-11-01gtkdochelper: Add 'overrides.txt' to the content filesEmmanuele Bassi1-0/+4
If a `<modulename>-overrides.txt` file exists in the docs directory it means it's intended to be used in place of the one gtk-doc generates. GLib and GTK+, for instance, ship with one because some of the types they provide — like the thread primitives, or the platform macros — contain architecture-dependent fields that should not be accessed directly. This commit should close the last bit of issue #550.
2016-10-24Fix depfixer on MIPS.Aurelien Jarno1-0/+6
2016-10-23gettext: Add update-po targetPatrick Griffis1-0/+16
For each project this creates a <project>-update-po target. When ran this updates the pot file and then merges it back into the po files in the source directory with `msgmerge` for project maintainers and translators. Fixes #819
2016-10-19gnome: Add yelp() functionPatrick Griffis1-0/+118
Fixes #881 Mentioned in #295
2016-10-19gnome: Include build dir in gtkdoc-mkhtml pathPatrick Griffis1-1/+1