recipe for patching eggs
Project description
This is first public release just so people can try it out.
Code repository: http://github.com/garbas/collective.recipe.patch
Questions and comments to rok@garbas.si
Detailed Documentation
Supported options
The recipe supports the following options:
- egg
Define which egg should be patched. You can also pin to version. example: some.egg<=1.1.1
- patch
Path to patch file. example: patches/my_very_sprecial.patch
Example usage
Our demo package which will patch.
>>> mkdir(sample_buildout, 'demo') >>> write(sample_buildout, 'demo', 'README.txt', " ") >>> write(sample_buildout, 'demo', 'demo.py', ... """# demo egg ... """) >>> write(sample_buildout, 'demo', 'setup.py', ... """ ... from setuptools import setup ... ... setup( ... name = "demo", ... version='1.0', ... py_modules=['demo'] ... ) ... """) >>> print system(buildout+' setup demo bdist_egg'), # doctest: +ELLIPSIS Running setup script 'demo/setup.py'. ...
Create out patch.
>>> write(sample_buildout, 'demo.patch', ... """diff --git demo.py demo.py ... --- demo.py ... +++ demo.py ... @@ -1 +1,2 @@ ... # demo egg ... +# patching ... """)
Let now write out buildout.cfg to patch our demo package
>>> write(sample_buildout, 'buildout.cfg', ... """ ... [buildout] ... parts = demo-eggs demo-patch ... index = %(dist)s ... ... [demo-eggs] ... recipe = zc.recipe.egg ... eggs = demo ... ... [demo-patch] ... recipe = collective.recipe.patch ... egg = %(egg)s ... patch = %(patch)s ... """ % { 'egg' : 'demo==1.0', ... 'patch' : 'demo.patch', ... 'dist' : join('demo', 'dist'), })
Running the buildout gives us:
>>> print 'start', system(buildout) start Not found: demo/dist/zc.buildout/ ... >>> ls(sample_buildout, 'eggs-patched') d demo-1.0-py2.4.egg >>> cat(sample_buildout, 'demo', 'demo.py') # demo egg >>> cat(sample_buildout, 'eggs-patched', 'demo-1.0-py2.4.egg', 'demo.py') # demo egg # patching
Contributors
Rok Garbas, Author
Change history
0.1 (xxxx-xx-xx)
Created recipe with ZopeSkel [Rok Garbas].
Download
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Close
Hashes for collective.recipe.patch-0.1b1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 68226301e76d758b616c289413bf96b782e8e1c7241f81f00b7f9b78523db5d4 |
|
MD5 | 8179a870a24c18482a79f6f516263aea |
|
BLAKE2b-256 | 0f53cf9e18dd3f50596f67b198a09ec25f2ffad303e1d39a90de4b5897bf5ee9 |
Close
Hashes for collective.recipe.patch-0.1b1-py2.4.egg
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2a02bd365bbb8105f38116760249fa569254af55cee59141e418688283bd8d04 |
|
MD5 | 5a97fc0c91c1a4b9197f814115013bf2 |
|
BLAKE2b-256 | bed5b92767cfae519f759af3cfefc956a2132f581d137596a8fed825aaa39283 |