{ "info": { "author": "Aaron Lehmann", "author_email": "aaron@zope.com", "bugtrack_url": null, "classifiers": [ "Framework :: Buildout", "Intended Audience :: Developers", "License :: OSI Approved :: Zope Public License", "Topic :: Software Development :: Build Tools", "Topic :: Software Development :: Libraries :: Python Modules" ], "description": "Macro Quickstart\n================\n\nzc.recipe.macro is a set of recipes allowing sections, or even parts, to be\ncreated dynamically from a macro section and a parameter section. This enables\nthe buildout to keep its data seperate from its output format.\n\nBasic Use\n---------\n\nIn the most basic use of a macro, a section invokes the macro on itself, and\nuses itself as the parameter provider.\nBuildout::\n\n [buildout]\n parts = hard-rocker\n\n [rock]\n question = Why do I rock $${:rocking-style}?\n\n [hard-rocker]\n recipe = zc.recipe.macro\n macro = rock\n rocking-style = so hard\n\nResult::\n\n [hard-rocker]\n recipe = zc.recipe.macro:empty\n result-sections = hard-rocker\n rocking-style = so hard\n question = Why do I rock so hard?\n\nThe recipe gets changed to zc.recipe.macro:empty, which is a do nothing recipe,\nbecause the invoking secion must be a part in order to execute recipes, and\nbuildout demands that parts have a recipe, so it couldn't be emptied.\n\nDefault Values\n--------------\n\nIt is possible to include default values for parameters in a macro.\n\nBuildout::\n\n [buildout]\n parts = hard-rocker\n\n [rock]\n question = Why do I rock $${:rocking-style}?\n rocking-style = so hard\n\n [hard-rocker]\n recipe = zc.recipe.macro\n macro = rock\n\nResult::\n\n [hard-rocker]\n recipe = zc.recipe.macro:empty\n result-sections = hard-rocker\n rocking-style = so hard\n question = Why do I rock so hard?\n\nCreating Parts\n--------------\n\nOf course, there wouldn't much point to this if one could only create sections\nwith a dummy recipe. This is where the result-recipe option comes in.\n\nBuildout::\n\n [buildout]\n parts = hard-rocker\n\n [rock]\n question = Why do I rock $${:rocking-style}?\n\n [hard-rocker]\n recipe = zc.recipe.macro\n result-recipe = zc.recipe.macro:test1\n macro = rock\n rocking-style = so hard\n\nResult::\n\n [hard-rocker]\n recipe = zc.recipe.macro:test1\n result-sections = hard-rocker\n question = Why do I rock so hard?\n rocking-style = so hard\n\nTargets\n-------\n\nOften, one wants to create multiple new sections. This is possible with the\ntargets option. This is only useful, however, if one can provide multiple\nsources for parameters. Fortunately, you can. Each new section can optionally\nbe followed by a colon and the name of a section to use for parameters.\n\nBuildout::\n\n [buildout]\n parts = rockers hard-rocker socks-rocker tired-rocker\n\n [rock]\n question = Why do I rock $${:rocking-style}?\n rocking-style = $${:rocking-style}\n\n [hard-rocker-parameters]\n rocking-style = so hard\n\n [socks-rocker-parameters]\n rocking-style = my socks\n\n [tired-rocker-parameters]\n rocking-style = all night\n\n [rockers]\n recipe = zc.recipe.macro\n result-recipe = zc.recipe.macro:empty\n macro = rock\n targets =\n hard-rocker:hard-rocker-parameters\n socks-rocker:socks-rocker-parameters\n tired-rocker:tired-rocker-parameters\n\nResult::\n\n [rockers]\n recipe = zc.recipe.macro:empty\n result-sections = hard-rocker socks-rocker tired-rocker\n\n [hard-rocker]\n recipe = zc.recipe.macro:empty\n rocking-style = so hard\n question = Why do I rock so hard?\n\n [socks-rocker]\n recipe = zc.recipe.macro:empty\n rocking-style = my socks\n question = Why do I rock my socks?\n\n [tired-rocker]\n recipe = zc.recipe.macro:empty\n rocking-style = all night\n question = Why do I rock all night?\n\nIn the previous example we hardcoded the result parts after the invoker in\n${buildout:parts}. This is brittle, because someone might change the names of\nthe targets or alphabetize the parts list. An invocation will have a list of\nthe sections it modified in its result-sections variable, which is created when\nthe macro is executed.\n\nBuildout::\n\n [buildout]\n parts = ${rockers:result-sections}\n\n [rock]\n question = Why do I rock $${:rocking-style}?\n rocking-style = $${:rocking-style}\n\n [hard-rocker-parameters]\n rocking-style = so hard\n\n [socks-rocker-parameters]\n rocking-style = my socks\n\n [tired-rocker-parameters]\n rocking-style = all night\n\n [rockers]\n recipe = zc.recipe.macro\n result-recipe = zc.recipe.macro:test1\n macro = rock\n targets =\n hard-rocker:hard-rocker-parameters\n socks-rocker:socks-rocker-parameters\n tired-rocker:tired-rocker-parameters\n\nResult::\n\n [rockers]\n result-sections = hard-rocker socks-rocker tired-rocker\n\n [hard-rocker]\n question = Why do I rock so hard?\n recipe = zc.recipe.macro:test1\n rocking-style = so hard\n\n [socks-rocker]\n question = Why do I rock my socks?\n recipe = zc.recipe.macro:test1\n rocking-style = my socks\n\n [tired-rocker]\n question = Why do I rock all night?\n recipe = zc.recipe.macro:test1\n rocking-style = all night\n\n\nOrder of Precedence for Recipes for Result Sections\n---------------------------------------------------\n\nThe source for the `recipe` option for result sections has a particular\nprecedence, as follows::\n\n 1) recipe in the parameters section of the macro target\n 2) result-recipe in the parameters section for the macro target\n 3) result-recipe in the macro invocation\n 4) recipe in the macro definition\n\nThe following tests will illustrate these rules, starting with rule 4 and\nbuilding up.\n\nIn the following buildout, rock:recipe will be used in the [hard-rockers]\nsection as the recipe, because of rule 4.\nBuildout::\n\n [buildout]\n parts = rockers\n\n [rock]\n question = Why do I rock $${:rocking-style}?\n rocking-style = $${:rocking-style}\n recipe = zc.recipe.macro:test4\n\n [hard-rocker-parameters]\n rocking-style = so hard\n\n [rockers]\n recipe = zc.recipe.macro\n macro = rock\n targets = hard-rocker:hard-rocker-parameters\n\nResult::\n\n [hard-rocker]\n question = Why do I rock so hard?\n recipe = zc.recipe.macro:test4\n rocking-style = so hard\n\nIn the following buildout, ${rockers:result-recipe} will be used because of rule 3.\nBuildout::\n\n [buildout]\n parts = rockers\n\n [rock]\n question = Why do I rock $${:rocking-style}?\n rocking-style = $${:rocking-style}\n recipe = zc.recipe.macro:test4\n\n [hard-rocker-parameters]\n rocking-style = so hard\n\n [rockers]\n recipe = zc.recipe.macro\n result-recipe = zc.recipe.macro:test3\n macro = rock\n targets = hard-rocker:hard-rocker-parameters\n\nResult::\n\n [hard-rocker]\n question = Why do I rock so hard?\n recipe = zc.recipe.macro:test3\n rocking-style = so hard\n\nIn the following buildout, ${hard-rocker-paramers:result-recipe} will be used because of rule 2.\nBuildout::\n\n [buildout]\n parts = rockers\n\n [rock]\n question = Why do I rock $${:rocking-style}?\n rocking-style = $${:rocking-style}\n recipe = zc.recipe.macro:test4\n\n [hard-rocker-parameters]\n result-recipe = zc.recipe.macro:test2\n rocking-style = so hard\n\n [rockers]\n recipe = zc.recipe.macro\n result-recipe = zc.recipe.macro:test3\n macro = rock\n targets = hard-rocker:hard-rocker-parameters\n\nResult::\n\n [hard-rocker]\n question = Why do I rock so hard?\n recipe = zc.recipe.macro:test2\n rocking-style = so hard\n\nIn the following buildout, ${hard-rocker-parameters:recipe} will be used because of rule 1.\nBuildout::\n\n [buildout]\n parts = rockers\n\n [rock]\n question = Why do I rock $${:rocking-style}?\n rocking-style = $${:rocking-style}\n recipe = zc.recipe.macro:test4\n\n [hard-rocker-parameters]\n recipe = zc.recipe.macro:test1\n result-recipe = zc.recipe.macro:test2\n rocking-style = so hard\n\n [rockers]\n recipe = zc.recipe.macro\n result-recipe = zc.recipe.macro:test3\n macro = rock\n targets = hard-rocker:hard-rocker-parameters\n\nResult::\n\n [hard-rocker]\n question = Why do I rock so hard?\n recipe = zc.recipe.macro:test1\n rocking-style = so hard\n\n\nSpecial Variables\n-----------------\n\nzc.recipe.macro uses __name__ to mean the name of the section the macro is\nbeing invoked upon. This allows one to not know the name of particular\nsection, but still use it in output.\n\nBuildout::\n\n [buildout]\n parts = rockers\n\n [rock]\n question = Why does $${:__name__} rock $${:rocking-style}?\n\n [hard-rocker-parameters]\n rocking-style = so hard\n\n [socks-rocker-parameters]\n rocking-style = my socks\n\n [tired-rocker-parameters]\n rocking-style = all night\n\n [rockers]\n recipe = zc.recipe.macro\n result-recipe = zc.recipe.macro:empty\n macro = rock\n targets =\n hard-rocker:hard-rocker-parameters\n socks-rocker:socks-rocker-parameters\n tired-rocker:tired-rocker-parameters\n\nResult::\n\n [rockers]\n recipe = zc.recipe.macro:empty\n result-sections = hard-rocker socks-rocker tired-rocker\n\n [hard-rocker]\n question = Why does hard-rocker rock so hard?\n recipe = zc.recipe.macro:empty\n\n [socks-rocker]\n question = Why does socks-rocker rock my socks?\n recipe = zc.recipe.macro:empty\n\n [tired-rocker]\n question = Why does tired-rocker rock all night?\n recipe = zc.recipe.macro:empty\n\n\n\nCHANGES\n=======\n\n1.3.0 (2009-07-22)\n------------------\n\n- The recipe option for result sections is now pulled from the following\n sources, in this order:\n\n 1) recipe in the parameters section of the macro target\n 2) result-recipe in the parameters section for the macro target\n 3) result-recipe in the macro invocation\n 4) recipe in the macro definition\n\n- Correct a rest error, that prevent the package of being installed with\n docutils 0.4.\n\n1.2.5 (2009-03-05)\n------------------\n\n- Removed version sections from the documentation.\n- Improved test coverage.\n- Put QUICKSTART.txt under test, using manuel.\n- Macro invocations will grow a result-sections value that lists the sections\n they modified or created.\n- README.txt is now mostly Manuellified.\n\n1.2.4 (2008-07-18)\n------------------\n\n- Fixed a bug that made self-targetting invocations fail when the macro utilized\n default values and the option that read the default came out the Options\n iteration first, added a regression test.\n- Changed the test setup so that buildouts are tested by calling methods rather\n than creating a subprocess. This allows for the --coverage flage to work in\n bin/test, and makes debugging and mimmicking the test output significantly\n easier.\n- Fixed addition of targets so that they will show up properly when one calls\n buildout.keys().\n\n1.2.3 (2008-07-11)\n------------------\n\n- Fixed a bug in the CHANGES ReST\n\n1.2.2 (2008-07-11)\n------------------\n\n- Fixed a bug in setup.py where setuptools was not being imported\n- Changed date format in CHANGES.txt to YYYY-MM-DD\n\n1.2.1 (2008-07-10)\n------------------\n\n- Fixed a typo in the quickstart\n\n1.2.0 (2008-07-10)\n------------------\n\n- First release", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "UNKNOWN", "keywords": "development build macro", "license": "ZPL 2.1", "maintainer": null, "maintainer_email": null, "name": "zc.recipe.macro", "package_url": "https://pypi.org/project/zc.recipe.macro/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/zc.recipe.macro/", "project_urls": { "Download": "UNKNOWN", "Homepage": "UNKNOWN" }, "release_url": "https://pypi.org/project/zc.recipe.macro/1.3.0/", "requires_dist": null, "requires_python": null, "summary": "Macro-recipe for buildout.", "version": "1.3.0" }, "last_serial": 802192, "releases": { "1.2.0": [ { "comment_text": "", "digests": { "md5": "cbbdb114397d5ca78653d21a455c34d0", "sha256": "f54877683d4f8b82f88306d019c2ae4fd75256dc34352b177795e79e54556751" }, "downloads": -1, "filename": "zc.recipe.macro-1.2.0.tar.gz", "has_sig": false, "md5_digest": "cbbdb114397d5ca78653d21a455c34d0", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10085, "upload_time": "2008-07-11T03:42:16", "url": "https://files.pythonhosted.org/packages/ec/3b/a9e12c0f3fbf5f164700ba5673b19180fe91943dcd437590e25c889e9018/zc.recipe.macro-1.2.0.tar.gz" } ], "1.2.1": [ { "comment_text": "", "digests": { "md5": "a8546d3399d720b1110974587be79931", "sha256": "e1e180b4372f5ad52b2d88b2797a64a6ad4449832d5e14681e93a3ff8346edf6" }, "downloads": -1, "filename": "zc.recipe.macro-1.2.1.tar.gz", "has_sig": false, "md5_digest": "a8546d3399d720b1110974587be79931", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10157, "upload_time": "2008-07-11T03:47:39", "url": "https://files.pythonhosted.org/packages/59/99/b511d1303f55cbd05182f680d4b8a5d917f4f31199226cb6cfbfab5d62f3/zc.recipe.macro-1.2.1.tar.gz" } ], "1.2.2": [ { "comment_text": "", "digests": { "md5": "d47ea81c7851aacbdc1ec0307615432e", "sha256": "70a657881bbe2b829f861b1827a2fc28d83c89972ae4682b8c4c99c8421d0678" }, "downloads": -1, "filename": "zc.recipe.macro-1.2.2.tar.gz", "has_sig": false, "md5_digest": "d47ea81c7851aacbdc1ec0307615432e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10290, "upload_time": "2008-07-11T17:46:37", "url": "https://files.pythonhosted.org/packages/a1/8f/3fabcda4e972881eb35387344a1a96c13513afd518fbc440bd7e02dde654/zc.recipe.macro-1.2.2.tar.gz" } ], "1.2.3": [ { "comment_text": "", "digests": { "md5": "650e60988accf04d998dda9a19fa5119", "sha256": "23654c48f7bf3eec9186d4758c58eb8af7fde557064395841baa4a5e390daf40" }, "downloads": -1, "filename": "zc.recipe.macro-1.2.3.tar.gz", "has_sig": false, "md5_digest": "650e60988accf04d998dda9a19fa5119", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10331, "upload_time": "2008-07-11T18:03:23", "url": "https://files.pythonhosted.org/packages/df/67/2bba7d6e0c2701999f973a09e25dc9abc9668bf514bf1d0059ba4d721bba/zc.recipe.macro-1.2.3.tar.gz" } ], "1.2.4": [ { "comment_text": "", "digests": { "md5": "ed43913f3dd113ee82b496c1e652f9f5", "sha256": "4d586452749fa899af61806ae372ecb41400db0a9d3594fda955e40bd2a48945" }, "downloads": -1, "filename": "zc.recipe.macro-1.2.4.tar.gz", "has_sig": false, "md5_digest": "ed43913f3dd113ee82b496c1e652f9f5", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11770, "upload_time": "2008-07-18T19:55:34", "url": "https://files.pythonhosted.org/packages/dd/aa/0719887cd01dd8a77d8f121c7cf5d4a1feafb20953a5d690f458ae34699f/zc.recipe.macro-1.2.4.tar.gz" } ], "1.2.5": [ { "comment_text": "", "digests": { "md5": "bb097726197515e43cc51c4b7601ae33", "sha256": "78cb001edb216402e4c8ac9d023ea2b1ba8b4ecc515236f6833ac4683541a7ca" }, "downloads": -1, "filename": "zc.recipe.macro-1.2.5.tar.gz", "has_sig": false, "md5_digest": "bb097726197515e43cc51c4b7601ae33", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11901, "upload_time": "2009-03-05T07:02:32", "url": "https://files.pythonhosted.org/packages/6d/35/89e6f7b72a8e8d3b8810516f31bc1231435b05c685fe65648d824edb91a2/zc.recipe.macro-1.2.5.tar.gz" } ], "1.3.0": [ { "comment_text": "", "digests": { "md5": "4b1c6705715d969a82898e2f0fc790d8", "sha256": "9107631a92bf917b199cc803196a97bd6257f4f50cb941e8fc0eb61ba0993e92" }, "downloads": -1, "filename": "zc.recipe.macro-1.3.0.tar.gz", "has_sig": false, "md5_digest": "4b1c6705715d969a82898e2f0fc790d8", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 12705, "upload_time": "2009-07-22T22:52:00", "url": "https://files.pythonhosted.org/packages/7d/43/64990d1df65767257663dafdf991e1aec7e4db6354092adbd79c28ed5caa/zc.recipe.macro-1.3.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "4b1c6705715d969a82898e2f0fc790d8", "sha256": "9107631a92bf917b199cc803196a97bd6257f4f50cb941e8fc0eb61ba0993e92" }, "downloads": -1, "filename": "zc.recipe.macro-1.3.0.tar.gz", "has_sig": false, "md5_digest": "4b1c6705715d969a82898e2f0fc790d8", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 12705, "upload_time": "2009-07-22T22:52:00", "url": "https://files.pythonhosted.org/packages/7d/43/64990d1df65767257663dafdf991e1aec7e4db6354092adbd79c28ed5caa/zc.recipe.macro-1.3.0.tar.gz" } ] }