{ "info": { "author": "YUHSD #70", "author_email": "csawyer@yumaed.org", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable" ], "description": "SORRY about the 0.5 release being buggy. uploaded a new 0.5. life should work again for everyone.\r\n\r\nFYI, I no longer use buildout, and am not actively maintaining this project. If you love it or use it, and want it upgraded to python3/etc. please send a patch, or just offer to take the project over.\r\n\r\n=====================\r\n cp.recipe.cmd package\r\n =====================\r\n \r\n .. contents::\r\n \r\n What is cp.recipe.cmd ?\r\n =======================\r\n \r\n This recipe is used to run one or more command lines.\r\n \r\n I stole this from iw.recipe.cmd (http://pypi.python.org/pypi/iw.recipe.cmd/0.1)\r\n \r\n It works differently tho, when it comes to executing shell commands. iw.recipe.cmd would push each command out separately in it's own shell. Here I push them out to a shell script, and then run the shell script. This way things like CD and other things that require state within the shell work great.\r\n \r\n Also, I changed the way it works in the config file.\r\n we have 2 options in the command.\r\n \r\n [commandexample]\r\n recipe = cp.recipe.cmd\r\n install_cmds =\r\n echo \"install commands go here\"\r\n \tcd /tmp\r\n \techo `pwd`\r\n \techo 'see, I exist in one shell instance.'\r\n update_cmds =\r\n \techo \"update commands go here\"\r\n \t\r\n \r\n On install, install_cmds will be turned into a shell script, and then ran.\r\n on update, update_cmds will be turned into a shell script and then ran. If you want update_cmds to be the same you can do something like this:\r\n update_cmds = ${commandexample:install_cmd}\r\n \r\n (where commandexample is the name of your part)\r\n \r\n python code execution is unchanged in this version, and below are the original docs.\r\n \r\n \r\n We need a config file::\r\n \r\n >>> cfg = \"\"\"\r\n ... [buildout]\r\n ... parts = cmds\r\n ...\r\n ... [cmds]\r\n ... recipe = iw.recipe.cmd\r\n ... on_install=true\r\n ... cmds= %s\r\n ... \"\"\"\r\n \r\n >>> test_file = join(sample_buildout, 'test.txt')\r\n >>> cmds = 'touch %s' % test_file\r\n >>> write(sample_buildout, 'buildout.cfg', cfg % cmds)\r\n \r\n Ok, so now we can touch a file for testing::\r\n \r\n >>> print system(buildout)\r\n Installing cmds.\r\n \r\n >>> 'test.txt' in os.listdir(sample_buildout)\r\n True\r\n \r\n And remove it::\r\n \r\n >>> test_file = join(sample_buildout, 'test.txt')\r\n >>> cmds = 'rm -f %s' % test_file\r\n >>> write(sample_buildout, 'buildout.cfg', cfg % cmds)\r\n \r\n >>> print system(buildout)\r\n Uninstalling cmds.\r\n Installing cmds.\r\n \r\n >>> 'test.txt' in os.listdir(sample_buildout)\r\n False\r\n \r\n We can run more than one commands::\r\n \r\n >>> cmds = '''\r\n ... touch %s\r\n ... rm -f %s\r\n ... ''' % (test_file, test_file)\r\n \r\n >>> test_file = join(sample_buildout, 'test.txt')\r\n >>> cmds = 'rm -f %s' % test_file\r\n >>> write(sample_buildout, 'buildout.cfg', cfg % cmds)\r\n \r\n >>> print system(buildout)\r\n Updating cmds.\r\n \r\n >>> 'test.txt' in os.listdir(sample_buildout)\r\n False\r\n \r\n We can also run some python code::\r\n \r\n >>> cfg = \"\"\"\r\n ... [buildout]\r\n ... parts = py py2\r\n ...\r\n ... [py]\r\n ... recipe = iw.recipe.cmd:py\r\n ... on_install=true\r\n ... cmds= \r\n ... >>> sample_buildout = buildout.get('directory', '.')\r\n ... >>> print os.listdir(sample_buildout)\r\n ... >>> shutil.rmtree(os.path.join(sample_buildout, \"bin\"))\r\n ... >>> print os.listdir(sample_buildout)\r\n ... [py2]\r\n ... recipe = iw.recipe.cmd:py\r\n ... on_install=true\r\n ... cmds=\r\n ... >>> def myfunc(value):\r\n ... ... return value and True or False\r\n ... >>> v = 20\r\n ... >>> print myfunc(v)\r\n ... \"\"\"\r\n \r\n >>> write(sample_buildout, 'buildout.cfg', cfg)\r\n \r\n Ok, so now we run it::\r\n \r\n >>> print system(buildout)\r\n Uninstalling cmds.\r\n Installing py.\r\n ['.installed.cfg', 'bin', 'buildout.cfg', 'develop-eggs', 'eggs', 'parts']\r\n ['.installed.cfg', 'buildout.cfg', 'develop-eggs', 'eggs', 'parts']\r\n Installing py2.\r\n True", "description_content_type": null, "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "cp.recipe.cmd", "keywords": "buildout,zc.buildout,recipe", "license": "GPL", "maintainer": "", "maintainer_email": "", "name": "cp.recipe.cmd", "package_url": "https://pypi.org/project/cp.recipe.cmd/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/cp.recipe.cmd/", "project_urls": { "Homepage": "cp.recipe.cmd" }, "release_url": "https://pypi.org/project/cp.recipe.cmd/0.5/", "requires_dist": null, "requires_python": null, "summary": "ZC Buildout recipe to execute a commande line in it's own shell", "version": "0.5" }, "last_serial": 1508500, "releases": { "0.1": [ { "comment_text": "", "digests": { "md5": "3cc38a6311f214fbc0d30b39fe3ff318", "sha256": "1e3046b2522a07da36052afb6626ddba9f88c9cfc9861f5eae37e0f3a385672c" }, "downloads": -1, "filename": "cp.recipe.cmd-0.1.tar.gz", "has_sig": false, "md5_digest": "3cc38a6311f214fbc0d30b39fe3ff318", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5539, "upload_time": "2008-03-30T00:16:54", "url": "https://files.pythonhosted.org/packages/24/2d/ece8d8307daf4c2587d401e883f3ced8e9c07196438c4ca38070ae266482/cp.recipe.cmd-0.1.tar.gz" } ], "0.1a": [ { "comment_text": "", "digests": { "md5": "43045b08c98ee2505cd21305d7ad4fde", "sha256": "02791c88480963c2132afe24e5d0c43c19c613904591c8bca08a7738d63986b8" }, "downloads": -1, "filename": "cp.recipe.cmd-0.1a-py2.5.egg", "has_sig": false, "md5_digest": "43045b08c98ee2505cd21305d7ad4fde", "packagetype": "bdist_egg", "python_version": "2.5", "requires_python": null, "size": 11114, "upload_time": "2008-03-30T00:22:43", "url": "https://files.pythonhosted.org/packages/a8/1c/1114a30569ece785f7721048e7988d92f458c1a0f4ccc75c1c72b4d780c0/cp.recipe.cmd-0.1a-py2.5.egg" }, { "comment_text": "", "digests": { "md5": "edabb746e5980a22a8a8bf5783996d00", "sha256": "0cf552465f6fb38fb8ec49945b7b93fa720aad4c7ae625460242d2fb070f9407" }, "downloads": -1, "filename": "cp.recipe.cmd-0.1a.tar.gz", "has_sig": false, "md5_digest": "edabb746e5980a22a8a8bf5783996d00", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5637, "upload_time": "2008-03-30T00:23:03", "url": "https://files.pythonhosted.org/packages/2c/9c/48047c7b4f7007e6bcc63db71feb4b52b837763fa6597bd0aa35a8b6dd8d/cp.recipe.cmd-0.1a.tar.gz" } ], "0.1b": [ { "comment_text": "", "digests": { "md5": "ffc0b478f5fde57f84b477811d587329", "sha256": "d78d00a96cdf3d652d178611c1f9b02f3d77eea0d2bd4f8bee3c3bbd9f036ed4" }, "downloads": -1, "filename": "cp.recipe.cmd-0.1b-py2.5.egg", "has_sig": false, "md5_digest": "ffc0b478f5fde57f84b477811d587329", "packagetype": "bdist_egg", "python_version": "2.5", "requires_python": null, "size": 11117, "upload_time": "2009-02-02T20:21:04", "url": "https://files.pythonhosted.org/packages/8f/a4/ba58a69070eba65db5ff94b42cc0e116b3e8fa5931f825a342db42cd1573/cp.recipe.cmd-0.1b-py2.5.egg" }, { "comment_text": "", "digests": { "md5": "22795aede8f455af1ca466d956b0517a", "sha256": "ff709be08195bdb3dcc398cc085ae3482515a4af56ee911530aed6983f632db7" }, "downloads": -1, "filename": "cp.recipe.cmd-0.1b.tar.gz", "has_sig": false, "md5_digest": "22795aede8f455af1ca466d956b0517a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4977, "upload_time": "2009-02-02T20:09:39", "url": "https://files.pythonhosted.org/packages/9a/f8/1050626b600668bc69809c87017b44f8b4655290d693c1c56167630ff408/cp.recipe.cmd-0.1b.tar.gz" } ], "0.2": [ { "comment_text": "", "digests": { "md5": "883ab3b9dc089ff5aed3b932f02a838b", "sha256": "9721c21ff76ec2404b595bce449280320dc20628cfbfbfb02c4278acd1444078" }, "downloads": -1, "filename": "cp.recipe.cmd-0.2-py2.6.egg", "has_sig": false, "md5_digest": "883ab3b9dc089ff5aed3b932f02a838b", "packagetype": "bdist_egg", "python_version": "2.6", "requires_python": null, "size": 11111, "upload_time": "2010-12-07T22:36:40", "url": "https://files.pythonhosted.org/packages/87/82/4ab059a6785bc19e5618e4fcd6a1f64d12d05ae22a227476de0c5c40c802/cp.recipe.cmd-0.2-py2.6.egg" }, { "comment_text": "", "digests": { "md5": "85ea4e871b804954dc9dc537ca2f4ff8", "sha256": "cdad1ce1e75c9580b420a6a28fa4b7164ef95bbf7e70f0c0ad3e7d3dd4c94356" }, "downloads": -1, "filename": "cp.recipe.cmd-0.2.tar.gz", "has_sig": false, "md5_digest": "85ea4e871b804954dc9dc537ca2f4ff8", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5125, "upload_time": "2010-12-07T22:34:37", "url": "https://files.pythonhosted.org/packages/c1/79/870ea053beff7d5c54027bd0d9e98550ebf51dff50e6a85ecda469f84dd5/cp.recipe.cmd-0.2.tar.gz" } ], "0.3": [ { "comment_text": "", "digests": { "md5": "e0fc65125e878e67464ddfe57b606750", "sha256": "7e35063139340bf221f887956dc15a18f4fd610b36e8d0d529bb5a3ebbda40c3" }, "downloads": -1, "filename": "cp.recipe.cmd-0.3.tar.gz", "has_sig": false, "md5_digest": "e0fc65125e878e67464ddfe57b606750", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5586, "upload_time": "2011-01-16T09:08:51", "url": "https://files.pythonhosted.org/packages/ad/50/dda1f1d098cac615fe549a6c6bfb216422754cf0ba5faa3bfe714effad04/cp.recipe.cmd-0.3.tar.gz" } ], "0.4": [ { "comment_text": "", "digests": { "md5": "22f3fe36d6f6b2055158afaa7d3f78cd", "sha256": "5e4bc0a244be1d841d6bad0a1e2070e4677dec6e223fc640e33d25126f362358" }, "downloads": -1, "filename": "cp.recipe.cmd-0.4.tar.gz", "has_sig": false, "md5_digest": "22f3fe36d6f6b2055158afaa7d3f78cd", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6145, "upload_time": "2011-01-17T17:47:23", "url": "https://files.pythonhosted.org/packages/c5/06/6ef4fc771391f1e3397695f1415d6744d3aa1b19cdd559661a3ae9e0252b/cp.recipe.cmd-0.4.tar.gz" } ], "0.5": [ { "comment_text": "", "digests": { "md5": "b8047b5ad1da8d996685fd4bcc55dab2", "sha256": "eda80b0410d64842d4b40f14b2ee6473dfbc620015aa7f9aad3daf478a995efe" }, "downloads": -1, "filename": "cp.recipe.cmd-0.5.tar.gz", "has_sig": false, "md5_digest": "b8047b5ad1da8d996685fd4bcc55dab2", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6390, "upload_time": "2014-07-24T23:44:43", "url": "https://files.pythonhosted.org/packages/5f/05/5022162c0bed3c48c86f1591097cff57509c60ff186da2dbe3541d8f1c0b/cp.recipe.cmd-0.5.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "b8047b5ad1da8d996685fd4bcc55dab2", "sha256": "eda80b0410d64842d4b40f14b2ee6473dfbc620015aa7f9aad3daf478a995efe" }, "downloads": -1, "filename": "cp.recipe.cmd-0.5.tar.gz", "has_sig": false, "md5_digest": "b8047b5ad1da8d996685fd4bcc55dab2", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6390, "upload_time": "2014-07-24T23:44:43", "url": "https://files.pythonhosted.org/packages/5f/05/5022162c0bed3c48c86f1591097cff57509c60ff186da2dbe3541d8f1c0b/cp.recipe.cmd-0.5.tar.gz" } ] }