{ "info": { "author": "s-ball", "author_email": "s-ball@laposte.net", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Environment :: Console", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", "Topic :: Software Development :: Internationalization" ], "description": "============\nmo_installer\n============\n\nHelp to install gettext mo file in a setuptools package.\n\nCurrent status\n--------------\n\nThis package is fully functional, but should still be considered as beta because it has not been enough tested\n\nGoals\n-----\n\n``setuptools`` has currently little support for ``gettext`` mo files generation and packaging. babel_ provides a nice integration, but is a rather large package. This intends to be a small package with examples in order to help developpers to smoothly integrate ``gettext`` internationalization in their packages.\n\nUsage\n-----\n\nTo have mo file generation at build time, a package developper only has to:\n\n* prepare its po files somewhere in a directory. Under that directory, the po files can be installed:\n\n * directly in the directory with a name like ``domain-lang.po`` (ex: ``msg-fr_FR.po``)\n * in a ``lang`` sub-directory like ``lang/domain.po`` (ex: ``fr/msg.po``)\n * in a ``LC_MESSAGES`` sub-directory like ``lang/LC_MESSAGES/domain.po`` (ex: ``fr/LC_MESSAGES/msg.po``)\n\n* declare in its ``setup.py`` that he wants to use ``mo_installer``, and where the po files are::\n\n setup(\n ...\n setup_require = [\"mo_installer\"],\n locale_src = src_locale_top_level_dir,\n )\n\nand that's all!\n\nThe ``mo_installer`` module automatically adds a ``build_mo`` setuptools command that is automatically called from ``build_py``. It builds the mo files and installs them under the main package in a ``locale/lang/LC_MESSAGES`` folder. So, in the above examples, we end with a ``locale/lang/LC_MESSAGES/msg.mo`` file.\n\nConfiguration\n-------------\n\nThe source and destination folders can be configured with ``setup`` parameters:\n\n* ``locale_src`` is the source directory (relative to the source installation, i.e. the directory containing the ``setup.py`` file). By default it is ``locale`` under the main package\n* ``locale_dir`` is the top level locale directory (relative to the main package). By default it is ``locale``.\n\nThe defaults try to be compatible with babel_ .\n\nInstalling\n----------\n\nEnd user installation\n*********************\n\nThe package can be installed from `PyPI `_. But installation is not required when ``pip`` is used: ``setup_require`` automatically finds the package and installs it in the local ``.eggs`` directory\n\nDevelopper installation\n***********************\n\nIf you want to contribute or integrate mo_installer in your own code, you should get a copy of the full tree from `GitHUB `_::\n\n git clone https://github.com/s-ball/mo_installer.git [your_working_copy_folder]\n\nFAQ\n---\n\nQ: I have configured my project, but ``python setup.py install`` chokes on ``mo_installer`` not found\n\nA: ``pip`` knows how to fetch setup requirements before building. But when you run directly ``python setup.py install``, there is no place to download them because install has already started. In that case, you must manually install ``mo_installer`` with pip.\n\n----\n\nQ: The mo files generated by ``mo_installer`` seem to not contain a hash table\n\nA: They do not. As ``mo_installer`` is based on ``msgfmt.py`` it cannot generate a hash table and ``gettext`` will use a binary search. BTW, babel_ does not generate any hash table either.\n\nRunning the tests\n-----------------\n\nAs the project intends to be PyPI compatible, you can simply run tests from the main folder with::\n\n python setup.py test\n\nSome tests depend on pyfakefs_, which is automatically intalled from PyPI when you run `python setup.py test`. But it is not require for using ``mo_installer``, nor installed by ``pip install mo_installer``.\n\nContributing\n------------\n\nAs this project is developped on my free time, I cannot guarantee very fast feedbacks. Anyway, I shall be glad to receive issues or pull requests on GitHUB. \n\nVersioning\n----------\n\nThis project uses a standard Major.Minor.Patch versioning pattern. Inside a major version, public API stability is expected (at least after 1.0.0 version will be published).\n\nLicense\n-------\n\nThis project is licensed under the MIT License - see the LICENSE_ file for details\n\nAcknowledgments\n---------------\n\n* The excellent pyfakefs_ allows integration tests to run on a fake file system\n\n.. _babel: http://babel.pocoo.org/\n.. _LICENSE: https://github.com/s-ball/mo_installer/blob/master/LICENSE\n.. _pyfakefs: http://pyfakefs.org\n\n\n", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/s-ball/mo_installer", "keywords": "", "license": "MIT License", "maintainer": "", "maintainer_email": "", "name": "mo-installer", "package_url": "https://pypi.org/project/mo-installer/", "platform": "", "project_url": "https://pypi.org/project/mo-installer/", "project_urls": { "Changelog": "https://github.com/s-ball/mo_installer/blob/master/CHANGES.txt", "Homepage": "https://github.com/s-ball/mo_installer" }, "release_url": "https://pypi.org/project/mo-installer/0.3.0/", "requires_dist": null, "requires_python": ">=3", "summary": "Smoothly integrates mo files in setuptools packaging", "version": "0.3.0" }, "last_serial": 4566818, "releases": { "0.2.0": [ { "comment_text": "", "digests": { "md5": "12fb06c46b29b42452caae9ef4943f86", "sha256": "bdc07b03bb551ac6be9a835990f17a519470af697cf01c89c868d8c900428c9a" }, "downloads": -1, "filename": "mo_installer-0.2.0-py3-none-any.whl", "has_sig": false, "md5_digest": "12fb06c46b29b42452caae9ef4943f86", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3", "size": 8466, "upload_time": "2018-11-23T17:11:09", "url": "https://files.pythonhosted.org/packages/94/fb/0545e4e0cd2954be7d468a573d851653f2cf7cc3980858a137decaae7a8e/mo_installer-0.2.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "a96bb803861c6f18e34458c83cec940c", "sha256": "ca8eabaa666ec5596d19c7c30be06a6b8f71e86988a7612c335bee81b6e1991b" }, "downloads": -1, "filename": "mo_installer-0.2.0.tar.gz", "has_sig": false, "md5_digest": "a96bb803861c6f18e34458c83cec940c", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3", "size": 13416, "upload_time": "2018-11-23T17:11:11", "url": "https://files.pythonhosted.org/packages/cc/c0/044478179bae69d7c1cca027ca1d65918a74cf6126fc66c860aa8f0b23c1/mo_installer-0.2.0.tar.gz" } ], "0.2.2": [ { "comment_text": "", "digests": { "md5": "bb6554df1c90be4574e8500bc6963629", "sha256": "1a29f8d1b61149eaa729a2e797029c5328cf91c328d7c194f77eb3dba5d2402e" }, "downloads": -1, "filename": "mo_installer-0.2.2-py3-none-any.whl", "has_sig": false, "md5_digest": "bb6554df1c90be4574e8500bc6963629", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3", "size": 8459, "upload_time": "2018-11-26T16:24:08", "url": "https://files.pythonhosted.org/packages/25/c0/b72a05b70721421a93449223f3c8d461fab436abf3e484ce05668d62f94b/mo_installer-0.2.2-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "85fba0eddd08ec5dee83b89ced751ca6", "sha256": "c5d8d6d8aef1ae14efd53ca2ef2c777c622dc7175516bfb8afa5acb48d8a81af" }, "downloads": -1, "filename": "mo_installer-0.2.2.tar.gz", "has_sig": false, "md5_digest": "85fba0eddd08ec5dee83b89ced751ca6", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3", "size": 13281, "upload_time": "2018-11-26T16:24:09", "url": "https://files.pythonhosted.org/packages/79/46/0bafbabef7a5ae47998a85700d728983b9f174d8fa0fe406771e3fe028de/mo_installer-0.2.2.tar.gz" } ], "0.3.0": [ { "comment_text": "", "digests": { "md5": "74d518b56a775bac4d2b9e9805c36384", "sha256": "2e2de6e533cd7d29fa1272a80bb71c0b22547269fa8924b19215a33907394e00" }, "downloads": -1, "filename": "mo_installer-0.3.0-py3-none-any.whl", "has_sig": false, "md5_digest": "74d518b56a775bac4d2b9e9805c36384", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3", "size": 9397, "upload_time": "2018-12-06T07:36:02", "url": "https://files.pythonhosted.org/packages/9f/86/61e70cbdd52ffa20090070f83fe122db741396ca1b54fa106d0b5edc99ae/mo_installer-0.3.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "8cd77929ea2384682e30f9b993d9fe2a", "sha256": "e0498b62dab42ebc83de7586d5c1e13fa12959faa6e382e685fa50d4f282c2b6" }, "downloads": -1, "filename": "mo_installer-0.3.0.tar.gz", "has_sig": false, "md5_digest": "8cd77929ea2384682e30f9b993d9fe2a", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3", "size": 14559, "upload_time": "2018-12-06T07:36:04", "url": "https://files.pythonhosted.org/packages/ff/d6/a042d8bb61f626ca93adb2126e5ea7e33ab0dd86b9e76e79af2e3758f08a/mo_installer-0.3.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "74d518b56a775bac4d2b9e9805c36384", "sha256": "2e2de6e533cd7d29fa1272a80bb71c0b22547269fa8924b19215a33907394e00" }, "downloads": -1, "filename": "mo_installer-0.3.0-py3-none-any.whl", "has_sig": false, "md5_digest": "74d518b56a775bac4d2b9e9805c36384", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3", "size": 9397, "upload_time": "2018-12-06T07:36:02", "url": "https://files.pythonhosted.org/packages/9f/86/61e70cbdd52ffa20090070f83fe122db741396ca1b54fa106d0b5edc99ae/mo_installer-0.3.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "8cd77929ea2384682e30f9b993d9fe2a", "sha256": "e0498b62dab42ebc83de7586d5c1e13fa12959faa6e382e685fa50d4f282c2b6" }, "downloads": -1, "filename": "mo_installer-0.3.0.tar.gz", "has_sig": false, "md5_digest": "8cd77929ea2384682e30f9b993d9fe2a", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3", "size": 14559, "upload_time": "2018-12-06T07:36:04", "url": "https://files.pythonhosted.org/packages/ff/d6/a042d8bb61f626ca93adb2126e5ea7e33ab0dd86b9e76e79af2e3758f08a/mo_installer-0.3.0.tar.gz" } ] }