{ "info": { "author": "Maksym Shalenyi", "author_email": "maksym.shalenyi@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 2 - Pre-Alpha", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Natural Language :: English", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6" ], "description": ".. image:: https://img.shields.io/pypi/v/buildout.recipe.mako_template.svg\n :target: https://pypi.python.org/pypi/buildout.recipe.mako_template\n\n.. image:: https://img.shields.io/travis/enkidulan/buildout.recipe.mako_template.svg\n :target: https://travis-ci.org/enkidulan/buildout.recipe.mako_template\n\n.. image:: https://api.codeclimate.com/v1/badges/260655c1feb4cf8cd6bb/maintainability\n :target: https://codeclimate.com/github/enkidulan/buildout.recipe.mako_template/maintainability\n :alt: Maintainability\n\n.. image:: https://api.codeclimate.com/v1/badges/260655c1feb4cf8cd6bb/test_coverage\n :target: https://codeclimate.com/github/enkidulan/buildout.recipe.mako_template/test_coverage\n :alt: Test Coverage\n\n*****************************\nbuildout.recipe.mako_template\n*****************************\n\nA buildout recipe for making files out of Mako templates, with focus on\nmanageability of large number of templates.\n\n.. contents::\n\nThe reasons behind creating this 'another' template recipe for buildout are wish of having:\n\n* ``mako`` with all power of python and good scoping in templates,\n* simple listing of ``source : destinatoin`` mapping,\n* and collision detection.\n\nRecipe Options\n==============\n\n* ``files``: list of couples of templates and targets files paths separated by ``:`` symbol.\n It allow to specify if target should be executable, and to ignore a collision.\n Line has following format:\n\n ``source:target[:is_executable(true or false)[:collision_allowed(just a flag))]]``\n\n* ``directories`` : list of lookup directories of the ``mako`` templates. Templates\n file paths are relative to these directories. (default: ${buildout:directory})\n\nAdditional options are simply forwarded to the templates, and options from all the\nother parts are made available through ``parts[][]``.\n\nMinimal Example\n===============\n\n``buildout.cfg``:\n\n.. code-block:: ini\n\n [buildout]\n parts = foo\n\n\n [foo]\n recipe = buildout.recipe.mako_template\n author = Me\n files = foo_1.sh.mako : foo_1.sh\n\n``foo_1.sh.mako``:\n\n.. code-block:: mako\n\n echo Hello ${author}!\n\nWill result in creation of ``foo_1.sh``:\n\n.. code-block:: shell\n\n echo Hello Me!\n\n\nLarger Example\n==============\n\n.. code-block:: ini\n\n [buildout]\n parts = docker-compose\n\n [project]\n name = MyProject\n\n [docker-compose]\n recipe = buildout.recipe.mako_template\n directories = ${buildout:directory}/templates\n gateway_ports = 8080:8080\n files =\n backend.dockerfile.mako : .docker/backend.dockerfile\n frontend.dockerfile.mako : .docker/frontend.dockerfile\n gateway.dockerfile.mako : .docker/gateway.dockerfile\n docker-compose.yaml.mako : docker-compose.yaml\n\n``docker-compose.yaml.mako``:\n\n.. code-block:: mako\n\n ...\n gateway:\n container_name: ${parts['project']['name']}_gateway\n ports:\n - \"${gateway_ports}\"\n ...\n\n\nCollision detection\n===================\n\nCases where one's template target are overridden by another template\nare detected automatically. For example, case:\n\n.. code-block:: ini\n\n files =\n foo_1.sh.mako : foo_1.sh\n foo_2.sh.mako : foo_1.sh # overwrites ``target`` form above\n\nwill result in a build fail with the message:\n\n.. code-block:: bash\n\n Target collision is detected at 'foo_2.sh.mako : foo_1.sh'\n\n\nYet in some cases, it may be a desirable behavior, so it's possible to allow\noverwriting by adding ``collision_allowed`` flag.\n\n\nLinks and Credits\n=================\n\nThis recipe is heavily inspired by `brodul.recipe.template`_.\n\nTo get more examples and information on using mako templates visit `makotemplates`_.\n\n\n.. _makotemplates: http://www.makotemplates.org/\n.. _brodul.recipe.template: http://pypi.org/project/brodul.recipe.template/\n\n\n\n=======\nHistory\n=======\n\n0.1.2 (2018-03-19)\n------------------\n\n- Add creating of a destination file containing folder if not exists.\n- Add contents and useful links to ``readme.rst``.\n- Add coverage checking to ``make test`` command.\n [enkidulan]\n\n\n0.1.1 (2018-03-13)\n------------------\n\n- Fix packaging issue.\n [enkidulan]\n\n- Update docs, add more examples, add badges.\n [enkidulan]\n\n\n0.1.0 (2018-03-12)\n------------------\n\n* First release on PyPI.\n", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/enkidulan/buildout.recipe.mako_template", "keywords": "buildout recipe mako template", "license": "MIT license", "maintainer": "", "maintainer_email": "", "name": "buildout.recipe.mako_template", "package_url": "https://pypi.org/project/buildout.recipe.mako_template/", "platform": "", "project_url": "https://pypi.org/project/buildout.recipe.mako_template/", "project_urls": { "Homepage": "https://github.com/enkidulan/buildout.recipe.mako_template" }, "release_url": "https://pypi.org/project/buildout.recipe.mako_template/0.1.2/", "requires_dist": null, "requires_python": "", "summary": "Buildout recipe for making files out of Mako templates", "version": "0.1.2" }, "last_serial": 3682184, "releases": { "0.1.1": [ { "comment_text": "", "digests": { "md5": "04ab709ce6f802ebe3956c0a6e960349", "sha256": "e22a7355ac288799876c8d309a538cd9b290dde53175b8c98871fc2d0bff21a5" }, "downloads": -1, "filename": "buildout.recipe.mako_template-0.1.1.tar.gz", "has_sig": false, "md5_digest": "04ab709ce6f802ebe3956c0a6e960349", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10849, "upload_time": "2018-03-13T20:17:47", "url": "https://files.pythonhosted.org/packages/51/bf/c8f85587c29fcc558a8c3177d62ea9fe92c6ab0847de0dc3fda514c4db5c/buildout.recipe.mako_template-0.1.1.tar.gz" } ], "0.1.2": [ { "comment_text": "", "digests": { "md5": "9178255088c7a97808f0aad9d63f0275", "sha256": "67b5abb0e055f7a049cb1995d3223d95d73a02ec9cce1110e757d5bcb5635373" }, "downloads": -1, "filename": "buildout.recipe.mako_template-0.1.2.tar.gz", "has_sig": false, "md5_digest": "9178255088c7a97808f0aad9d63f0275", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11464, "upload_time": "2018-03-19T00:38:04", "url": "https://files.pythonhosted.org/packages/94/01/a5c90464ebecfeff8484e7f70894da558f57259bfae1f7c47dd89bcdd9b1/buildout.recipe.mako_template-0.1.2.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "9178255088c7a97808f0aad9d63f0275", "sha256": "67b5abb0e055f7a049cb1995d3223d95d73a02ec9cce1110e757d5bcb5635373" }, "downloads": -1, "filename": "buildout.recipe.mako_template-0.1.2.tar.gz", "has_sig": false, "md5_digest": "9178255088c7a97808f0aad9d63f0275", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11464, "upload_time": "2018-03-19T00:38:04", "url": "https://files.pythonhosted.org/packages/94/01/a5c90464ebecfeff8484e7f70894da558f57259bfae1f7c47dd89bcdd9b1/buildout.recipe.mako_template-0.1.2.tar.gz" } ] }