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
1=== modified file 'doc/buildout.txt'
2--- doc/buildout.txt 2009-07-31 20:13:12 +0000
3+++ doc/buildout.txt 2010-07-31 21:05:33 +0000
4@@ -302,6 +302,8 @@
5 develop = .
6 lazr_uri_branch
7
8+ See `Developing a Dependent Library In Parallel`_ for more on this.
9+
10 The other basic key in the ``[buildout]`` section that we'll highlight here
11 is ``parts``. This key identifies the other sections in buildout.cfg that
12 will be processed. A section that is not identified in the ``[buildout]``
13@@ -581,6 +583,51 @@
14
15 .. _`the egg_info command`: http://peak.telecommunity.com/DevCenter/setuptools#tagging-and-daily-build-or-snapshot-releases
16
17+Developing a Dependent Library In Parallel
18+==========================================
19+
20+Sometimes you need to iterate on change to a library used by Launchpad
21+that is managed by buildout as an egg. You could just edit what it is in
22+the ``eggs`` directory, but it is harder to produce a patch while doing
23+this. You could instead grab a branch of the libarary and produce an egg
24+everytime you make a change and make buildout use the new egg, but this is
25+slow.
26+
27+buildout defaults to only using the current directory as code that will
28+be used without creating a distribution. We can arrange for it to use other
29+paths as well, so we can use a checkout of any code we like, with changes
30+being picked up instantly without us having to create a distribution.
31+
32+To do this add the extra paths to the ``develop`` key in the ``[buildout]``
33+section of ``buildout.cfg"::
34+
35+ [buildout]
36+ develop = .
37+ path/to/branch
38+
39+and re-run ``make``.
40+
41+Now any changes you make in that path will be picked up, and you are free
42+to make the changes you need and test them in the Launchpad environment.
43+
44+Once you are finished you can produce a distribution as above for inclusion
45+in to Launchpad, as well as sending your patch upstream. At that point you
46+are free to revert the configuration to only develop Launchpad. You should
47+not submit your branch with this change in the configuration as it will
48+not work for others.
49+
50+Be aware that you may have to change the version for the package in
51+``versions.cfg`` if there is a difference between the version in the
52+``eggs`` directory and the one in the ``setup.py`` that you pointed to
53+in the ``develop`` key.
54+
55+One thing to be wary of is that setuptools treats "develop eggs" created
56+by this process with the same precedence as system packages. That means
57+that if the version in the ``setup.py`` at the path that you put in the
58+``develop`` key is the same as the version installed system wide, setuptools
59+may pick the wrong one. If that happens then increase the version in
60+setup.py and setuptools will take it.
61+
62 =====================
63 Possible Future Goals
64 =====================