<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/meson.git/mesonbuild/scripts/gettext.py, branch thinlto</title>
<subtitle>github.com: mesonbuild/meson.git
</subtitle>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/meson.git/'/>
<entry>
<title>typing: fully annotate scripts</title>
<updated>2020-09-08T18:15:56+00:00</updated>
<author>
<name>Daniel Mensinger</name>
<email>daniel@mensinger-ka.de</email>
</author>
<published>2020-08-29T19:23:43+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/meson.git/commit/?id=a4f4379c44c7f13bc9e44bc01504077af1f3a338'/>
<id>a4f4379c44c7f13bc9e44bc01504077af1f3a338</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>simplify shutil usage by invoking copy2 where appropriate</title>
<updated>2020-08-20T20:47:54+00:00</updated>
<author>
<name>Eli Schwartz</name>
<email>eschwartz@archlinux.org</email>
</author>
<published>2020-08-20T14:13:43+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/meson.git/commit/?id=86b47250c61bd373a3d28dd05a4a231564b1bfef'/>
<id>86b47250c61bd373a3d28dd05a4a231564b1bfef</id>
<content type='text'>
It's equivalent to copyfile + copystat with the same arguments.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
It's equivalent to copyfile + copystat with the same arguments.
</pre>
</div>
</content>
</entry>
<entry>
<title>gettext: prefer POTFILES.in if it exists</title>
<updated>2019-03-28T21:22:23+00:00</updated>
<author>
<name>Eli Schwartz</name>
<email>eschwartz@archlinux.org</email>
</author>
<published>2019-03-25T18:55:31+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/meson.git/commit/?id=4f9ecbee09a35f13b0dd5a3f9cb4630ec34f5131'/>
<id>4f9ecbee09a35f13b0dd5a3f9cb4630ec34f5131</id>
<content type='text'>
If POTFILES.in exists, then it will have come from autotools, in which
case it is explicitly the file passed to xgettext -f, and the POTFILES
file itself is generated by autotools as a proxy file which eventually
gets inlined into the final Makefile as a variable "POTFILES = ......"

In this case, attempting to use POTFILES as the input file will simply
result in syntax errors and the inability to find files with a literal
trailing " \" in the name. Usually POTFILES will not exist at all, and
we would fallback on POTFILES.in, but if the source tree happens to be
dirty, this would result in errors. Since it's never going to be right
to use it, we can just do the right thing from the start and carry on.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
If POTFILES.in exists, then it will have come from autotools, in which
case it is explicitly the file passed to xgettext -f, and the POTFILES
file itself is generated by autotools as a proxy file which eventually
gets inlined into the final Makefile as a variable "POTFILES = ......"

In this case, attempting to use POTFILES as the input file will simply
result in syntax errors and the inability to find files with a literal
trailing " \" in the name. Usually POTFILES will not exist at all, and
we would fallback on POTFILES.in, but if the source tree happens to be
dirty, this would result in errors. Since it's never going to be right
to use it, we can just do the right thing from the start and carry on.
</pre>
</div>
</content>
</entry>
<entry>
<title>gettext: Install .mo files atomically</title>
<updated>2018-06-06T21:18:21+00:00</updated>
<author>
<name>Philip Chimento</name>
<email>philip@endlessm.com</email>
</author>
<published>2018-06-05T20:47:01+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/meson.git/commit/?id=d9efee01d0dc08f8e41ef1f0dd239113309135a1'/>
<id>d9efee01d0dc08f8e41ef1f0dd239113309135a1</id>
<content type='text'>
Without this, building a module in a Flatpak app manifest that is a
newer version of a module already present in the Flatpak runtime will
fail. (The Flatpak file system is a bunch of hard links to readonly
files, which can be replaced but not written to.)

This instead creates a temporary file in the same directory as the
destination (to avoid cross-device renaming errors) and atomically
renames the temporary file to the destination, replacing it instead of
rewriting it as shutil.copyfile() would do.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Without this, building a module in a Flatpak app manifest that is a
newer version of a module already present in the Flatpak runtime will
fail. (The Flatpak file system is a bunch of hard links to readonly
files, which can be replaced but not written to.)

