{
"info": {
"author": "Jim Fulton",
"author_email": "jim@zope.com",
"bugtrack_url": null,
"classifiers": [
"Framework :: Buildout",
"License :: OSI Approved :: Zope Public License",
"Operating System :: OS Independent",
"Programming Language :: Python",
"Programming Language :: Python :: 2",
"Programming Language :: Python :: 2.6",
"Programming Language :: Python :: 2.7",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.2",
"Programming Language :: Python :: 3.3",
"Programming Language :: Python :: 3.4"
],
"description": "**************\nzdaemon recipe\n**************\n\nThe zdaemon recipe provides support for generating zdaemon-based run\nscripts.\n\n.. contents::\n\nReleases\n********\n\n1.0.0 (unreleased)\n==================\n\n- Python 3 support.\n\n\n0.3.1 (2013-04-01)\n==================\n\n- Add MANIFEST.in, necessary with the move to git.\n\n\n0.3 (2013-04-01)\n================\n\n- Added ``shell-script`` setting. When true, shell scripts that refer\n to a zdaemon script in the software installation are generated instead\n of Python scripts in the rc directory.\n\n\n0.2 (2008-09-10)\n================\n\n- Added support for the deployment recipe ``name`` option. \n\n\n0.1 (2008-05-01)\n================\n\nInitial release.\n\nDetailed Documentation\n**********************\n\nzdaemon recipe\n==============\n\nzc.zdaemonrecipe provides a recipe that can be used to create zdaemon\nrun-control scripts. It can be used directly in buildouts and by other\nrecipes.\n\nIt accepts 2 options:\n\nprogram\n The anme of the program and, optionally, command-line arguments.\n (Note that, due to limitations in zdaemon, the command-line options\n cannot have embedded spaces.)\n\nzdaemon.conf\n Optionally, you can provide extra configuration in ZConfig format.\n What's provided will be augmented by the zdaemon recipe, as needed.\n\ndeployment\n The name of a zc.recipe.deployment deployment. If specified, then:\n\n - The configuration, log, and run-time files will be put in\n deployment-defined directories.\n\n - A logrotate configuration will be generated for the zdaemon\n transacript log.\n\nLet's look at an example:\n\n >>> write('buildout.cfg',\n ... '''\n ... [buildout]\n ... parts = run\n ...\n ... [run]\n ... recipe = zc.zdaemonrecipe\n ... program = sleep 1\n ... ''')\n\nIf we run the buildout, we'll get a run part that contains the zdaemon\nconfiguration file and a run script in the bin directory:\n\n >>> from six import print_\n\n >>> print_(system(buildout), end='')\n Installing run.\n Generated script '/sample-buildout/bin/zdaemon'.\n Generated script '/sample-buildout/bin/run'.\n\n >>> cat('parts', 'run', 'zdaemon.conf')\n \n daemon on\n directory /sample-buildout/parts/run\n program sleep 1\n socket-name /sample-buildout/parts/run/zdaemon.sock\n transcript /sample-buildout/parts/run/transcript.log\n \n \n \n \n path /sample-buildout/parts/run/transcript.log\n \n \n\n >>> cat('bin', 'run') # doctest: +NORMALIZE_WHITESPACE +ELLIPSIS\n #!/usr/local/bin/python2.4\n \n import sys\n sys.path[0:0] = [\n ...\n '/sample-buildout/eggs/zdaemon-2.0-py2.4.egg',\n '/sample-buildout/eggs/ZConfig-2.4-py2.4.egg',\n ]\n \n import zdaemon.zdctl\n \n if __name__ == '__main__':\n sys.exit(zdaemon.zdctl.main([\n '-C', '/sample-buildout/parts/run/zdaemon.conf',\n ]+sys.argv[1:]\n ))\n\nzdaemon will also be installed:\n\n >>> ls('eggs')\n d ZConfig-2.4-py2.4.egg\n d setuptools-0.6-py2.4.egg\n d zc.buildout-1.0.0b27-py2.4.egg\n d zc.recipe.egg-1.0.0-py2.4.egg\n d zdaemon-2.0-py2.4.egg\n d zope.testing-3.4-py2.4.egg\n\nYou can use an eggs option to specify a zdaemon version.\n\n\nIf we specify a deployment, then the files will be placed in\ndeployment-defined locations:\n\n >>> mkdir('etc')\n >>> mkdir('init.d')\n >>> mkdir('logrotate')\n\n >>> write('buildout.cfg',\n ... '''\n ... [buildout]\n ... parts = run\n ...\n ... [run]\n ... recipe = zc.zdaemonrecipe\n ... program = sleep 1\n ... deployment = deploy\n ...\n ... [deploy]\n ... name = test-deploy\n ... etc-directory = etc\n ... rc-directory = init.d\n ... log-directory = logs\n ... run-directory = run\n ... logrotate-directory = logrotate\n ... user = bob\n ... ''')\n\n >>> print_(system(buildout), end='')\n Uninstalling run.\n Installing run.\n Generated script '/sample-buildout/init.d/test-deploy-run'.\n\n >>> import os\n >>> os.path.exists('parts/run')\n False\n\n >>> os.path.exists('bin/run')\n False\n\n >>> cat('etc', 'run-zdaemon.conf')\n \n daemon on\n directory run\n program sleep 1\n socket-name run/run-zdaemon.sock\n transcript logs/run.log\n user bob\n \n \n \n \n path logs/run.log\n \n \n\n >>> cat('init.d', 'test-deploy-run') # doctest: +NORMALIZE_WHITESPACE +ELLIPSIS\n #!/usr/local/bin/python2.4\n \n import sys\n sys.path[0:0] = [\n ...\n '/sample-buildout/eggs/zdaemon-2.0a6-py2.4.egg',\n '/sample-buildout/eggs/ZConfig-2.4a6-py2.4.egg',\n ]\n \n import zdaemon.zdctl\n \n if __name__ == '__main__':\n sys.exit(zdaemon.zdctl.main([\n '-C', 'etc/run-zdaemon.conf',\n ]+sys.argv[1:]\n ))\n\n >>> cat('logrotate', 'test-deploy-run')\n logs/run.log {\n rotate 5\n weekly\n postrotate\n init.d/test-deploy-run -C etc/run-zdaemon.conf reopen_transcript\n endscript\n }\n\nIf you want to override any part of the generated zdaemon configuration,\nsimply provide a zdaemon.conf option in your instance section:\n\n >>> write('buildout.cfg',\n ... '''\n ... [buildout]\n ... parts = run\n ...\n ... [run]\n ... recipe = zc.zdaemonrecipe\n ... program = sleep 1\n ... deployment = deploy\n ... zdaemon.conf =\n ... \n ... daemon off\n ... socket-name /sample-buildout/parts/instance/sock\n ... transcript /dev/null\n ... \n ... \n ... \n ...\n ... [deploy]\n ... etc-directory = etc\n ... rc-directory = init.d\n ... log-directory = logs\n ... run-directory = run\n ... logrotate-directory = logrotate\n ... user = bob\n ... ''')\n\n >>> print_(system(buildout), end='')\n Uninstalling run.\n Installing run.\n Generated script '/sample-buildout/init.d/deploy-run'.\n\n >>> cat('etc', 'run-zdaemon.conf')\n \n daemon off\n directory run\n program sleep 1\n socket-name /sample-buildout/parts/instance/sock\n transcript /dev/null\n user bob\n \n \n \n \n\n\nCreating shell start scripts\n----------------------------\n\nBy default, the startup scripts are generated Python scripts that use\nthe zdaemon module. Sometimes, this is inconvenient. In particular,\nwhen deploying software, generated Python scripts may break after a\nsoftware update because they contain paths to software eggs. We can\nrequest shell scripts that invoke a generic zdaemon script. The shell\nscript only depends on the path to the zdaemon script, which generally\ndoesn't change when updating softawre.\n\nTo request a shell script, add a shell-script option with a true value:\n\n >>> write('buildout.cfg',\n ... '''\n ... [buildout]\n ... parts = run\n ...\n ... [run]\n ... recipe = zc.zdaemonrecipe\n ... program = sleep 1\n ... shell-script = true\n ... deployment = deploy\n ...\n ... [deploy]\n ... name = test-deploy\n ... etc-directory = etc\n ... rc-directory = init.d\n ... log-directory = logs\n ... run-directory = run\n ... logrotate-directory = logrotate\n ... user = alice\n ... ''')\n\n >>> print_(system(buildout), end='') # doctest: +NORMALIZE_WHITESPACE\n Uninstalling run.\n Installing run.\n zc.zdaemonrecipe: Generated shell script\n '/sample-buildout/init.d/test-deploy-run'.\n\n >>> cat('init.d', 'test-deploy-run') # doctest: +NORMALIZE_WHITESPACE\n #!/bin/sh\n su alice -c \\\n \"/sample-buildout/bin/zdaemon\n -C '/sample-buildout/etc/run-zdaemon.conf' $*\"\n\n >>> ls('etc')\n - run-zdaemon.conf\n\n\nUsing the zdaemon recipe from other recipes\n-------------------------------------------\n\nTo use the daemon recipe from other recipes, simply instantiate an\ninstance in your recipe __init__, passing your __init__ arguments, and\nthen calling the instance's install in your install method.\n\nDownload\n**********************",
"description_content_type": null,
"docs_url": null,
"download_url": "UNKNOWN",
"downloads": {
"last_day": -1,
"last_month": -1,
"last_week": -1
},
"home_page": "UNKNOWN",
"keywords": null,
"license": "ZPL 2.1",
"maintainer": null,
"maintainer_email": null,
"name": "zc.zdaemonrecipe",
"package_url": "https://pypi.org/project/zc.zdaemonrecipe/",
"platform": "UNKNOWN",
"project_url": "https://pypi.org/project/zc.zdaemonrecipe/",
"project_urls": {
"Download": "UNKNOWN",
"Homepage": "UNKNOWN"
},
"release_url": "https://pypi.org/project/zc.zdaemonrecipe/1.0.0/",
"requires_dist": null,
"requires_python": null,
"summary": "ZC Buildout recipe for zdaemon scripts",
"version": "1.0.0"
},
"last_serial": 1732179,
"releases": {
"0.1.0": [
{
"comment_text": "",
"digests": {
"md5": "d13d8d700a34f88739c8fea685b0ce37",
"sha256": "08b9ee8c2e5785af5fe990af1a919349eac35d6740bb5bf35200789904ef4061"
},
"downloads": -1,
"filename": "zc.zdaemonrecipe-0.1.0.tar.gz",
"has_sig": false,
"md5_digest": "d13d8d700a34f88739c8fea685b0ce37",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 5579,
"upload_time": "2008-05-01T20:08:46",
"url": "https://files.pythonhosted.org/packages/90/a4/7e718306822bebb604af3325f3cf55a6e095493cdfeabda13a6daaa8075c/zc.zdaemonrecipe-0.1.0.tar.gz"
}
],
"0.2": [
{
"comment_text": "",
"digests": {
"md5": "f5f03861eb3d06d7bc35f7fb894366e1",
"sha256": "b47e7a061cec3f5768037489d4e6483f5ed0a984b2d29994b7d844e4c22730c0"
},
"downloads": -1,
"filename": "zc.zdaemonrecipe-0.2.tar.gz",
"has_sig": false,
"md5_digest": "f5f03861eb3d06d7bc35f7fb894366e1",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 6255,
"upload_time": "2008-09-10T13:41:25",
"url": "https://files.pythonhosted.org/packages/9b/c9/c65976d4a1ed754a532bcbf51f40bbf8de57fb62fdf89558e59e3bde5042/zc.zdaemonrecipe-0.2.tar.gz"
}
],
"0.3": [
{
"comment_text": "",
"digests": {
"md5": "45963769570b2773692d15a2d844a4c2",
"sha256": "5ffc7acdec18510242aac50b3593216e281efd6e0c39bf35ca926aee3baa14ef"
},
"downloads": -1,
"filename": "zc.zdaemonrecipe-0.3.zip",
"has_sig": false,
"md5_digest": "45963769570b2773692d15a2d844a4c2",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 12199,
"upload_time": "2013-04-01T14:26:03",
"url": "https://files.pythonhosted.org/packages/05/19/31499265522ca55dc486cdd218e88f84c9cc0e5bb8734685e06aa60ce1f9/zc.zdaemonrecipe-0.3.zip"
}
],
"0.3.1": [
{
"comment_text": "",
"digests": {
"md5": "b5c9b5e0d0ab36865ee4c1c2f274663c",
"sha256": "b54a385aabb05d028a13ac7b627c8e2a5e710b5b9726b2543c140826047b2509"
},
"downloads": -1,
"filename": "zc.zdaemonrecipe-0.3.1.zip",
"has_sig": false,
"md5_digest": "b5c9b5e0d0ab36865ee4c1c2f274663c",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 17749,
"upload_time": "2013-04-01T15:35:45",
"url": "https://files.pythonhosted.org/packages/9c/64/9c61aac082eb2ee20df228392c182b63578f3128399a7bf1223a032ab0c1/zc.zdaemonrecipe-0.3.1.zip"
}
],
"1.0.0": [
{
"comment_text": "",
"digests": {
"md5": "05498cb2c46efb992451b1daf68ed245",
"sha256": "e89693f40655164c818f04ff7e70d858eae809598a0afea406f201d025722b43"
},
"downloads": -1,
"filename": "zc.zdaemonrecipe-1.0.0.tar.gz",
"has_sig": false,
"md5_digest": "05498cb2c46efb992451b1daf68ed245",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 10393,
"upload_time": "2015-09-21T19:49:30",
"url": "https://files.pythonhosted.org/packages/14/0e/05ded59f327fe93e71b6fcd9263fe82016cfeec2c3a13b055bbd9119a414/zc.zdaemonrecipe-1.0.0.tar.gz"
}
]
},
"urls": [
{
"comment_text": "",
"digests": {
"md5": "05498cb2c46efb992451b1daf68ed245",
"sha256": "e89693f40655164c818f04ff7e70d858eae809598a0afea406f201d025722b43"
},
"downloads": -1,
"filename": "zc.zdaemonrecipe-1.0.0.tar.gz",
"has_sig": false,
"md5_digest": "05498cb2c46efb992451b1daf68ed245",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 10393,
"upload_time": "2015-09-21T19:49:30",
"url": "https://files.pythonhosted.org/packages/14/0e/05ded59f327fe93e71b6fcd9263fe82016cfeec2c3a13b055bbd9119a414/zc.zdaemonrecipe-1.0.0.tar.gz"
}
]
}