Tim-Philipp Müller
80f870c4bb
gnome: fix genmarshal .c file generation
...
The .c file shouldn't contain the header bits as well.
8 years ago
Patrick Griffis
a795ea3cd4
gnome.genmarshal: Use --output when available
...
This is just cleaner and works around #1417
8 years ago
Nirbheek Chauhan
438f219864
gnome: Pass ExternalProgram objects to CustomTarget
...
There is no need to do obj.get_command() and in fact it's wrong
because the VS backends need to resolve each object to absolute paths
and get_command() does not do that.
This should fix invocation of GNOME module helpers with the VS backends
For the record, absolute paths for programs are needed because the
same PATH environment won't necessarily be available to Visual Studio
when it builds the generated solution.
Related to https://github.com/mesonbuild/meson/issues/1419
8 years ago
Elliott Sales de Andrade
7c5de87656
Raise if gobject-introspection is not found.
...
This used to produce a warning, but then would crash anyway. It's
simpler if we just error out and have the user disable gir generation or
install gobject-introspection.
8 years ago
Nirbheek Chauhan
dabf0c1882
gnome: Support configure_file() output in compile_resources
...
We can't support generated XML files with custom_target() because the
dependency scanning happens at configure time, but we *can* support
generating them with configure_file().
Closes https://github.com/mesonbuild/meson/issues/1380
8 years ago
Nirbheek Chauhan
1f0319c288
gnome: Document why we need absolute paths for mkenums
...
I forgot why this was needed and had to dig through the git logs.
Link to the GitHub issue for future reference.
8 years ago
Nirbheek Chauhan
a6c71c62c8
gnome: Print an error message when generated files are passed to compile_resources
8 years ago
Nirbheek Chauhan
8c8ad2cc49
rpm: Fix missing parenthesis and quotation mark
...
Pointed out by Mike Sinkovsky
8 years ago
Nirbheek Chauhan
af85d0e65e
gnome: Fix minimum gresource dependency required
...
This is the latest release of glib that exists and has the required
dependency-generation fixes.
Without this GNOME Recipes cannot even configure.
8 years ago
Nirbheek Chauhan
577a3591c9
gnome: Only check gresource version with CustomTargets
...
We don't need dependencies to work correctly to use the output of
configure_file in the dependencies: kwarg.
This allows GNOME Recipes to built without the latest glib git.
8 years ago
Nirbheek Chauhan
2478bb144d
rpm: We no longer provide the full path to a library
...
Ever since we changed how we do library searching, the full path to the
library has not been available under `.fullpath`. This has been broken
for at least a year...
8 years ago
Nirbheek Chauhan
7e805a019a
find_program: Fix implementation of .path()
...
And actually test that prog.path() works. The earlier test was just
running the command without checking if it succeeded.
Also make everything use prog.get_command() or get_path() instead of
accessing the internal member prog.fullpath directly.
8 years ago
Thibault Saunier
00251f16b6
gnome: Do not use gir specific `--extra-lib` to generate gtkdoc args
...
Fixes 1372
8 years ago
Mike Sinkovsky
77515ee541
style: [E303] too many blank lines (2)
8 years ago
Mike Sinkovsky
84902cb93a
style: [E301] expected 1 blank line, found 0
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
570c9b150b
Fix a few more modules.
8 years ago
Jussi Pakkanen
de24fddbd1
Create a module return value object.
8 years ago
Jussi Pakkanen
027af6b064
Error out if trying to do gettext without appropriate tools.
8 years ago
Igor Gnatenko
ef3cc6b3fa
style: fix E127 violations
...
E127: continuation line over-indented for visual indent
Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
8 years ago
Igor Gnatenko
cdd05aa5dc
style: fix E241 violations
...
E241: multiple spaces after ','
Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
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
Igor Gnatenko
5693758e46
style: fix E231 violations
...
E231: missing whitespace after ','
Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
8 years ago
Igor Gnatenko
ef608f217d
style: fix E222 violations
...
E222: multiple spaces after operator
Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
8 years ago
Igor Gnatenko
2017d8578a
style: fix E226 violations
...
E226: missing whitespace around arithmetic operator
Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
8 years ago
Igor Gnatenko
f0b30baa39
style: fix E225 violations
...
E225: missing whitespace around operator
Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
8 years ago
Jussi Pakkanen
b55235dfbd
Fix space before :.
8 years ago
Elliott Sales de Andrade
157549fe72
Add include_directories to windows.compile_resources.
8 years ago
Elliott Sales de Andrade
24b3585318
Move _get_include_args from gnome to modules.
8 years ago
Elliott Sales de Andrade
18c38df875
Add Generator.process_files to reduce code duplication.
8 years ago
Nirbheek Chauhan
0ac965cc10
Fix shared library symlink aliasing on install
...
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.
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
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
d5ccd20aac
fix some of pylint's undefined-variable
...
************* Module mesonbuild.modules.rpm
E:106,29: Unsupported format character '{' (0x7b) at index 16 (bad-format-character)
************* Module mesonbuild.modules
E: 12,14: Undefined variable 'MesonException' (undefined-variable)
************* Module mesonbuild.modules.gnome
E:699,69: Undefined variable 'sargs' (undefined-variable)
************* Module mesonbuild.wrap.wrap
E:103,25: Undefined variable 'checkoutdir' (undefined-variable)
************* Module mesonbuild.backend.backends
E: 83,16: Undefined variable 'mlog' (undefined-variable)
************* Module mesonbuild.backend.ninjabackend
E:254,105: Undefined variable 't' (undefined-variable)
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
Nirbheek Chauhan
eaafca6f4a
Qt: Allow passing a name arg to preprocess()
...
This sets a unique name for the CustomTarget and the output cpp file.
Closes #959
8 years ago
Nirbheek Chauhan
59b8f11e7e
gnome: Re-use gobject-introspection-1.0 pkg-config dependency
...
Also don't use `dependencies` as a module name since it is commonly used
as a variable name too. Instead, directly import the classes that we use
from that module.
8 years ago
Nirbheek Chauhan
5e5b3f00d8
modules: Cache programs found by find_program
...
This avoids printing several 'Found:' messages during configure, and
also avoids doing several searches for the same binary. This is already
done by the interpreter for `find_program` calls from build files.
Also move it to the module-wide __init__.py file so it can be used by
other modules as-needed.
Also use it for g-ir-scanner where it was missed in one place, also fix
exception name in the same place.
8 years ago
Nirbheek Chauhan
d5f7ba862b
gnome.mkenums: Use absolute paths for all commandline args
...
Closes #973
test cases/vala/8 generated sources/ tests this.
8 years ago
Nirbheek Chauhan
e6f48a03fc
Allow all code to access module target classes
...
It is often useful to be able to check if a specific object is of a type
defined in a module. To that end, define all such targets in
modules/__init__.py so that everyone can refer to them without poking
into module-specific code.
8 years ago
Nirbheek Chauhan
79f6626867
Pass --gresources to valac for each compiled gresource
...
Without this, the user has to both compile the resource with
gnome.compile_resources, pass that to the target sources, and also
pass --gresources=/path/to/gres.xml to vala_args in the target.
With this, we will do that automatically.
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
Patrick Griffis
c42167dc6f
gnome.gtkdoc(): Include builddir variant of include dirs also
...
This avoids the need for users to constantly join paths themselves
as this is commonly included.
8 years ago