This instead creates a temporary file in the same directory as the
destination (to avoid cross-device renaming errors) and atomically
renames the temporary file to the destination, replacing it instead of
rewriting it as shutil.copyfile() would do.
</pre>
</div>
</content>
</entry>
<entry>
<title>Use os.path: basename() and dirname() instead of split()</title>
<updated>2018-01-29T20:08:22+00:00</updated>
<author>
<name>Aleksey Filippov</name>
<email>alekseyf@google.com</email>
</author>
<published>2018-01-29T00:10:43+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/meson.git/commit/?id=2cf85ae16f79b5edcbfa34d57b477c984c79e7a5'/>
<id>2cf85ae16f79b5edcbfa34d57b477c984c79e7a5</id>
<content type='text'>
According to Python documentation[1] dirname and basename
are defined as follows:
    os.path.dirname() = os.path.split()[0]
    os.path.basename() = os.path.split()[1]
For the purpose of better readability split() is replaced
by appropriate function if only one part of returned tuple
is used.

[1]: https://docs.python.org/3/library/os.path.html#os.path.split
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
According to Python documentation[1] dirname and basename
are defined as follows:
    os.path.dirname() = os.path.split()[0]
    os.path.basename() = os.path.split()[1]
For the purpose of better readability split() is replaced
by appropriate function if only one part of returned tuple
is used.

[1]: https://docs.python.org/3/library/os.path.html#os.path.split
</pre>
</div>
</content>
</entry>
<entry>
<title>Create the .po file with the `update_po` subcommand if it doesn't exist</title>
<updated>2017-10-07T15:03:22+00:00</updated>
<author>
<name>Corentin Noël</name>
<email>corentin@elementary.io</email>
</author>
<published>2017-10-04T22:12:30+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/meson.git/commit/?id=93d2ced31f9e23491ce010161475956b795a6235'/>
<id>93d2ced31f9e23491ce010161475956b795a6235</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Allow empty extra arguments in gettext script</title>
<updated>2017-06-03T18:31:27+00:00</updated>
<author>
<name>Rene Lopez</name>
<email>rsl@member.fsf.org</email>
</author>
<published>2017-05-31T09:18:31+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/meson.git/commit/?id=94f46447bb22c02b36bd7e789bf060638506687a'/>
<id>94f46447bb22c02b36bd7e789bf060638506687a</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Drop terminating fullstop from "Installing blah to blah" messages</title>
<updated>2017-04-19T13:11:37+00:00</updated>
<author>
<name>Peter Hutterer</name>
<email>peter.hutterer@who-t.net</email>
</author>
<published>2017-04-18T03:47:35+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/meson.git/commit/?id=6a4efe8a82fbbaf49786c44886ccba2855c8fef2'/>
<id>6a4efe8a82fbbaf49786c44886ccba2855c8fef2</id>
<content type='text'>
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.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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.
</pre>
</div>
</content>
</entry>
<entry>
<title>style: fix E127 violations</title>
<updated>2017-01-02T18:16:56+00:00</updated>
<author>
<name>Igor Gnatenko</name>
<email>i.gnatenko.brain@gmail.com</email>
</author>
<published>2017-01-02T18:16:56+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/meson.git/commit/?id=ef3cc6b3fabb1032066e7c8ecfd67dc4e1169193'/>
<id>ef3cc6b3fabb1032066e7c8ecfd67dc4e1169193</id>
<content type='text'>
E127: continuation line over-indented for visual indent

Signed-off-by: Igor Gnatenko &lt;i.gnatenko.brain@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
E127: continuation line over-indented for visual indent

