mrs.developer - WORK IN PROGRESS
mrs.developer intends to be useful for developers.
Implemented Use Cases
- run scripts in ./bin/ from anywhere in your buildout
- run tests from anywhere in your buildout
- customize eggs, generate and apply patches
Run scripts from anywhere in your buildout
You have one terminal always open where you are in the root of your buildout
in order to run
./bin/something from time to time?
You don't need anymore, just call:
% mrsd run <script> <arg1> ...
from anywhere in your buildout and it will result in:
% ./bin/<script> <arg1> ...
with working directory set to your buildout root.
Run tests from anywhere in your buildout
% mrsd test
List eggs used by your buildout generated scripts:
% mrsd list
All of them (for now the bdists) are available for cloning:
% mrsd clone
Clone a specific egg:
% mrsd clone <egg_name_and_version>
Scripts now use this egg, instead of the one in the buildout cache.
Make changes to the egg:
% cd eggs-mrsd/<egg_name_and_version>
The egg is git controlled. You need to commit your changes to be able to generate patches.
Generate patches from commits:
% mrsd patch --generate
Create cloned eggs with patched branch:
% mrsd patch --apply
mrs.developer hooks into scripts generated by buildout to inject the paths to
customized eggs. You can do this manually by running
mrsd hookin after
scripts are (re)created by buildout, or let the mrs.developer extension handle
it for you (recommended):
[buildout] extensions = mrs.developer
mrs.developer coexists nicely with mr.developer.
The mrs.developer hook needs the mrsd command line tool available, local to your buildout or globally in your PATH (recommended).
Global install (virtualenv):
% virtualenv /path/to/mrsd/venv % /path/to/mrsd/venv/bin/pip install mrs.developer % ln /path/to/mrsd/venv/bin/mrsd ~/bin/mrsd -s
~/bin/ is just an example for a
bin directory in your
Global install (dedicated buildout), the
[buildout] parts = mrsd [mrsd] recipe = zc.recipe.egg eggs = mrs.developer
and link it into your PATH:
% ln /path/to/mrsd/buildout/bin/mrsd ~/bin/mrsd -s
mrsd is not in your path, the mrs.developer buildout extension will
create it in
./bin/. However, in order to make full use of mrsd, it needs
to be in your PATH. Don't link the one created by the extension, use a
dedicated buildout or virtualenv to install mrsd gloablly.
git >v1.7.0, for generating and applying patches (
git status --porcelain)