{ "info": { "author": "Gael Pasgrimaud", "author_email": "gael@gawel.org", "bugtrack_url": null, "classifiers": [ "Framework :: Buildout", "Intended Audience :: Developers", "License :: OSI Approved :: BSD License", "Programming Language :: Python", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.2", "Programming Language :: Python :: 3.3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: Implementation :: CPython", "Programming Language :: Python :: Implementation :: PyPy", "Topic :: Software Development :: Build Tools", "Topic :: Software Development :: Libraries :: Python Modules" ], "description": "*********************\ncollective.recipe.cmd\n*********************\n\n.. contents::\n\nIntroduction\n************\n\n.. image:: https://secure.travis-ci.org/collective/collective.recipe.cmd.png?branch=master\n :target: http://travis-ci.org/collective/collective.recipe.cmd\n\n``collective.recipe.cmd`` is a `Buildout`_ recipe to execute commands in the\nconsole user interface.\n\n.. _`Buildout`: http://buildout.org/\n\nUsage\n*****\n\nSupported options\n=================\n\nThe recipe supports the following options:\n\n``on_install``\n true if the commands must run on install\n\n``on_update``\n true if the commands must run on update\n\n``cmds``\n a set of command lines\n\n``uninstall_cmds``\n a set of command lines executed in the buildout uninstall phase\n\n``shell``\n a valid interpreter (POSIX only)\n\nExample usage\n=============\n\nWe need a config file::\n\n >>> cfg = \"\"\"\n ... [buildout]\n ... parts = cmds\n ...\n ... [cmds]\n ... recipe = collective.recipe.cmd\n ... on_install=true\n ... cmds= %s\n ... \"\"\"\n\n >>> test_file = join(sample_buildout, 'test.txt')\n >>> cmds = 'echo \"bouh\" > %s' % test_file\n >>> write(sample_buildout, 'buildout.cfg', cfg % cmds)\n\nOk, so now we can touch a file for testing::\n\n >>> print(system(buildout))\n Installing cmds...\n\n >>> 'test.txt' in os.listdir(sample_buildout)\n True\n\nAnd remove it::\n\n >>> test_file = join(sample_buildout, 'test.txt')\n >>> if sys.platform == 'win32':\n ... cmds = 'del %s' % test_file\n ... else:\n ... cmds = 'rm -f %s' % test_file\n >>> write(sample_buildout, 'buildout.cfg', cfg % cmds)\n\n >>> print(system(buildout))\n Uninstalling cmds.\n Running uninstall recipe.\n Installing cmds...\n\n >>> 'test.txt' in os.listdir(sample_buildout)\n False\n\nWe can run more than one commands::\n\n >>> if sys.platform == 'win32':\n ... cmds = '''\n ... echo \"bouh\" > %s\n ... del %s\n ... ''' % (test_file, test_file)\n ... else:\n ... cmds = '''\n ... echo \"bouh\" > %s\n ... rm -f %s\n ... ''' % (test_file, test_file)\n\n >>> test_file = join(sample_buildout, 'test.txt')\n >>> if sys.platform == 'win32':\n ... cmds = 'del %s' % test_file\n ... else:\n ... cmds = 'rm -f %s' % test_file\n >>> write(sample_buildout, 'buildout.cfg', cfg % cmds)\n\n >>> print(system(buildout))\n Updating cmds...\n\n >>> 'test.txt' in os.listdir(sample_buildout)\n False\n\nWe can also run some python code::\n\n >>> cfg = \"\"\"\n ... [buildout]\n ... parts = py py2\n ...\n ... [py]\n ... recipe = collective.recipe.cmd:py\n ... on_install=true\n ... cmds= \n ... >>> sample_buildout = buildout.get('directory', '.')\n ... >>> print(sorted(os.listdir(sample_buildout)))\n ... >>> os.remove(os.path.join(sample_buildout, \".installed.cfg\"))\n ... >>> print(sorted(os.listdir(sample_buildout)))\n ... [py2]\n ... recipe = collective.recipe.cmd:py\n ... on_install=true\n ... cmds=\n ... >>> def myfunc(value):\n ... ... return value and True or False\n ... >>> v = 20\n ... >>> print(myfunc(v))\n ... \"\"\"\n\n >>> write(sample_buildout, 'buildout.cfg', cfg)\n\nOk, so now we run it::\n\n >>> print(system(buildout))\n Uninstalling cmds.\n Running uninstall recipe.\n Installing py.\n ['.installed.cfg', 'bin', 'buildout.cfg', 'develop-eggs', 'eggs', 'parts']\n ['bin', 'buildout.cfg', 'develop-eggs', 'eggs', 'parts']\n Installing py2.\n True...\n\nIf the shell script generated from the commands returns a non-zero\nexit/status code then an exception is raised and buildout fails::\n\n >>> cfg = \"\"\"\n ... [buildout]\n ... parts = cmds\n ...\n ... [cmds]\n ... recipe = collective.recipe.cmd\n ... on_install=true\n ... cmds= exit 23\n ... \"\"\"\n\n >>> write(sample_buildout, 'buildout.cfg', cfg)\n\n >>> print(system(buildout))\n Uninstalling py2.\n Uninstalling py.\n Installing cmds...\n ...CalledProcessError: Command 'sh .../run' returned non-zero exit status 23\n\nContributors\n************\n\n- `Alter Way Solutions `_\n\n- Gael Pasgrimaud\n\n- Lorenzo Gil Sanchez\n\n- Maik R\u00f6der\n\n- Josip Deli\u0107\n\nChangelog\n*********\n\n0.11 (2015-06-06)\n=================\n\n- Add support for Python 3.2 and PyPy3.\n- Add support for testing with tox.\n- Fix compatibility with ``zope.testing`` 4.2.0.\n- Add version and implementation trove classifiers.\n\n\n0.10 (2015-02-25)\n=================\n\n- Fixed PyPy compatibility. [hathawsh]\n\n\n0.9 (2014-10-04)\n================\n\n- Python3. [jod]\n\n\n0.8 (2013-11-05)\n================\n\n- Fix package distribution. [hvelarde]\n\n\n0.7 (2013-11-04)\n================\n\n- Fail if the script generated from ``cmds`` returns with a non-zero\n exit/status code. [rpatterson]\n\n- Remove GPL remnants. [rpatterson]\n\n\n0.6 (2011-11-28)\n================\n\n- relicense under BSD as agreed with gawel [jodok]\n\n\n0.5 (2010-02-03)\n================\n\n- dont run commands with on_install/on_update are set to false. Thanks to\n Sean Kelly for bug report\n [gawel]\n\n\n0.4 (2009-08-18)\n================\n\n- Add support for an 'uninstall_cmds' option to execute commands during the\n uninstall Buildout phase.\n [lgs, mroeder]\n\n\n0.3 (2008-04-22)\n================\n\n- apply last version of the recipe template\n [gawel]\n\n\n0.2 (2008-04-22)\n================\n\n- run commands in one process\n [gawel]\n\n- win32 tests compat\n [gawel]", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://plone.org/products/collective-recipes", "keywords": "buildout recipe", "license": "BSD", "maintainer": null, "maintainer_email": null, "name": "collective.recipe.cmd", "package_url": "https://pypi.org/project/collective.recipe.cmd/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/collective.recipe.cmd/", "project_urls": { "Download": "UNKNOWN", "Homepage": "http://plone.org/products/collective-recipes" }, "release_url": "https://pypi.org/project/collective.recipe.cmd/0.11/", "requires_dist": null, "requires_python": null, "summary": "A Buildout recipe to execute commands in the console user interface", "version": "0.11" }, "last_serial": 1581263, "releases": { "0.10": [ { "comment_text": "", "digests": { "md5": "72d554fb3a0d0dc260c7268e118a02a4", "sha256": "96df433d49eac308ce523d8c79bb47463a395af099d354a5f2e0d724f34ba2a7" }, "downloads": -1, "filename": "collective.recipe.cmd-0.10.zip", "has_sig": false, "md5_digest": "72d554fb3a0d0dc260c7268e118a02a4", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 14747, "upload_time": "2015-02-25T10:29:29", "url": "https://files.pythonhosted.org/packages/94/9b/3faa946b262cf7541d5c2e624654842bfed2845545a7dfa69428a182e223/collective.recipe.cmd-0.10.zip" } ], "0.11": [ { "comment_text": "", "digests": { "md5": "fc99b7ce8a35f256880cf3c4b07b82f1", "sha256": "5c251ed2100de54a435594e297aa2173cfa55e9f335373523718c83aa470e173" }, "downloads": -1, "filename": "collective.recipe.cmd-0.11.tar.gz", "has_sig": false, "md5_digest": "fc99b7ce8a35f256880cf3c4b07b82f1", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7392, "upload_time": "2015-06-06T21:09:58", "url": "https://files.pythonhosted.org/packages/a6/75/a1dda92a8af388382744d0c39d2e177364928e373d286bd54bc8ebc006db/collective.recipe.cmd-0.11.tar.gz" } ], "0.4": [ { "comment_text": "", "digests": { "md5": "c525c6b762776d365269b1deea47fd8d", "sha256": "a304ed2318d7f5c8b7320be7f162a77bf67b450b06edf95fef3ff005ee5c1ffe" }, "downloads": -1, "filename": "collective.recipe.cmd-0.4.tar.gz", "has_sig": false, "md5_digest": "c525c6b762776d365269b1deea47fd8d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6731, "upload_time": "2009-08-18T07:28:03", "url": "https://files.pythonhosted.org/packages/ab/fd/46a9d3e4b5035dab9ff1b1adb2f3a08c9515fded60146790844d9fe972ef/collective.recipe.cmd-0.4.tar.gz" } ], "0.5": [ { "comment_text": "", "digests": { "md5": "53c925e764e98bdfd8ac6e0b51ee1bb9", "sha256": "00438a17ed288ae32a37ff7027cda85f6283af166cd6f21b87676613657083a6" }, "downloads": -1, "filename": "collective.recipe.cmd-0.5.tar.gz", "has_sig": false, "md5_digest": "53c925e764e98bdfd8ac6e0b51ee1bb9", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6864, "upload_time": "2010-02-03T15:49:47", "url": "https://files.pythonhosted.org/packages/aa/67/c3f15f9d63582c86c42ac97af40152cf7e77d5e8432abddf687013c5ee8b/collective.recipe.cmd-0.5.tar.gz" } ], "0.6": [ { "comment_text": "", "digests": { "md5": "d45a71b27b4b8c5bbc8dbf1970a6500a", "sha256": "d03e6f00a5a56cb9df797ca6e42c8c7b408f47a93611beb0d8edf98743329880" }, "downloads": -1, "filename": "collective.recipe.cmd-0.6.tar.gz", "has_sig": false, "md5_digest": "d45a71b27b4b8c5bbc8dbf1970a6500a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6984, "upload_time": "2012-11-28T15:16:52", "url": "https://files.pythonhosted.org/packages/4e/a8/0aaa1e36d2e2270213f1d570142795261750006e45564ee99e1fcb124c43/collective.recipe.cmd-0.6.tar.gz" } ], "0.7": [ { "comment_text": "", "digests": { "md5": "9b88b90897be40e38ca3556a919a15d5", "sha256": "ba8bc70f96a177d5a1827bfc4343aac876974852dff49a9e3d8664626cd9c638" }, "downloads": -1, "filename": "collective.recipe.cmd-0.7.tar.gz", "has_sig": false, "md5_digest": "9b88b90897be40e38ca3556a919a15d5", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5174, "upload_time": "2013-11-04T21:45:05", "url": "https://files.pythonhosted.org/packages/c0/bf/00b5037f3585be806168b1452e1c63ec7134d452fbf677f147a7ac7397d4/collective.recipe.cmd-0.7.tar.gz" } ], "0.8": [ { "comment_text": "", "digests": { "md5": "a380be4722807dbe3bd8c7a2dbe01326", "sha256": "96d7510d2b78747060465c57cb215d6b4adfa78afc3a09d56e1f95e6973214d9" }, "downloads": -1, "filename": "collective.recipe.cmd-0.8.tar.gz", "has_sig": false, "md5_digest": "a380be4722807dbe3bd8c7a2dbe01326", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6385, "upload_time": "2013-11-05T14:57:58", "url": "https://files.pythonhosted.org/packages/ca/34/666181353d58318b5673a4a4828737eaa63930ecec14c65e8d318a6890eb/collective.recipe.cmd-0.8.tar.gz" } ], "0.9": [ { "comment_text": "", "digests": { "md5": "5b9cb7c1df35310728c1effc553e89c8", "sha256": "a2f19413e1022dcbbe0c4cd979ecd6d5579d96f69df3ef1fb118d0b463c75752" }, "downloads": -1, "filename": "collective.recipe.cmd-0.9.tar.gz", "has_sig": false, "md5_digest": "5b9cb7c1df35310728c1effc553e89c8", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7044, "upload_time": "2014-10-06T10:24:37", "url": "https://files.pythonhosted.org/packages/d7/1f/8549a0e3f16f78d51057892239a0024177b33656eaf4d86e9871b0335f12/collective.recipe.cmd-0.9.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "fc99b7ce8a35f256880cf3c4b07b82f1", "sha256": "5c251ed2100de54a435594e297aa2173cfa55e9f335373523718c83aa470e173" }, "downloads": -1, "filename": "collective.recipe.cmd-0.11.tar.gz", "has_sig": false, "md5_digest": "fc99b7ce8a35f256880cf3c4b07b82f1", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7392, "upload_time": "2015-06-06T21:09:58", "url": "https://files.pythonhosted.org/packages/a6/75/a1dda92a8af388382744d0c39d2e177364928e373d286bd54bc8ebc006db/collective.recipe.cmd-0.11.tar.gz" } ] }