{ "info": { "author": "Kirill Kuzminykh", "author_email": "saikuz@mail.ru", "bugtrack_url": null, "classifiers": [ "Framework :: Buildout", "Intended Audience :: Developers", "License :: OSI Approved :: GNU General Public License (GPL)", "Topic :: Software Development :: Build Tools", "Topic :: Software Development :: Libraries :: Python Modules" ], "description": "This is a fork of ``emencia.recipe.patch``. Main differences are:\n\n- Added Python 3 support.\n\nLinks:\n\n- https://pypi.python.org/pypi/cykooz.recipe.patch - Download\n- https://github.com/cykooz/cykooz.recipe.patch - Source code\n\n\nSupported options\n=================\n\nThe recipe supports the following options:\n\npath\n Define a directory in which the patch should be applied. For\n example::\n\n path = src/some/directory/\n\negg\n Define which egg should be patched. You can also pin to a specific\n version. For example::\n\n egg = some.egg<=1.1.1\n\npatches\n Paths to patch files. These patches are applied in order. For\n example::\n\n patches = patches/my_very_sprecial.patch\n patches/another_loverly.patch\n\nExample usage\n=============\n\nOur demo package which we will patch:\n\n >>> mkdir(sample_buildout, 'demo')\n >>> write(sample_buildout, 'demo', 'README.txt', \" \")\n >>> write(sample_buildout, 'demo', 'demo.py',\n ... \"\"\"# demo egg\n ... \"\"\")\n >>> write(sample_buildout, 'demo', 'setup.py',\n ... \"\"\"\n ... from setuptools import setup\n ...\n ... setup(\n ... name = \"demo\",\n ... version='1.0',\n ... py_modules=['demo']\n ... )\n ... \"\"\")\n >>> print_(system(buildout + ' setup demo bdist_egg')) # doctest: +ELLIPSIS\n Running setup script 'demo/setup.py'.\n ...\n\nCreate our patch:\n\n >>> write(sample_buildout, 'demo.patch',\n ... \"\"\"diff --git demo.py demo.py\n ... --- demo.py\n ... +++ demo.py\n ... @@ -1 +1,2 @@\n ... # demo egg\n ... +# patching\n ... \"\"\")\n\nLet's write out buildout.cfg to patch our demo package:\n\n >>> write(sample_buildout, 'buildout.cfg',\n ... \"\"\"\n ... [buildout]\n ... parts = demo-patch\n ... index = demo/dist/\n ...\n ... [demo-patch]\n ... recipe = cykooz.recipe.patch\n ... egg = demo==1.0\n ... patches = demo.patch\n ... \"\"\")\n\nOur final egg name depends on current python version:\n\n >>> import sys\n >>> demoegg = 'demo-1.0-py%d.%d.egg' % sys.version_info[:2]\n\nRunning the buildout gives us:\n\n >>> print_(system(buildout))\n Installing demo-patch.\n Getting distribution for 'demo==1.0'.\n Got demo 1.0.\n patch: reading patch .../demo.patch\n ...\n patch: patching file demo.py\n patch: successfully patched .../demo-1.0...\n ...\n\n >>> ls(sample_buildout, 'develop-eggs', demoegg)\n d EGG-INFO\n - demo.py\n - demo.pyc\n - demo.pyo\n >>> cat(sample_buildout, 'demo', 'demo.py')\n # demo egg\n >>> cat(sample_buildout, 'develop-eggs', demoegg, 'demo.py')\n # demo egg\n # patching\n\nMultiple patches\n----------------\n\nIf you have more than one patch to apply:\n\n >>> write(sample_buildout, 'another.patch',\n ... \"\"\"diff --git demo.py demo.py\n ... --- demo.py\n ... +++ demo.py\n ... @@ -1,2 +1 @@\n ... -# demo egg\n ... # patching\n ... \"\"\")\n\nUpdate your buildout.cfg to list the new patch. In this case,\nanother.patch should be applied after demo.patch:\n\n >>> write(sample_buildout, 'buildout.cfg',\n ... \"\"\"\n ... [buildout]\n ... parts = demo-patch\n ... index = demo/dist/\n ...\n ... [demo-patch]\n ... recipe = cykooz.recipe.patch\n ... egg = demo==1.0\n ... patches =\n ... demo.patch\n ... another.patch\n ... \"\"\")\n\nRunning the buildout gives us:\n\n >>> rmdir(sample_buildout, 'develop-eggs', demoegg)\n >>> remove(sample_buildout, '.installed.cfg')\n >>> _ = system(buildout + ' setup demo bdist_egg')\n >>> print_(system(buildout))\n Installing demo-patch.\n Getting distribution for 'demo==1.0'.\n Got demo 1.0.\n patch: reading patch .../demo.patch\n ...\n patch: patching file demo.py\n patch: successfully patched .../demo-1.0...\n patch: reading patch .../another.patch\n ...\n patch: patching file demo.py\n patch: successfully patched .../demo-1.0...\n ...\n\n >>> cat(sample_buildout, 'develop-eggs', demoegg, 'demo.py')\n # patching\n\nPatching an egg installed in another part\n-----------------------------------------\n\nAnother possibility is to install an egg with zc.recipe.egg (or\nprobably any other recipe) and patch it afterwards. However, it is\nnecessary to install the egg unzipped, and the egg may end up in the\neggs-folder instead the develop-eggs folder.\n\n >>> write(sample_buildout, 'buildout.cfg',\n ... \"\"\"\n ... [buildout]\n ... parts = demo-egg demo-patch\n ... index = demo/dist/\n ...\n ... [demo-egg]\n ... recipe = zc.recipe.egg\n ... eggs = demo==1.0\n ...\n ... [demo-patch]\n ... recipe = cykooz.recipe.patch\n ... egg = ${demo-egg:eggs}\n ... patches = demo.patch\n ... \"\"\")\n\nRunning the buildout gives us:\n\n >>> rmdir(sample_buildout, 'develop-eggs', demoegg)\n >>> remove(sample_buildout, '.installed.cfg')\n >>> _ = system(buildout + ' setup demo bdist_egg')\n >>> print_(system(buildout))\n Installing demo-egg.\n Getting distribution for 'demo==1.0'.\n Got demo 1.0.\n Installing demo-patch.\n patch: reading patch .../demo.patch\n ...\n patch: patching file demo.py\n patch: successfully patched .../demo-1.0...\n\n >>> ls(sample_buildout, 'eggs', demoegg)\n d EGG-INFO\n - demo.py\n - demo.pyc\n - demo.pyo\n >>> cat(sample_buildout, 'demo', 'demo.py')\n # demo egg\n >>> cat(sample_buildout, 'eggs', demoegg, 'demo.py')\n # demo egg\n # patching\n\nBroken patches\n--------------\n\nIf one of the patches is broken:\n\n >>> write(sample_buildout, 'missing-file.patch',\n ... \"\"\"diff --git missing-file.py missing-file.py\n ... --- missing-file.py\n ... +++ missing-file.py\n ... @@ -1,2 +0 @@\n ... -# BROKEN\n ... -# PATCH\n ... \"\"\")\n\nWhen you try to apply multiple patches, it will fail to apply any\nsubsequent patches, letting you fix the problem:\n\n >>> write(sample_buildout, 'buildout.cfg',\n ... \"\"\"\n ... [buildout]\n ... parts = demo-patch\n ... index = demo/dist/\n ...\n ... [demo-patch]\n ... recipe = cykooz.recipe.patch\n ... egg = demo==1.0\n ... patches = missing-file.patch\n ... demo.patch\n ... \"\"\")\n\nRunning the buildout gives us:\n\n >>> rmdir(sample_buildout, 'eggs', demoegg)\n >>> remove(sample_buildout, '.installed.cfg')\n >>> _ = system(buildout + ' setup demo bdist_egg')\n >>> print_(system(buildout))\n Installing demo-patch.\n Getting distribution for 'demo==1.0'.\n Got demo 1.0.\n patch: reading patch .../missing-file.patch\n ...\n patch: The next patch would delete the file missing-file.py,\n patch: which does not exist! Skipping patch.\n patch: patch: **** malformed patch at line 6:\n ...\n While:\n Installing demo-patch.\n Error: could not apply .../missing-file.patch\n\n >>> cat(sample_buildout, 'develop-eggs', demoegg, 'demo.py')\n # demo egg\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": "https://github.com/cykooz/cykooz.recipe.patch", "keywords": "buildout recipe patch", "license": "GPL", "maintainer": null, "maintainer_email": null, "name": "cykooz.recipe.patch", "package_url": "https://pypi.org/project/cykooz.recipe.patch/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/cykooz.recipe.patch/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/cykooz/cykooz.recipe.patch" }, "release_url": "https://pypi.org/project/cykooz.recipe.patch/0.1/", "requires_dist": null, "requires_python": null, "summary": "recipe for patching eggs", "version": "0.1" }, "last_serial": 1788280, "releases": { "0.1": [ { "comment_text": "", "digests": { "md5": "a3b318896028ed46a164e4b0acde1fde", "sha256": "0534de17aedec91a9fd9ef593771e0bcf674d4f3bcb8ffc4a3a44ad849f6b2da" }, "downloads": -1, "filename": "cykooz.recipe.patch-0.1.tar.gz", "has_sig": false, "md5_digest": "a3b318896028ed46a164e4b0acde1fde", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 14619, "upload_time": "2015-10-27T12:14:00", "url": "https://files.pythonhosted.org/packages/04/4b/313de179aa98041b9d50dc45ad1840b0c0fe1edf355295a12a01c26c91a9/cykooz.recipe.patch-0.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "a3b318896028ed46a164e4b0acde1fde", "sha256": "0534de17aedec91a9fd9ef593771e0bcf674d4f3bcb8ffc4a3a44ad849f6b2da" }, "downloads": -1, "filename": "cykooz.recipe.patch-0.1.tar.gz", "has_sig": false, "md5_digest": "a3b318896028ed46a164e4b0acde1fde", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 14619, "upload_time": "2015-10-27T12:14:00", "url": "https://files.pythonhosted.org/packages/04/4b/313de179aa98041b9d50dc45ad1840b0c0fe1edf355295a12a01c26c91a9/cykooz.recipe.patch-0.1.tar.gz" } ] }