1. SCons
  2. Core
  3. SCons
  4. Pull requests

Pull requests

#25 Merged
Deleted repository
default (1c9fa15236b9)

Gettext tool integrated

  1. Paweł Tomulik

This fork contains tools to support gettext utilities. User's manual contains short chapter devoted to theese tools and detailed documentation of new builders and construction variables. End to end tests are provided that cover all examples given in user's manual.

See also small fix within src/engine/Environment.py (FindSourceFiles), so the functions returns final sources only (leafs). I've created for that a test under 'test/FindSourceFiles.py'.

During the development, I've also found and cleaned'up some garbage in test files.

Comments (7)

  1. Gary Oberbrunner

    Hi Paweł; this looks great. Thanks for the good work! There's just one thing I can see that needs doing though; could you make it skip the tests if gettext is not installed? The LaTeX tests do something pretty similar, using code like this:

    gettext = test.where_is('gettext') if not gettext: test.skip_test("Could not find gettext; skipping test(s).\n")


    1. Paweł Tomulik author

      Sure, I'll do that.

      I was also thinking about reorganizing the tests (before it'll be eventually merged). Currently the tests are split over many files (one file per user example in docs), but maybe it would be better if I created just one test file per tool? E.g. POTUpdate.py, POUpdate.py, and so on.

      PS. Is there a chance that this changeset will be merged?

      1. Gary Oberbrunner

        Yes, I was just about to merge this changeset in but the tests fail on Windows (where there is no gettext). With that fix, I see no reason not to merge it in. I like your idea of coalescing the tests into just a few files; if you can do that and update the pull request that would be most excellent. Thanks!

        1. Paweł Tomulik author

          OK, no problem.

          There is also one "feature" missing for the moment. As I've seen, in autotools there is an `autopoint' script, which incorporates all necessary files into project. For example, user may request to copy the gettext library files (in appropriate version) to be copied into project tree, so the application may be linked against local copy of libgettext and work independently of system libraries. I didn't manage to develop such script, because to me it was too hard (too many modifications to developer's scripts). Maybe someone, who knows the internals of SCons development tree better could prepare such thing?

            1. Paweł Tomulik author

              I think, it's only required if we want to have an applications which compiles (with translaitons enabled) on non-GNU platforms. On such platforms libgettext (dev version) may be hardly available (especially as an installable package). We may always try to prepare our project with original GNU `autopoint' script, but this needs files, that are not used in SCons-based projects (configure.ac, ..) and generates files that are also not used (Makefile.in.in, ...). So Scons-based autopoint script would be very handy here. On the other hand .. maybe it would be easier to implement it as SCons tool, not a plain script...

              PS. Is scons.tigris.org still alive?

    2. Paweł Tomulik author


      I've followed your suggestions. 1. Tests are refactored, so now there is one file per tool (the file covers all examples from the tool documentation) 2. Tests are skipped when there is no gettext tools on testing platform.

      There is tarball with generated docs at: https://bitbucket.org/ptomulik/scons/downloads I've added one chapter to user manual, but I'm not sure if it is in appropriate place. Also, I'm not native english speaker, so it would be great if someone could take a look into it and make eventual remarks/corrections.