Hemmo Nieminen
b90956c2f2
mesontest: Improve test suite selection.
...
Suite option can now be given to specify in more detail which tests should
be run.
8 years ago
Mike Sinkovsky
5b626ab4cb
style: [E1**] Indentation
8 years ago
Mike Sinkovsky
77515ee541
style: [E303] too many blank lines (2)
8 years ago
Mike Sinkovsky
c8981bdd1b
style: [E711] comparison to None should be 'if cond is None:'
8 years ago
Mike Sinkovsky
e9a891fe25
style: [E502] the backslash is redundant between brackets
8 years ago
Jussi Pakkanen
6ac9a8e738
Add .find_python() method. Supersedes #777 .
8 years ago
Jussi Pakkanen
fbabe8ad85
There are two different kinds of extensions: modules that create new
...
objects directly and snippets that just call into interpreter methods.
8 years ago
Jussi Pakkanen
24221d71cc
Created a Python 3 module for simpler building of Python extension modules.
8 years ago
Jussi Pakkanen
340781c515
Fix Gnome module.
8 years ago
Jussi Pakkanen
00f62d0755
Can get values in ConfigurationData objects.
8 years ago
Jussi Pakkanen
570c9b150b
Fix a few more modules.
8 years ago
Jussi Pakkanen
de24fddbd1
Create a module return value object.
8 years ago
Mike Sinkovsky
079e43f70b
fix 'unreachable code' warnings
8 years ago
Jussi Pakkanen
b3d51abff2
Can put external programs to test suite exe wrappers directly.
8 years ago
Jussi Pakkanen
74f15263b6
Can set envvars in test setups.
8 years ago
Jussi Pakkanen
ee8a6e6fc5
Can specify test setups and run them with mesontest.
8 years ago
Jussi Pakkanen
d94f64ded1
Support default_options in dependency() fallbacks.
8 years ago
Igor Gnatenko
969dc7e995
style: fix E124 violations
...
E124: closing bracket does not match visual indentation
Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
8 years ago
Igor Gnatenko
116da33cdd
style: fix E128 violations
...
E128: continuation line under-indented for visual indent
Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
8 years ago
Jussi Pakkanen
b55235dfbd
Fix space before :.
8 years ago
Jussi Pakkanen
d716d53b32
Can override project option default values in subproject().
8 years ago
Jussi Pakkanen
73042c7912
Can set project options (but not global options) in subproject default options.
8 years ago
Jussi Pakkanen
f85c348b94
Move option file parsing to after the project() inputs have been decoded to access default options.
8 years ago
Jussi Pakkanen
775729eb59
Can specify include directories to compiler tests.
8 years ago
Elliott Sales de Andrade
18c38df875
Add Generator.process_files to reduce code duplication.
8 years ago
Nirbheek Chauhan
589a56e78f
Cache the scripts used for postconf and install phases
...
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
8 years ago
Nirbheek Chauhan
9bc07a0941
Fix several more lint errors
...
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)
8 years ago
Igor Gnatenko
139e020ede
tree-wide: use proper 'not in' notation
...
Let's be more pythonic and 'not is' seems really weird.
Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
8 years ago
Igor Gnatenko
28d4d57756
interpreter: remove duplicated dictionary key
...
Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
8 years ago
Igor Gnatenko
8268eb4959
tree-wide: remove unused imports
...
./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>
8 years ago
Igor Gnatenko
3b55f6de8c
s/Nonexistant/Nonexistent/g
...
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>
8 years ago
Nirbheek Chauhan
c693bd9bb4
Allow passing arguments to install scripts
...
Closes #1213
8 years ago
Jussi Pakkanen
b389f43060
Revert "Merge pull request #1145 from AlexandreFoley/wrap-fix"
...
This reverts commit 541dd92ef7
, reversing
changes made to 155617e539
.
8 years ago
Nirbheek Chauhan
7b3d00fee4
Use dict for self.build.compilers instead of list
...
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.
8 years ago
Nirbheek Chauhan
09f65b7a3c
New compiler function 'symbols_have_underscore_prefix'
...
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.
8 years ago
Elliott Sales de Andrade
ec47db6c0c
Add Compiler.has_multi_arguments method.
...
It allows checking if a compiler supports a multi-argument option.
8 years ago
Nirbheek Chauhan
60716fcd6d
Use universal_newlines=True for all Popen calls
...
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
8 years ago
Jussi Pakkanen
dc1f537fb3
Skip shared module test on VS because it fails for some reason nobody understands.
8 years ago
Nirbheek Chauhan
b9a7c0cf39
misc: Use relative imports everywhere
...
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.
8 years ago
Nirbheek Chauhan
7b8f41ce31
Compiler checks can only accept external dependencies
...
This is already how it should've been, but:
a) The test for this was wrong since Dependency is a base class for all
dependencies and isinstance on an InternalDependency will also be true
b) Internal dependencies can't ever be used here anyway because compiler
checks are always run at configure time and internal dependencies are
only built after that.
8 years ago
Jussi Pakkanen
b28da68faf
Expose project information with mesonintrospect. Closes #1118 .
8 years ago
Nirbheek Chauhan
c7a2664cb7
Better error when passing invalid objects to install_header
...
This will print the object type when you pass a generated file to
install_header instead of printing an assert.
8 years ago
Alexandre Foley
228adaa287
Wrap.py: Made it so using an already downloaded subproject is only for the wrap-file case. Git and Mercurial can update the repository if it the wrap is one.
...
Also did a bit of cleanup.
interpreter.py: There’s a catch all except clause at the line 1928, it didn’t give the user any information whatsoever about the exception it caught. Now it at least print it to the log as a warning.
8 years ago
Jussi Pakkanen
14ca7d602c
Store subdir information for each node so we can remove files set in other subdirectories.
8 years ago
Nirbheek Chauhan
e1c9d94708
Allow many version conditions for pkg-config deps
...
Sometimes we want to restrict the acceptable versions to a list of
versions, or a smallest-version + largest-version, or both. For
instance, GStreamer's opencv plugin is only compatible with
3.1.0 >= opencv >= 2.3.0
8 years ago
Jussi Pakkanen
6d84b9b646
Created new shared module build target type, and make sure -Wl,--no-undefined is not used when linking it.
8 years ago
Jussi Pakkanen
7e1b674704
Add both native and cross compiler options to option list.
8 years ago
Jussi Pakkanen
0250b2cce6
Can give many alternative names to find_program to simplify searching.
8 years ago
Jussi Pakkanen
8f41154827
Can specify headers to install with Files.
8 years ago
Jussi Pakkanen
c41805f012
Moved more stuff, can now parse all of common tests.
8 years ago