{ "info": { "author": "Jason Madden", "author_email": "open-source@nextthought.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "Framework :: Buildout", "Intended Audience :: Developers", "Natural Language :: English", "Operating System :: OS Independent", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: Implementation :: CPython", "Programming Language :: Python :: Implementation :: PyPy" ], "description": "===================\n Supported options\n===================\n\nThe recipe supports installing multiple different sets\nof ZCML slugs in multiple different output directories.\nThese sets are specified in grouped options, where ``X``\nis the common prefix shared by all options in the group.\n\nX_zcml\n A list of zcml entires. Required.\n\n format::\n\n zcml := package \":\" filename\n package := dottedname | dottedname \"-\" ( include_name )\n\n The ``filename`` is the fully specified file, such as\n ``browser.zcml``, whereas the ``include_name`` is a relative\n portion mising the ``.zcml`` extension, defaulting to\n ``configure`` (it was originally validated against a strict list\n of possibilities, but that is no longer the case). If the filename\n is not given, the ``include_name`` is used.\n\n .. note:: Even if you just want to specify ``X_features``, you\n\t\t\t must still have an entry named ``X_zcml``. It may be\n\t\t\t empty in that case.\n\nX_location\n A directory name relative to the etc-directory\n to put the generated slugs in. Required.\n\nX_file\n A convenient shortuct if all or most of the zcml entries would\n have the same ``include_name``. Set this option to make it the\n default instead of configure. Optional.\n\nX_features\n If this optional directive is provided, it is a space and newline\n separated list of ZCML features that should be provided when the\n output directory is processed. These are provided in the first\n file.\n\nThere are two global options:\n\ndeployment\n The name of a ``zc.recipe.deployment`` part containing the\n directory definitions. We will use the ``etc-directory`` defined\n in this part as the base for locations.\n\netc-directory\n If you do not specify a ``deployment``, then this value will\n be used as the etc-directory.\n\n\n\nExample usage\n=============\n\nWe'll start by creating a buildout that uses the recipe. We will list\nthree packages that we'd like to create slugs for (a ``*`` is ignored\nfor backwards compatibility), along with a set of features we want to\nbe provided::\n\n >>> write('buildout.cfg',\n ... \"\"\"\n ... [buildout]\n ... parts = test1\n ...\n ... [test1]\n ... recipe = nti.recipes.zcml\n ... etc-directory = ${buildout:directory}/zope/etc\n ... package_location = package-includes\n ... package_features = foo bar\n ... baz\n ... package_zcml =\n ... *\n ... my.package\n ... somefile:my.otherpackage\n ... my.thirdpackage-meta\n ... \"\"\")\n\nRunning the buildout gives us::\n\n >>> print(system(buildout))\n Installing test1.\n While:\n Installing test1.\n Error: The parents of '/.../sample-buildout/zope/etc/package-includes' do not exist\n\nWe need to have a valid etc directory. Let's create one::\n\n >>> mkdir(\"zope\")\n >>> mkdir(\"zope\", \"etc\")\n >>> print(system(buildout))\n Installing test1.\n\nWe now have a package include directory::\n\n >>> ls(\"zope\", \"etc\")\n d package-includes\n\nIt does contain ZCML slugs::\n\n >>> ls(\"zope\", \"etc\", \"package-includes\")\n - 000-features.zcml\n - 001-my.package-configure.zcml\n - 002-somefile-configure.zcml\n - 003-my.thirdpackage-meta.zcml\n\nThese files contain the usual stuff::\n\n >>> cat(\"zope\", \"etc\", \"package-includes\", \"000-features.zcml\")\n \n \n \n \n \n >>> cat(\"zope\", \"etc\", \"package-includes\", \"001-my.package-configure.zcml\")\n \n >>> cat(\"zope\", \"etc\", \"package-includes\", \"002-somefile-configure.zcml\")\n \n >>> cat(\"zope\", \"etc\", \"package-includes\", \"003-my.thirdpackage-meta.zcml\")\n \n\n\nError and Corner Cases\n======================\n\nNow we will discuss how various corner cases and errors are handled.\n\nNo ZCML and No Features\n-----------------------\n\nIf you do not specify any ZCML or features, no files are generated\n(note that we're using a new part name, causing the old part to be\nuninstalled)::\n\n\n >>> write('buildout.cfg',\n ... \"\"\"\n ... [buildout]\n ... parts = zcml\n ...\n ... [zcml]\n ... recipe = nti.recipes.zcml\n ... etc-directory = ${buildout:directory}/zope/etc\n ... package_location = empty-includes\n ... package_features =\n ... package_zcml =\n ... \"\"\")\n\n >>> print(system(buildout))\n Uninstalling test1.\n Installing zcml.\n \n\n\nNo directory is created for this part, and when the old part was\nuninstalled, it left behind its directory, but no files::\n\n >>> ls(\"zope\", \"etc\")\n d package-includes\n\n >>> ls(\"zope\", \"etc\", \"package-includes\")\n\nUsing a Deployment Reference\n============================\n\nAs mentioned above, we can use a ``zc.recipe.deployment`` section to\nfind the ``etc`` directory (in reality, we can accept any part that\nhas an ``etc-directory`` setting); this will override any locally\nspecified ``etc-directory``. We haven't created the directory we\nspecified (and we're not using ``zc.recipe.deployment`` to\nautomatically do so) so this buildout will fail::\n\n >>> write('buildout.cfg',\n ... \"\"\"\n ... [buildout]\n ... parts = zcml\n ...\n ... [deployment-settings]\n ... etc-directory = ${buildout:directory}/zope/deployment-etc\n ...\n ... [zcml]\n ... recipe = nti.recipes.zcml\n ... deployment = deployment-settings\n ... etc-directory = ${buildout:directory}/zope/etc\n ... package_location = empty-includes\n ... package_features = foo\n ... package_zcml =\n ... \"\"\")\n\n >>> print(system(buildout))\n Uninstalling zcml.\n Installing zcml.\n While:\n Installing zcml.\n Error: The parents of '/.../zope/deployment-etc/empty-includes' do not exist\n \n\nMalformed Package Names\n=======================\n\nAn error is raised if the package name is malformed (although at the\nmoment only the most egregious violations are detected)::\n\n\n >>> write('buildout.cfg',\n ... \"\"\"\n ... [buildout]\n ... parts = zcml\n ...\n ... [zcml]\n ... recipe = nti.recipes.zcml\n ... etc-directory = ${buildout:directory}/zope/etc\n ... package_location = empty-includes\n ... package_zcml = $not_valid\n ... \"\"\")\n\n >>> print(system(buildout))\n Installing zcml.\n While:\n Installing zcml.\n Error: Invalid package name: '$not_valid' parsed as '$not_valid'\n \n\nSpecifying Filenames Twice\n==========================\n\nWe can specify both the ``include_name`` and the ``filename`` for a\nsingle entry::\n\n >>> write('buildout.cfg',\n ... \"\"\"\n ... [buildout]\n ... parts = zcml\n ...\n ... [zcml]\n ... recipe = nti.recipes.zcml\n ... etc-directory = ${buildout:directory}/zope/etc\n ... package_location = package-includes\n ... package_zcml = my.package-foo:filename.zcml\n ... \"\"\")\n\n >>> print(system(buildout))\n Installing zcml.\n\n\n >>> ls(\"zope\", \"etc\", \"package-includes\")\n - 001-my.package-foo.zcml\n\n >>> cat(\"zope\", \"etc\", \"package-includes\", \"001-my.package-foo.zcml\")\n \n\n\n=========\n Changes\n=========\n\n1.0.0 (2017-09-18)\n==================\n\n- Initial public release.", "description_content_type": null, "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://github.com/NextThought/nti.recipes.zcml", "keywords": "buildout zcml", "license": "APACHE 2.0", "maintainer": "", "maintainer_email": "", "name": "nti.recipes.zcml", "package_url": "https://pypi.org/project/nti.recipes.zcml/", "platform": "", "project_url": "https://pypi.org/project/nti.recipes.zcml/", "project_urls": { "Homepage": "http://github.com/NextThought/nti.recipes.zcml" }, "release_url": "https://pypi.org/project/nti.recipes.zcml/1.0.0/", "requires_dist": null, "requires_python": "", "summary": "zc.buildout recipes for writing ZCML", "version": "1.0.0" }, "last_serial": 4419409, "releases": { "0.0.0.dev0": [], "1.0.0": [ { "comment_text": "", "digests": { "md5": "388e4e8b416eb7804c181e0399cc2dd4", "sha256": "1a094f845be08797a1da8eea1388f7fbe9f1369acb27681c5ce4e00659ed6ba5" }, "downloads": -1, "filename": "nti.recipes.zcml-1.0.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "388e4e8b416eb7804c181e0399cc2dd4", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 12341, "upload_time": "2017-09-18T17:14:35", "url": "https://files.pythonhosted.org/packages/a2/bd/7f073d6cc102e67b3bcd19be49f55db1f4012d473bf2ae4a45481055ed96/nti.recipes.zcml-1.0.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "be5e519eeff00a82a3e472886036979d", "sha256": "336307d0d32b008b89fdbca777a07908aee52c1164b93948fc22c2310a97578e" }, "downloads": -1, "filename": "nti.recipes.zcml-1.0.0.tar.gz", "has_sig": false, "md5_digest": "be5e519eeff00a82a3e472886036979d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8397, "upload_time": "2017-09-18T17:14:34", "url": "https://files.pythonhosted.org/packages/dc/1c/d05722b23a3e08958ab721bf6302e7dbfc465e2ae2db3929d6e077c359dd/nti.recipes.zcml-1.0.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "388e4e8b416eb7804c181e0399cc2dd4", "sha256": "1a094f845be08797a1da8eea1388f7fbe9f1369acb27681c5ce4e00659ed6ba5" }, "downloads": -1, "filename": "nti.recipes.zcml-1.0.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "388e4e8b416eb7804c181e0399cc2dd4", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 12341, "upload_time": "2017-09-18T17:14:35", "url": "https://files.pythonhosted.org/packages/a2/bd/7f073d6cc102e67b3bcd19be49f55db1f4012d473bf2ae4a45481055ed96/nti.recipes.zcml-1.0.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "be5e519eeff00a82a3e472886036979d", "sha256": "336307d0d32b008b89fdbca777a07908aee52c1164b93948fc22c2310a97578e" }, "downloads": -1, "filename": "nti.recipes.zcml-1.0.0.tar.gz", "has_sig": false, "md5_digest": "be5e519eeff00a82a3e472886036979d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8397, "upload_time": "2017-09-18T17:14:34", "url": "https://files.pythonhosted.org/packages/dc/1c/d05722b23a3e08958ab721bf6302e7dbfc465e2ae2db3929d6e077c359dd/nti.recipes.zcml-1.0.0.tar.gz" } ] }