summaryrefslogtreecommitdiff
path: root/mesonbuild/interpreter.py
Commit message (Collapse)AuthorAgeFilesLines
...
* Support file perms for install_data and install_subdirNirbheek Chauhan2017-01-241-6/+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.
* cleanup: Remove redundant parenthesesMike Sinkovsky2017-01-181-3/+3
|
* cleanup: Unused local variablesMike Sinkovsky2017-01-181-8/+5
|
* Can use targets directly in test arguments.Jussi Pakkanen2017-01-151-4/+8
|
* mesontest: Improve test suite selection.Hemmo Nieminen2017-01-121-8/+8
| | | | | Suite option can now be given to specify in more detail which tests should be run.
* style: [E1**] IndentationMike Sinkovsky2017-01-111-2/+2
|
* style: [E303] too many blank lines (2)Mike Sinkovsky2017-01-111-1/+0
|
* style: [E711] comparison to None should be 'if cond is None:'Mike Sinkovsky2017-01-111-1/+1
|
* style: [E502] the backslash is redundant between bracketsMike Sinkovsky2017-01-111-5/+5
|
* Add .find_python() method. Supersedes #777.Jussi Pakkanen2017-01-091-3/+8
|
* There are two different kinds of extensions: modules that create newJussi Pakkanen2017-01-091-14/+16
| | | | objects directly and snippets that just call into interpreter methods.
* Created a Python 3 module for simpler building of Python extension modules.Jussi Pakkanen2017-01-091-20/+34
|
* Merge pull request #1278 from mesonbuild/newmodulesJussi Pakkanen2017-01-091-29/+47
|\ | | | | Bring some order to modules
| * Fix Gnome module.Jussi Pakkanen2017-01-091-27/+17
| |
| * Fix a few more modules.Jussi Pakkanen2017-01-061-7/+28
| |
| * Create a module return value object.Jussi Pakkanen2017-01-041-2/+9
| |
* | Can get values in ConfigurationData objects.Jussi Pakkanen2017-01-061-1/+12
|/
* Merge pull request #1260 from mesonbuild/subproj_defaultsJussi Pakkanen2017-01-031-11/+48
|\ | | | | Can set subproject option defaults from command line and master project
| * Support default_options in dependency() fallbacks.Jussi Pakkanen2017-01-021-1/+6
| |
| * Can override project option default values in subproject().Jussi Pakkanen2016-12-291-3/+28
| |
| * Can set project options (but not global options) in subproject default options.Jussi Pakkanen2016-12-291-2/+8
| |
| * Move option file parsing to after the project() inputs have been decoded to ↵Jussi Pakkanen2016-12-291-6/+7
| | | | | | | | access default options.
* | fix 'unreachable code' warningsMike Sinkovsky2017-01-031-1/+0
| |
* | Can put external programs to test suite exe wrappers directly.Jussi Pakkanen2017-01-021-1/+15
| |
* | Can set envvars in test setups.Jussi Pakkanen2017-01-021-1/+4
| |
* | Can specify test setups and run them with mesontest.Jussi Pakkanen2017-01-021-18/+46
| |
* | style: fix E124 violationsIgor Gnatenko2017-01-011-9/+9
| | | | | | | | | | | | E124: closing bracket does not match visual indentation Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
* | style: fix E128 violationsIgor Gnatenko2017-01-011-5/+5
| | | | | | | | | | | | E128: continuation line under-indented for visual indent Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
* | Fix space before :.Jussi Pakkanen2016-12-311-104/+104
|/
* Can specify include directories to compiler tests.Jussi Pakkanen2016-12-231-0/+9
|
* Add Generator.process_files to reduce code duplication.Elliott Sales de Andrade2016-12-221-4/+3
|
* Merge pull request #1233 from mesonbuild/wip/ignatenko/code-styleJussi Pakkanen2016-12-211-11/+10
|\ | | | | Trivial cleanups in code
| * tree-wide: use proper 'not in' notationIgor Gnatenko2016-12-191-9/+9
| | | | | | | | | | | | Let's be more pythonic and 'not is' seems really weird. Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
| * interpreter: remove duplicated dictionary keyIgor Gnatenko2016-12-191-1/+0
| | | | | | | | Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
| * tree-wide: remove unused importsIgor Gnatenko2016-12-191-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ./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>
* | Cache the scripts used for postconf and install phasesNirbheek Chauhan2016-12-201-13/+21
| | | | | | | | | | | | | | | | | | | | | | Cache the absolute dir that the script is searched in and the name of the script. These are the only two things that change. Update the test to test for both #1235 and the case when a script of the same name is in a different directory (which also covers the subproject case). Closes #1235
* | Fix several more lint errorsNirbheek Chauhan2016-12-201-5/+5
|/ | | | | | | | | | | | | | | | | | | Found by Igor Gnatenko ************* Module mesonbuild.interpreter E:1232,33: No value for argument 'interp' in constructor call (no-value-for-parameter) ************* Module mesonbuild.dependencies E: 68, 4: An attribute defined in mesonbuild.dependencies line 39 hides this method (method-hidden) ************* Module mesonbuild.environment E: 26, 0: class already defined line 19 (function-redefined) E: 68,18: Undefined variable 'InterpreterException' (undefined-variable) E:641,39: Undefined variable 'want_cross' (undefined-variable) E:850,94: Undefined variable 'varname' (undefined-variable) E:854,94: Undefined variable 'varname' (undefined-variable) E:860,102: Undefined variable 'varname' (undefined-variable) E:863,94: Undefined variable 'varname' (undefined-variable) ************* Module mesonbuild.modules.gnome E:438,26: Undefined variable 'compilers' (undefined-variable)
* s/Nonexistant/Nonexistent/gIgor Gnatenko2016-12-181-1/+1
| | | | | | | | | There is basically no such word in english, "nonexistant". American people use "nonexistent" and British people used to have "non-existent", but some time ago they did away with the hyphens, so there is only one option really: "nonexistent". Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
* Allow passing arguments to install scriptsNirbheek Chauhan2016-12-181-12/+12
| | | | Closes #1213
* Revert "Merge pull request #1145 from AlexandreFoley/wrap-fix"Jussi Pakkanen2016-12-151-3/+2
| | | | | This reverts commit 541dd92ef7a10b0f657f3c8532ffb71a8d921f54, reversing changes made to 155617e539a9aeccda6bd186398123b9d5521ed4.
* Merge pull request #1171 from ↵Jussi Pakkanen2016-12-131-7/+5
|\ | | | | | | | | centricular/fix-extracted-generated-prebuilt-object-targets-linking Several fixes to how we handle objects in build targets
| * Use dict for self.build.compilers instead of listNirbheek Chauhan2016-12-131-7/+5
| | | | | | | | | | | | Everywhere we use this object, we end up iterating over it and comparing compiler.get_language() with something. Using a dict is the obvious choice and simplifies a lot of code.
* | Merge pull request #1184 from centricular/cc.prefixes_underscoreJussi Pakkanen2016-12-131-0/+8
|\ \ | |/ |/| Add a new compiler function 'symbols_have_underscore_prefix'
| * New compiler function 'symbols_have_underscore_prefix'Nirbheek Chauhan2016-12-131-0/+8
| | | | | | | | | | | | | | | | | | | | Check if the compiler prefixes an underscore to global symbols. This is useful when linking to compiled assembly code, or other code that does not have its C symbol mangling handled transparently by the compiler. C symbol mangling is platform and architecture dependent, and a helper function is needed to detect it. Eg: Windows 32-bit prefixes underscore, but 64-bit does not. Linux does not prefix an underscore but OS X does.
* | Add Compiler.has_multi_arguments method.Elliott Sales de Andrade2016-12-121-0/+14
|/ | | | It allows checking if a compiler supports a multi-argument option.
* Use universal_newlines=True for all Popen callsNirbheek Chauhan2016-12-111-16/+5
| | | | | | | | | | | 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
* Merge pull request #1126 from mesonbuild/sharedmoduleJussi Pakkanen2016-12-071-0/+14
|\ | | | | Support for shared modules
| * Skip shared module test on VS because it fails for some reason nobody ↵Jussi Pakkanen2016-12-071-0/+4
| | | | | | | | understands.
| * Created new shared module build target type, and make sure ↵Jussi Pakkanen2016-12-021-0/+10
| | | | | | | | -Wl,--no-undefined is not used when linking it.
* | misc: Use relative imports everywhereNirbheek Chauhan2016-12-071-4/+4
| | | | | | | | | | | | 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.