Signed-off-by: Igor Gnatenko &lt;i.gnatenko.brain@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>gettext: Respect the --subdir argument before the MESON_SUBDIR var</title>
<updated>2016-12-17T12:21:27+00:00</updated>
<author>
<name>Thibault Saunier</name>
<email>tsaunier@gnome.org</email>
</author>
<published>2016-12-16T12:26:37+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/meson.git/commit/?id=5b5edd6b3318c0652cdeef0974ed71fdd8f193bd'/>
<id>5b5edd6b3318c0652cdeef0974ed71fdd8f193bd</id>
<content type='text'>
In the case of subproject we will properly setup the --subdir argument
but the MESON_SUBDIR is never adapted and will point to an empty string
leading to the following backtrace when building `gst-build`:

  msgfmt: error while opening "/home/thiblahute/devel/gstreamer/gst-build/af.po" for reading: No such file or directory
  Traceback (most recent call last):
    File "/home/thiblahute/devel/gstreamer/gst-build/meson/meson.py", line 37, in &lt;module&gt;
      sys.exit(main())
    File "/home/thiblahute/devel/gstreamer/gst-build/meson/meson.py", line 34, in main
      return mesonmain.run(launcher, sys.argv[1:])
    File "/home/thiblahute/devel/gstreamer/gst-build/meson/mesonbuild/mesonmain.py", line 248, in run
      sys.exit(run_script_command(args[1:]))
    File "/home/thiblahute/devel/gstreamer/gst-build/meson/mesonbuild/mesonmain.py", line 236, in run_script_command
      return cmdfunc(cmdargs)
    File "/home/thiblahute/devel/gstreamer/gst-build/meson/mesonbuild/scripts/gettext.py", line 111, in run
      if gen_gmo(src_sub, bld_sub, langs) != 0:
    File "/home/thiblahute/devel/gstreamer/gst-build/meson/mesonbuild/scripts/gettext.py", line 66, in gen_gmo
      '-o', os.path.join(bld_sub, l + '.gmo')])
    File "/usr/lib/python3.5/subprocess.py", line 581, in check_call
      raise CalledProcessError(retcode, cmd)
  subprocess.CalledProcessError: Command '['msgfmt', '/home/thiblahute/devel/gstreamer/gst-build/af.po', '-o', '/home/thiblahute/devel/gstreamer/gst-build/build/af.gmo']' returned non-zero exit status 1
  Failed to run install script: /usr/bin/python3 /home/thiblahute/devel/gstreamer/gst-build/meson/meson.py --internal gettext install --subdir=subprojects/gstreamer/po --localedir=share/locale --pkgname=gstreamer-1.0 --langs=af@@az@@be@@bg@@ca@@cs@@da@@de@@el@@en_GB@@eo@@es@@eu@@fi@@fr@@gl@@hr@@hu@@id@@it@@ja@@lt@@nb@@nl@@pl@@pt_BR@@ro@@ru@@rw@@sk@@sl@@sq@@sr@@sv@@tr@@uk@@vi@@zh_CN@@zh_TW
  FAILED: install
  '/usr/bin/python3' '/home/thiblahute/devel/gstreamer/gst-build/meson/meson.py' '--internal' 'install' '/home/thiblahute/devel/gstreamer/gst-build/build/meson-private/install.dat'
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
In the case of subproject we will properly setup the --subdir argument
but the MESON_SUBDIR is never adapted and will point to an empty string
leading to the following backtrace when building `gst-build`:

  msgfmt: error while opening "/home/thiblahute/devel/gstreamer/gst-build/af.po" for reading: No such file or directory
  Traceback (most recent call last):
    File "/home/thiblahute/devel/gstreamer/gst-build/meson/meson.py", line 37, in &lt;module&gt;
      sys.exit(main())
    File "/home/thiblahute/devel/gstreamer/gst-build/meson/meson.py", line 34, in main
      return mesonmain.run(launcher, sys.argv[1:])
    File "/home/thiblahute/devel/gstreamer/gst-build/meson/mesonbuild/mesonmain.py", line 248, in run
      sys.exit(run_script_command(args[1:]))
    File "/home/thiblahute/devel/gstreamer/gst-build/meson/mesonbuild/mesonmain.py", line 236, in run_script_command
      return cmdfunc(cmdargs)
    File "/home/thiblahute/devel/gstreamer/gst-build/meson/mesonbuild/scripts/gettext.py", line 111, in run
      if gen_gmo(src_sub, bld_sub, langs) != 0:
    File "/home/thiblahute/devel/gstreamer/gst-build/meson/mesonbuild/scripts/gettext.py", line 66, in gen_gmo
      '-o', os.path.join(bld_sub, l + '.gmo')])
    File "/usr/lib/python3.5/subprocess.py", line 581, in check_call
      raise CalledProcessError(retcode, cmd)
  subprocess.CalledProcessError: Command '['msgfmt', '/home/thiblahute/devel/gstreamer/gst-build/af.po', '-o', '/home/thiblahute/devel/gstreamer/gst-build/build/af.gmo']' returned non-zero exit status 1
  Failed to run install script: /usr/bin/python3 /home/thiblahute/devel/gstreamer/gst-build/meson/meson.py --internal gettext install --subdir=subprojects/gstreamer/po --localedir=share/locale --pkgname=gstreamer-1.0 --langs=af@@az@@be@@bg@@ca@@cs@@da@@de@@el@@en_GB@@eo@@es@@eu@@fi@@fr@@gl@@hr@@hu@@id@@it@@ja@@lt@@nb@@nl@@pl@@pt_BR@@ro@@ru@@rw@@sk@@sl@@sq@@sr@@sv@@tr@@uk@@vi@@zh_CN@@zh_TW
  FAILED: install
  '/usr/bin/python3' '/home/thiblahute/devel/gstreamer/gst-build/meson/meson.py' '--internal' 'install' '/home/thiblahute/devel/gstreamer/gst-build/build/meson-private/install.dat'
</pre>
</div>
</content>
</entry>
</feed>
