aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/scripts/yelphelper.py
AgeCommit message (Collapse)AuthorFilesLines
2021-03-04mass rewrite of string formatting to use f-strings everywhereEli Schwartz1-3/+3
performed by running "pyupgrade --py36-plus" and committing the results
2020-09-08typing: fully annotate scriptsDaniel Mensinger1-6/+8
2020-08-20simplify shutil usage by invoking copy2 where appropriateEli Schwartz1-2/+1
It's equivalent to copyfile + copystat with the same arguments.
2019-06-06gnome.yelp(): Fix media symlink fallback pathChristoph Reiter1-2/+4
When the media file for a specific language doesn't exist we try to symlink it to the C one. If symlinking fails we need to fall back to copying the C one like in the non-symlink case. The fallback code path didn't set the source so this always failed. Also check if the C fallback exists before trying to symlink/copy, otherwise we crash if C isn't the first lang we try.
2018-03-19Create a helper for checking if a string has a path componentNirbheek Chauhan1-2/+3
This is used in a number of places, and in some places it is incomplete. Use a helper to ensure it's used properly.
2017-08-18Re-use gettext.read_linguas in yelphelperEmmanuele Bassi1-16/+1
2017-08-18Support LINGUAS for gnome.yelp() languagesEmmanuele Bassi1-0/+19
Listing all languages inside meson.build for the Yelp-based manual localisation is error-prone, and it also requires parsing and modifying Meson files from external tools. Just like we do for i18n, we can use an ancillary `LINGUAS` file in the help source sub-directory to list all the help languages.
2017-06-09gnome.yelp(): Handle file existing on symlinkPatrick Griffis1-1/+5
Fixes #1921
2017-06-09gnome.yelp(): Handle platforms where symlink not supportedPatrick Griffis1-2/+5
2017-06-09gnome.yelp(): Make copies of media files when symlink is falsePatrick Griffis1-1/+5
2017-04-19Drop terminating fullstop from "Installing blah to blah" messagesPeter Hutterer1-2/+2
Grammatically, this full stop isn't needed and with file names it has a potential to be confusing: Installing /foo/bar/filename.1 to /foo/bar/dirname. The full stop caused me to do a double-take more than once, so let's drop it.
2017-01-01style: fix E226 violationsIgor Gnatenko1-2/+2
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-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 Gnatenko1-1/+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 Gnatenko1-2/+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>
2016-12-18remove shebangs from scriptsIgor Gnatenko1-1/+1
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-07misc: Use relative imports everywhereNirbheek Chauhan1-3/+3
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-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-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-10-19gnome: Add yelp() functionPatrick Griffis1-0/+118
Fixes #881 Mentioned in #295