{ "info": { "author": "J. David Ibanez", "author_email": "jdavid@emencia.com", "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 ``collective.recipe.patch``. Main differences are:\n\n- Drop built-in implementation of the patch command. Drop the\n ``patch-binary`` option. Instead calls to the ``patch`` is hard-coded.\n\n- Ignore patches already applied. To do so we pass the ``-N`` parameter\n to the ``patch`` command.\n\nLinks:\n\n- https://pypi.python.org/pypi/emencia.recipe.patch - Download\n- https://github.com/emencia/emencia.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 = emencia.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 Not found: demo/dist/...\n ...\n Installing demo-patch.\n ...\n Getting distribution for 'demo==1.0'.\n Got demo 1.0.\n patch: reading patch .../demo.patch\n ...\n patch: successfully patched ...develop-eggs/demo-1.0-py...egg/demo.py\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 = emencia.recipe.patch\n ... egg = demo==1.0\n ... patches =\n ... demo.patch\n ... another.patch\n ... \"\"\")\n\nRunning the buildout gives us:\n\n >>> print system(buildout)\n Not found: demo/dist/...\n ...\n Installing demo-patch.\n ...\n Getting distribution for 'demo==1.0'.\n Got demo 1.0.\n patch: reading patch .../demo.patch\n ...\n patch: successfully patched ...develop-eggs/demo-1.0-py...egg/demo.py\n patch: reading patch .../another.patch\n ...\n patch: successfully patched ...develop-eggs/demo-1.0-py...egg/demo.py\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 ... unzip = true\n ...\n ... [demo-patch]\n ... recipe = emencia.recipe.patch\n ... egg = ${demo-egg:eggs}\n ... patches = demo.patch\n ... \"\"\")\n\nRunning the buildout gives us:\n\n >>> print system(buildout)\n Not found: demo/dist/...\n ...\n Installing demo-egg.\n ...\n Getting distribution for 'demo==1.0'.\n Got demo 1.0.\n Installing demo-patch.\n ...\n patch: successfully patched ...eggs/demo-1.0-py...egg/demo.py\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 = emencia.recipe.patch\n ... egg = demo==1.0\n ... patches = missing-file.patch\n ... demo.patch\n ... \"\"\")\n\nRunning the buildout gives us:\n\n >>> print system(buildout)\n Not found: demo/dist/...\n ...\n Installing demo-patch.\n patch: reading patch .../missing-file.patch\n ...\n patch: patch: **** malformed patch at line 6:\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\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": "http://github.com/emencia/emencia.recipe.patch", "keywords": "buildout recipe patch", "license": "GPL", "maintainer": null, "maintainer_email": null, "name": "emencia.recipe.patch", "package_url": "https://pypi.org/project/emencia.recipe.patch/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/emencia.recipe.patch/", "project_urls": { "Download": "UNKNOWN", "Homepage": "http://github.com/emencia/emencia.recipe.patch" }, "release_url": "https://pypi.org/project/emencia.recipe.patch/0.1/", "requires_dist": null, "requires_python": null, "summary": "recipe for patching eggs", "version": "0.1" }, "last_serial": 877024, "releases": { "0.1": [ { "comment_text": "", "digests": { "md5": "6da8112fbb48a38ac324dff0d66c98e7", "sha256": "c27ca5ea480bac13658fe295928c0aceea7e3049060ef6ae81386d062d3890ff" }, "downloads": -1, "filename": "emencia.recipe.patch-0.1.tar.gz", "has_sig": false, "md5_digest": "6da8112fbb48a38ac324dff0d66c98e7", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 20441, "upload_time": "2013-09-30T15:14:01", "url": "https://files.pythonhosted.org/packages/3e/71/4f86f92c78e73b8a243053241543197aded1d495c0fc564cce38ec1d1213/emencia.recipe.patch-0.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "6da8112fbb48a38ac324dff0d66c98e7", "sha256": "c27ca5ea480bac13658fe295928c0aceea7e3049060ef6ae81386d062d3890ff" }, "downloads": -1, "filename": "emencia.recipe.patch-0.1.tar.gz", "has_sig": false, "md5_digest": "6da8112fbb48a38ac324dff0d66c98e7", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 20441, "upload_time": "2013-09-30T15:14:01", "url": "https://files.pythonhosted.org/packages/3e/71/4f86f92c78e73b8a243053241543197aded1d495c0fc564cce38ec1d1213/emencia.recipe.patch-0.1.tar.gz" } ] }