Commit Graph

33 Commits

Author SHA1 Message Date
Jussi Pakkanen 998892ed29 Updated all modules to work with the new API. 2018-04-15 13:32:38 +05:30
Martin Kelly 02bea7d5bf namespace run_targets by subproject
Currently, run_target does not get namespaced for each subproject,
unlike executable and others. This means that two subprojects sharing
the same run_target name cause meson to crash.

Fix this by moving the subproject namespacing logic from the BuildTarget
class to the Target class.
2017-10-31 01:04:38 +02:00
Jussi Pakkanen be0aa7fd74 Merge pull request #2357 from LukeShu/flake8
Bring into compliance with flake8
2017-09-22 21:33:34 +03:00
Luke Shumaker 4dbbb4884c flake8: Clean up complained-about unused imports
This also adds a "# noqa: F401" comment on an unused "import lzma",
which we are using it in a try/except block that is being used to
check if the lzma module is importable; of course it is unused.

v2: This turned out to be a little tricky.

    mesonbuild/modules/__init__.py had the "unused" import:

        from ..interpreterbase import permittedKwargs, noKwargs

    However, that meant that the various modules could do things like:

        from . import noKwargs # "." is "mesonbuild.modules"

    Which breaks when you remove __init__.py's "unused" import.  I
    could have tagged that import with "# noqa: F401", but instead I
    chose to have each of the module import directly from
    "..interpreterbase" instead of ".".
2017-09-21 13:41:03 -04:00
Luke Shumaker bb25260f00 flake8: Perform suggested whitespace/formatting changes
This only touches newlines, spaces, and (occaisionally) commas.  Anything
else is left for another commit.
2017-09-21 11:59:03 -04:00
Corentin Noël 3e6c3ea10c Change ternary to another argument 2017-09-20 20:34:20 +02:00
Corentin Noël 6a2926870c Add 'install' keyword to the gettext macro 2017-09-20 20:17:59 +02:00
Jussi Pakkanen 50fb7d37ab Make all functionality invokable via the main Meson binary,
which can be a Windows .exe file.
2017-08-18 12:08:20 +03:00
Iñigo Martínez b43f4841ba i18n: Fixed gettext permitted Kwargs list 2017-07-20 12:28:45 +03:00
Jussi Pakkanen 3262be23dc Fixed issues raised in review. 2017-06-26 23:29:42 +03:00
Jussi Pakkanen 80d665e8de Converted some modules. 2017-06-26 21:10:27 +03:00
Patrick Griffis 12504b2385 i18n: Fix handling relative data_dirs 2017-04-29 04:05:20 -04:00
Patrick Griffis 82492f5d76 i18n: Add data_dirs kwarg to merge_file()
For parity with gettext()

Fixes #1565
2017-04-29 04:05:20 -04:00
Jussi Pakkanen fbabe8ad85 There are two different kinds of extensions: modules that create new
objects directly and snippets that just call into interpreter methods.
2017-01-09 21:11:48 +02:00
Jussi Pakkanen 570c9b150b Fix a few more modules. 2017-01-06 19:22:56 +02:00
Jussi Pakkanen 56e2c46ce1 Merge pull request #1272 from mesonbuild/ignatenko/lint
fix some linting errors
2017-01-03 16:04:24 -05:00
Jussi Pakkanen 027af6b064 Error out if trying to do gettext without appropriate tools. 2017-01-03 15:10:38 -05:00
Igor Gnatenko cdd05aa5dc style: fix E241 violations
E241: multiple spaces after ','

Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
2017-01-02 19:12:52 +01:00
Jussi Pakkanen a2528a8816 Merge pull request #1233 from mesonbuild/wip/ignatenko/code-style
Trivial cleanups in code
2016-12-21 00:09:44 +02:00
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
2016-12-20 00:09:02 +02:00
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>
2016-12-19 21:48:35 +01:00
Nirbheek Chauhan c693bd9bb4 Allow passing arguments to install scripts
Closes #1213
2016-12-18 18:30:47 +02:00
Patrick Griffis 155617e539 i18n: Improve language handling
- Fix LINGUAS changes not being picked up
- Fix multiple langs per line in LINGUAS
- Make empty languages acceptable

Fixes #1127
2016-12-06 20:29:20 +02:00
Patrick Griffis acb0a38aac i18n: Add preset kwarg
Many frameworks, such as glib, provide translation functions and
functions that take format strings. As such every application using
these must duplicate the gettext arguments to function properly.

This reduces that duplication and improves correctness so they are
not left out.

Fixes #1123
2016-12-03 21:01:48 +02:00
Patrick Griffis 7d68715297 i18n: Add merge_file function
This is a repeated task that we can simplify

Closes #1120
2016-12-03 21:00:20 +02:00
Patrick Griffis e4a755ba92 i18n: Read languages from LINGUAS file
This avoids duplicating a list and allows the translation
maintainers to not have to modify the build system.

Mentioned in #1115
2016-12-02 22:40:12 +02:00
Patrick Griffis 314eb5110e gettext: Use argparse to handle arguments 2016-11-02 13:54:57 -07:00
Patrick Griffis 423c8dbb40 gettext: Add update-po target
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-23 08:46:48 -07:00
Patrick Griffis f30be6fb92 gettext: Add ability to set GETTEXTDATADIRS
Some projects use this to allow using local its files
2016-10-16 17:54:16 +03:00
Jussi Pakkanen 0733c0f9a1 Changed run_target to take command as kwarg and add depends. This makes it behave the same as custom_target. 2016-06-24 23:07:57 +03:00
Jussi Pakkanen 3b3c05f6b1 Can pass extra args to xgettext. Closes #554. 2016-05-26 01:09:37 +03:00
Jussi Pakkanen dc148e0702 Remove all special casing for gettext and use elementary operations instead. 2016-05-21 18:21:23 +03:00
Jussi Pakkanen 12a4e7d7e7 Moved gettext into i18n module. 2016-03-28 20:15:16 +03:00