{ "info": { "author": "j23d", "author_email": "m@s3edv.de", "bugtrack_url": null, "classifiers": [ "Framework :: Buildout", "Intended Audience :: Developers", "License :: OSI Approved :: Zope Public License", "Topic :: Software Development :: Build Tools" ], "description": "This recipe is for execute shell commands and get the output in another part of\r\nthe buildout. The commands are defined in a section called commands, one per\r\nline and the output can be referenced from other parts using the ${...} syntax.\r\n\r\n >>> write('dummy.py',\r\n ... '''\r\n ... class Recipe(object):\r\n ...\r\n ... def __init__(self, buildout, name, options):\r\n ... self.options = options\r\n ...\r\n ... def install(self):\r\n ... if 'output_1' in self.options:\r\n ... print self.options['output_1']\r\n ... if 'output_2' in self.options:\r\n ... print self.options['output_2']\r\n ... return ()\r\n ...\r\n ... def update(self):\r\n ... pass\r\n ... ''')\r\n\r\n >>> write('setup.py',\r\n ... '''\r\n ... from setuptools import setup\r\n ...\r\n ... setup(name='dummyrecipe',\r\n ... entry_points = {'zc.buildout': ['default = dummy:Recipe']})\r\n ... ''')\r\n\r\n >>> write('buildout.cfg',\r\n ... '''\r\n ... [buildout]\r\n ... develop = .\r\n ... parts =\r\n ... shelloutput\r\n ... use-shelloutput\r\n ... offline = true\r\n ...\r\n ... [shelloutput]\r\n ... recipe = collective.recipe.shelloutput\r\n ... commands =\r\n ... echo_1 = echo 'ECHO'\r\n ... echo_2 = echo 'The shell says: hello.'\r\n ...\r\n ... [use-shelloutput]\r\n ... recipe = dummyrecipe\r\n ... output_1 = ${shelloutput:echo_1}\r\n ... output_2 = ${shelloutput:echo_2}\r\n ... ''')\r\n\r\n >>> print system(join('bin', 'buildout')),\r\n Develop: '/sample-buildout/.'\r\n Installing shelloutput.\r\n Installing use-shelloutput.\r\n ECHO\r\n The shell says: hello.\r\n\r\n\r\nIf we give an empty command we get a hint.\r\n\r\n >>> write('buildout.cfg',\r\n ... '''\r\n ... [buildout]\r\n ... develop = .\r\n ... parts =\r\n ... shelloutput\r\n ... use-shelloutput\r\n ... offline = true\r\n ...\r\n ... [shelloutput]\r\n ... recipe = collective.recipe.shelloutput\r\n ... commands =\r\n ... empty-cmd =\r\n ...\r\n ... [use-shelloutput]\r\n ... recipe = dummyrecipe\r\n ... output_1 = ${shelloutput:empty-cmd}\r\n ... ''')\r\n\r\n >>> print system(join('bin', 'buildout')),\r\n Develop: '/sample-buildout/.'\r\n Uninstalling use-shelloutput.\r\n Uninstalling shelloutput.\r\n Installing shelloutput.\r\n Installing use-shelloutput.\r\n Empty command 'empty-cmd', no output generated.\r\n\r\n\r\nIf the execution of a command generates an error, we get the error message.\r\n\r\n >>> write('buildout.cfg',\r\n ... '''\r\n ... [buildout]\r\n ... develop = .\r\n ... parts =\r\n ... shelloutput\r\n ... use-shelloutput\r\n ... offline = true\r\n ...\r\n ... [shelloutput]\r\n ... recipe = collective.recipe.shelloutput\r\n ... commands =\r\n ... date = date -invalid-option\r\n ...\r\n ... [use-shelloutput]\r\n ... recipe = dummyrecipe\r\n ... output_1 = ${shelloutput:date}\r\n ... ''')\r\n\r\n >>> print system(join('bin', 'buildout')),\r\n Develop: '/sample-buildout/.'\r\n Uninstalling use-shelloutput.\r\n Uninstalling shelloutput.\r\n Installing shelloutput.\r\n Installing use-shelloutput.\r\n Error 'date: invalid option ... for command 'date'...\r\n\r\nChange history\r\n**************\r\n\r\n0.1 (2010-09-21)\r\n----------------\r\n\r\n- Initial release.\r\n [j23d]", "description_content_type": null, "docs_url": null, "download_url": "https://svn.plone.org/svn/collective/buildout/collective.recipe.shelloutput", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://pypi.python.org/pypi/collective.recipe.shelloutput", "keywords": "shell recipe", "license": "ZPL", "maintainer": "", "maintainer_email": "", "name": "collective.recipe.shelloutput", "package_url": "https://pypi.org/project/collective.recipe.shelloutput/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/collective.recipe.shelloutput/", "project_urls": { "Download": "https://svn.plone.org/svn/collective/buildout/collective.recipe.shelloutput", "Homepage": "http://pypi.python.org/pypi/collective.recipe.shelloutput" }, "release_url": "https://pypi.org/project/collective.recipe.shelloutput/0.1/", "requires_dist": null, "requires_python": null, "summary": "Execute shell commands and reuse the output in another part of the buildout.", "version": "0.1" }, "last_serial": 758725, "releases": { "0.1": [ { "comment_text": "", "digests": { "md5": "2af0bb173c845f3710bacc1562d71dbf", "sha256": "ac55a6605fcd2f68af6565778a056ffc7c1a7a02390ffe940112c0d467f1ede9" }, "downloads": -1, "filename": "collective.recipe.shelloutput-0.1.tar.gz", "has_sig": false, "md5_digest": "2af0bb173c845f3710bacc1562d71dbf", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4857, "upload_time": "2010-09-21T16:22:26", "url": "https://files.pythonhosted.org/packages/04/52/8d4a23a109c9781886c718ee5eb43cfede498303ded42c5877c743915a9b/collective.recipe.shelloutput-0.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "2af0bb173c845f3710bacc1562d71dbf", "sha256": "ac55a6605fcd2f68af6565778a056ffc7c1a7a02390ffe940112c0d467f1ede9" }, "downloads": -1, "filename": "collective.recipe.shelloutput-0.1.tar.gz", "has_sig": false, "md5_digest": "2af0bb173c845f3710bacc1562d71dbf", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4857, "upload_time": "2010-09-21T16:22:26", "url": "https://files.pythonhosted.org/packages/04/52/8d4a23a109c9781886c718ee5eb43cfede498303ded42c5877c743915a9b/collective.recipe.shelloutput-0.1.tar.gz" } ] }