Merge lp:~james-w/launchpad/buildout-doc into lp:launchpad

Proposed by James Westby
Status: Merged
Approved by: Jonathan Lange
Approved revision: no longer in the source branch.
Merged at revision: 11276
Proposed branch: lp:~james-w/launchpad/buildout-doc
Merge into: lp:launchpad
Diff against target: 64 lines (+47/-0)
1 file modified
doc/buildout.txt (+47/-0)
To merge this branch: bzr merge lp:~james-w/launchpad/buildout-doc
Reviewer Review Type Date Requested Status
Jonathan Lange (community) Approve
Review via email: mp+31465@code.launchpad.net

Commit message

There is now documentation in doc/buildout.txt on using the "develop" setting to change a library and test it in launchpad.

Description of the change

Hi,

Here's some docs that Robert requested I write on using a branch
of a library as a dependency in Launchpad.

Thanks,

James

To post a comment you must log in.
Revision history for this message
Jonathan Lange (jml) wrote :

Rockin'. Thanks.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'doc/buildout.txt'
--- doc/buildout.txt 2009-07-31 20:13:12 +0000
+++ doc/buildout.txt 2010-07-31 21:05:33 +0000
@@ -302,6 +302,8 @@
302 develop = .302 develop = .
303 lazr_uri_branch303 lazr_uri_branch
304304
305 See `Developing a Dependent Library In Parallel`_ for more on this.
306
305 The other basic key in the ``[buildout]`` section that we'll highlight here307 The other basic key in the ``[buildout]`` section that we'll highlight here
306 is ``parts``. This key identifies the other sections in buildout.cfg that308 is ``parts``. This key identifies the other sections in buildout.cfg that
307 will be processed. A section that is not identified in the ``[buildout]``309 will be processed. A section that is not identified in the ``[buildout]``
@@ -581,6 +583,51 @@
581583
582.. _`the egg_info command`: http://peak.telecommunity.com/DevCenter/setuptools#tagging-and-daily-build-or-snapshot-releases584.. _`the egg_info command`: http://peak.telecommunity.com/DevCenter/setuptools#tagging-and-daily-build-or-snapshot-releases
583585
586Developing a Dependent Library In Parallel
587==========================================
588
589Sometimes you need to iterate on change to a library used by Launchpad
590that is managed by buildout as an egg. You could just edit what it is in
591the ``eggs`` directory, but it is harder to produce a patch while doing
592this. You could instead grab a branch of the libarary and produce an egg
593everytime you make a change and make buildout use the new egg, but this is
594slow.
595
596buildout defaults to only using the current directory as code that will
597be used without creating a distribution. We can arrange for it to use other
598paths as well, so we can use a checkout of any code we like, with changes
599being picked up instantly without us having to create a distribution.
600
601To do this add the extra paths to the ``develop`` key in the ``[buildout]``
602section of ``buildout.cfg"::
603
604 [buildout]
605 develop = .
606 path/to/branch
607
608and re-run ``make``.
609
610Now any changes you make in that path will be picked up, and you are free
611to make the changes you need and test them in the Launchpad environment.
612
613Once you are finished you can produce a distribution as above for inclusion
614in to Launchpad, as well as sending your patch upstream. At that point you
615are free to revert the configuration to only develop Launchpad. You should
616not submit your branch with this change in the configuration as it will
617not work for others.
618
619Be aware that you may have to change the version for the package in
620``versions.cfg`` if there is a difference between the version in the
621``eggs`` directory and the one in the ``setup.py`` that you pointed to
622in the ``develop`` key.
623
624One thing to be wary of is that setuptools treats "develop eggs" created
625by this process with the same precedence as system packages. That means
626that if the version in the ``setup.py`` at the path that you put in the
627``develop`` key is the same as the version installed system wide, setuptools
628may pick the wrong one. If that happens then increase the version in
629setup.py and setuptools will take it.
630
584=====================631=====================
585Possible Future Goals632Possible Future Goals
586=====================633=====================