{ "info": { "author": "Fred Drake", "author_email": "fred@zope.com", "bugtrack_url": null, "classifiers": [ "Framework :: Buildout :: Recipe" ], "description": "===========================\nDeployment-specific scripts\n===========================\n\nMany deployments provide scripts that tie the configurations into the\nsoftware. This is often done to make it easier to work with specific\ndeployments of the software.\n\nThe conventional Unix file hierarchy doesn't really provide a good\nshared place for such scripts; the zc.recipe.deployment:script recipe\ngenerates these scripts in the deployment's bin-directory, but we'd\nrather have the resulting scripts associated with the deployment itself.\n\nThe options for the recipe are the same as those for the\nzc.recipe.egg:script recipe, with the addition of a required deployment\nsetting. The etc-directory from the deployment is used instead of the\nbuildout's bin-directory. This allows deployment-specific information\nto be embedded in the script via the initialization setting.\n\nLet's take a look at a simple case. We'll need a package with a\nconsole_script entry point:\n\n >>> write('setup.py', '''\\\n ... from setuptools import setup\n ... setup(\n ... name=\"testpkg\",\n ... package_dir={\"\": \"src\"},\n ... py_modules=[\"testmodule\"],\n ... zip_safe=False,\n ... entry_points={\n ... \"console_scripts\": [\n ... \"myscript=testmodule:main\",\n ... ],\n ... },\n ... )\n ... ''')\n\n >>> mkdir('src')\n >>> write('src', 'testmodule.py', '''\\\n ... some_setting = \"42\"\n ... def main():\n ... print some_setting\n ... ''')\n\n >>> write('buildout.cfg',\n ... '''\n ... [buildout]\n ... develop = .\n ... parts = somescript\n ...\n ... [mydep]\n ... recipe = zc.recipe.deployment\n ... prefix = %s\n ... user = %s\n ... etc-user = %s\n ...\n ... [somescript]\n ... recipe = zc.recipe.script\n ... deployment = mydep\n ... eggs = testpkg\n ... scripts = myscript\n ... initialization =\n ... import testmodule\n ... testmodule.some_setting = \"24\"\n ... ''' % (sample_buildout, user, user))\n\n >>> print system(join('bin', 'buildout')), # doctest: +NORMALIZE_WHITESPACE\n Develop: 'PREFIX/.'\n Installing mydep.\n zc.recipe.deployment:\n Creating 'PREFIX/etc/mydep',\n mode 755, user 'USER', group 'GROUP'\n zc.recipe.deployment:\n Creating 'PREFIX/var/cache/mydep',\n mode 755, user 'USER', group 'GROUP'\n zc.recipe.deployment:\n Creating 'PREFIX/var/lib/mydep',\n mode 755, user 'USER', group 'GROUP'\n zc.recipe.deployment:\n Creating 'PREFIX/var/log/mydep',\n mode 755, user 'USER', group 'GROUP'\n zc.recipe.deployment:\n Creating 'PREFIX/var/run/mydep',\n mode 750, user 'USER', group 'GROUP'\n zc.recipe.deployment:\n Creating 'PREFIX/etc/cron.d',\n mode 755, user 'USER', group 'GROUP'\n zc.recipe.deployment:\n Creating 'PREFIX/etc/init.d',\n mode 755, user 'USER', group 'GROUP'\n zc.recipe.deployment:\n Creating 'PREFIX/etc/logrotate.d',\n mode 755, user 'USER', group 'GROUP'\n Installing somescript.\n Generated script 'PREFIX/etc/mydep/myscript'.\n\n >>> print ls(\"etc/mydep\")\n drwxr-xr-x USER GROUP etc/mydep\n\n >>> cat(\"etc/mydep/myscript\") # doctest: +NORMALIZE_WHITESPACE\n #!/usr/bin/python\n \n import sys\n sys.path[0:0] = [\n 'PREFIX/src',\n ]\n \n import testmodule\n testmodule.some_setting = \"24\"\n \n import testmodule\n \n if __name__ == '__main__':\n sys.exit(testmodule.main())\n\n\nRelease history\n===============\n\n\n1.0.2 (2014-08-19)\n------------------\n\nFix packaging bug (include src/zc/recipe/script/README.txt).\n\n\n1.0.1 (2014-08-19)\n------------------\n\nInitial public release.\n\n\n1.0.0 (2011-12-29)\n------------------\n\nInitial release (ZC internal).", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://svn.zope.com/repos/main/zc.recipe.script/", "keywords": "deployment build", "license": "ZVSL", "maintainer": null, "maintainer_email": null, "name": "zc.recipe.script", "package_url": "https://pypi.org/project/zc.recipe.script/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/zc.recipe.script/", "project_urls": { "Download": "UNKNOWN", "Homepage": "http://svn.zope.com/repos/main/zc.recipe.script/" }, "release_url": "https://pypi.org/project/zc.recipe.script/1.0.2/", "requires_dist": null, "requires_python": null, "summary": "zc.buildout recipe for scripts in Unix deployments", "version": "1.0.2" }, "last_serial": 1195877, "releases": { "1.0.1": [ { "comment_text": "", "digests": { "md5": "4ae9e0c54da86860a824f1dda706fea4", "sha256": "233a12e6d46b068c03e3a19c0a8375cc475881be38980eef58ac481d63686850" }, "downloads": -1, "filename": "zc.recipe.script-1.0.1.tar.gz", "has_sig": false, "md5_digest": "4ae9e0c54da86860a824f1dda706fea4", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4213, "upload_time": "2014-08-19T19:58:16", "url": "https://files.pythonhosted.org/packages/0c/7d/2bd0b7fc82f39d7b35bde1f493af0eb245c59f3d608a4455108f5959ad59/zc.recipe.script-1.0.1.tar.gz" } ], "1.0.2": [ { "comment_text": "", "digests": { "md5": "9c35cb84ac844ba545a02528552a5bdd", "sha256": "01ee94a770cef64acdb656dc88cba7432620a7ab1270a72fc23658e474b33dba" }, "downloads": -1, "filename": "zc.recipe.script-1.0.2.tar.gz", "has_sig": false, "md5_digest": "9c35cb84ac844ba545a02528552a5bdd", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4672, "upload_time": "2014-08-19T20:58:33", "url": "https://files.pythonhosted.org/packages/57/e1/d723eef806293f4576321c97c9fbd0123abac781c33297787683458459c6/zc.recipe.script-1.0.2.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "9c35cb84ac844ba545a02528552a5bdd", "sha256": "01ee94a770cef64acdb656dc88cba7432620a7ab1270a72fc23658e474b33dba" }, "downloads": -1, "filename": "zc.recipe.script-1.0.2.tar.gz", "has_sig": false, "md5_digest": "9c35cb84ac844ba545a02528552a5bdd", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4672, "upload_time": "2014-08-19T20:58:33", "url": "https://files.pythonhosted.org/packages/57/e1/d723eef806293f4576321c97c9fbd0123abac781c33297787683458459c6/zc.recipe.script-1.0.2.tar.gz" } ] }