{ "info": { "author": "Maurits van Rees", "author_email": "m.van.rees@zestsoftware.nl", "bugtrack_url": null, "classifiers": [ "Framework :: Buildout", "Programming Language :: Python", "Topic :: Software Development :: Internationalization" ], "description": "Introduction\n============\n\nThis package compiles po files. It contains a `zest.releaser`_ entry\npoint and a stand-alone command line tool.\n\n\nGoal\n====\n\nYou want to release a package that has a ``locales`` dir (or\n``locale``, or something else as long as it has a ``LC_MESSAGES``\nfolder somewhere in it) with translations in ``.po`` files. You want\nto include the compiled ``.mo`` files in your release as well, but you\ndo not want to keep those in a revision control system (like\nsubversion) as they are binary and can be easily recreated. That is\ngood. This package helps with that.\n\n\nWant ``.mo`` files? Add a ``MANIFEST.in`` file.\n================================================\n\nWhen you use ``python setup.py sdist`` to create a source\ndistribution, distutils (or setuptools or distribute or distutils2)\nknows which files it should include by looking at the information of\nthe revision control system (RCS). This is why in the case of\nsubversion you should use a checkout and not an export: you need the\nversioning information. (For other RCS or for subversion 1.7+ you\ncurrently need to install extra packages like setuptools-git.)\n\nSince the compiled ``.mo`` files are best not stored in subversion (or\nany other RCS), you need to give a hint on which files to include. You\ndo this by adding a ``MANIFEST.in`` file. Let's say your package has\nroughly these contents (not all files are shown)::\n\n your.package/setup.py\n your.package/your/package/locales/nl/LC_MESSAGES/domain.po\n\nThen you need a ``MANIFEST.in`` file like this::\n\n recursive-include your *\n\nOr with a bigger example::\n\n recursive-include your *\n recursive-include docs *\n include *\n global-exclude *.pyc\n\nI will explain the lines one by one for clarity. And yes: I (Maurits)\nnow simply go to this page on PyPI if I want to have an example of a\nproper ``MANIFEST.in`` file, so this documentation is now getting\nslightly larger than strictly needed. :-)\n\n``recursive-include your *``\n This tells distutils to recursively include all (``*``) files and\n directories within the ``your`` directory. Try it: create a directory\n structure like the above example with a proper ``setup.py``, copy the\n ``domain.po`` file to ``domain.mo`` as a silly test, run ``python\n setup.py sdist`` and check that the ``.mo`` file ends up in the\n created distribution.\n\n``recursive-include docs *``\n Include files in the ``docs`` directory. If this directory does not\n exist, you will get a warning, so you may want to remove it then,\n but leaving it there does not hurt.\n\n``include *``\n Include unrecognized files in the root directory. By default only\n standard files like ``README.txt``, ``setup.py``, and ``setup.cfg``\n are included, so for example not a ``CHANGES.txt`` file.\n\n``global-exclude *.pyc``\n\n This avoids unnecessarily adding compiled python files in the release.\n When these are not there, for example after a fresh checkout, you will\n get a harmless warning::\n\n warning: no previously-included files matching '*.pyc' found anywhere in distribution\n\nFor more info on creating a source distribution and how to use\n``MANIFEST.in`` see the `Python documentation`_.\n\n.. _`Python documentation`: http://docs.python.org/distutils/sourcedist.html\n\n\nWith this part working, the only thing this ``zest.pocompile`` package\nneeds to do, is to actually find all ``.po`` files and compile them to\n``.mo`` files. It simply looks for directories that are named\n``LC_MESSAGES`` and compiles all ``.po`` files found in there.\n\n\nCommand line tool\n=================\n\nWhen you ``easy_install zest.pocompile`` you get a command line tool\n``pocompile``. When you run it, this walks the current directory,\nfinds all po translation files in a properly formed locales directory\nand compiles them into mo files. You can also give it a list of\ndirectories as arguments instead. Run it with the ``--help`` option\nto get some help.\n\nIn the above example, if you are in the ``your.package`` directory and\nrun ``pocompile`` it will create this file::\n\n your.package/your/package/locales/nl/LC_MESSAGES/domain.mo\n\n\nzest.releaser entry point\n=========================\n\nYou do not need `zest.releaser`_ for proper functioning of\n``zest.pocompile``. But if you use the two together, in combination\nwith a proper ``MANIFEST.in`` file, releasing a source distribution\nwith compiled ``.mo`` files is made easy.\n\nThe ``release`` (or ``fullrelease``) command of ``zest.releaser``\ncreates a (subversion or other) tag, checks out this tag, creates a\nsource distribution (``sdist``) and uploads it to PyPI. When\n``zest.pocompile`` is added to the mix, it compiles the ``.po`` files\nimmediately after checking out the tag, right in time for creating the\n``sdist``, which should now contain the ``.mo`` files.\n\n\nCredits\n=======\n\nThis package has been cobbled together by Maurits van Rees.\n \nIt depends on the `python-gettext`_ package, which itself suggests\nusing the Babel_ package, but it does exactly what we need and its\nreleases are stored on PyPI, so we ignore that suggestion.\n\nThe main functions are taken from the ``build_mo`` command of\n`collective.releaser`_.\n\nThanks!\n\n\nTo Do\n=====\n\n- Add tests.\n\n\n.. _`zest.releaser`: http://pypi.python.org/pypi/zest.releaser\n.. _`python-gettext`: http://pypi.python.org/pypi/python-gettext\n.. _Babel: http://pypi.python.org/pypi/Babel\n.. _`collective.releaser`: http://pypi.python.org/pypi/collective.releaser\n\nChangelog\n=========\n\n1.4 (2013-07-05)\n----------------\n\n- Moved to https://github.com/zestsoftware/zest.pocompile.\n [maurits]\n\n\n1.3 (2011-12-16)\n----------------\n\n- Fixed the example MANIFEST.in.\n [maurits]\n\n\n1.2 (2011-12-16)\n----------------\n\n- Added a larger example of a MANIFEST.in file in the readme. Also\n add a MANIFEST.in in zest.pocompile itself, so the CHANGES.txt is\n included in the source distribution.\n [maurits]\n\n\n1.1 (2011-12-15)\n----------------\n\n- Look for ``.po`` files in any ``LC_MESSAGES`` directory. It no\n longer matters if this is contained in a language directory within a\n ``locales`` or ``locale`` directory, as they could also have names\n like ``plonelocales`` or ``locales_for_version_2_only``. Note that\n in Plone ``.po`` files can also be in an i18n directory, but those\n should not be compiled; this does not have a ``LC_MESSAGES``\n directory, so we automatically skip it.\n [maurits]\n\n\n1.0 (2010-10-19)\n----------------\n\n- Initial release", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/zestsoftware/zest.pocompile", "keywords": "i18n locales po compile release", "license": "GPL", "maintainer": null, "maintainer_email": null, "name": "zest.pocompile", "package_url": "https://pypi.org/project/zest.pocompile/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/zest.pocompile/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/zestsoftware/zest.pocompile" }, "release_url": "https://pypi.org/project/zest.pocompile/1.4/", "requires_dist": null, "requires_python": null, "summary": "Compile po files when releasing a package", "version": "1.4" }, "last_serial": 809096, "releases": { "1.0": [ { "comment_text": "", "digests": { "md5": "40a20051394cb4d4797de6bab5d51804", "sha256": "61ae3e522e9e2bd66efdba489bfc1eb5107139744931e55325758d1cba97c116" }, "downloads": -1, "filename": "zest.pocompile-1.0.tar.gz", "has_sig": false, "md5_digest": "40a20051394cb4d4797de6bab5d51804", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5194, "upload_time": "2010-10-19T00:41:00", "url": "https://files.pythonhosted.org/packages/71/a7/220bf8f2d91867fb53a72ddb5387b89296b6bd113ca944a2a9918a49ba85/zest.pocompile-1.0.tar.gz" } ], "1.1": [ { "comment_text": "", "digests": { "md5": "f86605f738ba15f2cf87b9a6c4d14d03", "sha256": "3a7ecf42f2af72f7c9447c2a2bfdf1ad88a3d62c212c88176bc490806546731a" }, "downloads": -1, "filename": "zest.pocompile-1.1.tar.gz", "has_sig": false, "md5_digest": "f86605f738ba15f2cf87b9a6c4d14d03", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5550, "upload_time": "2011-12-15T14:51:00", "url": "https://files.pythonhosted.org/packages/49/42/94470b3d64194d20cfcb508e1a07e9dc8075cd563859f4c16c9e27d90659/zest.pocompile-1.1.tar.gz" } ], "1.2": [ { "comment_text": "", "digests": { "md5": "4ad3b00a065bf1883b8de0e94b542c3e", "sha256": "4d5a5f419b57ad16b7f38de34ed8a8e67e59f5733eb1c4b028f4b8e487082ddd" }, "downloads": -1, "filename": "zest.pocompile-1.2.tar.gz", "has_sig": false, "md5_digest": "4ad3b00a065bf1883b8de0e94b542c3e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6108, "upload_time": "2011-12-16T14:46:30", "url": "https://files.pythonhosted.org/packages/8c/72/9232a9c5bf3f7f226dbb3bb4841e6c920451d83e26a0350585b1b665c43f/zest.pocompile-1.2.tar.gz" } ], "1.3": [ { "comment_text": "", "digests": { "md5": "54de2b1212358108daa7dc5499656cdf", "sha256": "e0332ba2b6f3b38a0f2274c496be49e1834b3f6b81c7e18ab7346a4cb8975046" }, "downloads": -1, "filename": "zest.pocompile-1.3.tar.gz", "has_sig": false, "md5_digest": "54de2b1212358108daa7dc5499656cdf", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6140, "upload_time": "2011-12-16T15:33:50", "url": "https://files.pythonhosted.org/packages/e2/df/32fe46732548bbdf930003c0fcc6cc64440c507b606acee105373e9b4042/zest.pocompile-1.3.tar.gz" } ], "1.4": [ { "comment_text": "", "digests": { "md5": "a40b0384d2f5dceb374170d7afc8e559", "sha256": "5fef08b6b6e0d2f5255b7ee1be0e9021300f4504b243a6c5a52ca497355230cf" }, "downloads": -1, "filename": "zest.pocompile-1.4.zip", "has_sig": false, "md5_digest": "a40b0384d2f5dceb374170d7afc8e559", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 16495, "upload_time": "2013-07-05T17:14:58", "url": "https://files.pythonhosted.org/packages/44/42/6189f119fa6776c7725da9fbc767886f38ace040297d559785640591f9ad/zest.pocompile-1.4.zip" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "a40b0384d2f5dceb374170d7afc8e559", "sha256": "5fef08b6b6e0d2f5255b7ee1be0e9021300f4504b243a6c5a52ca497355230cf" }, "downloads": -1, "filename": "zest.pocompile-1.4.zip", "has_sig": false, "md5_digest": "a40b0384d2f5dceb374170d7afc8e559", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 16495, "upload_time": "2013-07-05T17:14:58", "url": "https://files.pythonhosted.org/packages/44/42/6189f119fa6776c7725da9fbc767886f38ace040297d559785640591f9ad/zest.pocompile-1.4.zip" } ] }