Reputation: 36483
I watched this video and tried playing with the source release tool.
First, here's an uncertain part in the docs:
To create a source release, simply run the buildout-source-release script, passing a file URL or a subversion URL [3] and the name of the configuration file to use. File URLs are useful for testing and can be used with non-subversion source-code control systems.
What file url do they mean? The project root?
Second, the other argument should be a path to buildout.cfg. When I use the usual buildout.cfg in the project, sourcerelease re-builds the whole project. If it crashes along the way, bin/buildout-source-release
is gone, I have to run bin/buildout
again. Is this avoidable?
Third, buildout-source-release
downloads packages (even though they are pinned and those versions are in ~/.buildout
). I also use a custom packages cache specified in buildout.cfg:
[buildout]
index = http://pypi.*****.com
b-s-r ignores it too! Of course, among some 50 packages that I have, some are unavailable at the moment (most often the Scipy server is down).
How do I make it reuse my local package sources?
Upvotes: 2
Views: 205
Reputation: 1123032
The script creates a full distribution from scratch, by checking out the supplied Subversion URL into a temporary directory, then run the buildout configuration file in that directory, named by the second parameter.
Alternatively, instead of a Subversion repository, it could just copy the directory structure pointed at by a file URL; the latter is a stop-gap measure to support more than just SVN repositories. You create a working copy of your Git project, for example, then point to it with a file:///path/to/git/wc/
URL.
The script builds a fully stand-alone copy of your buildout. In order to do so, it has to create an empty cache and fill that by letting the recipes do their work. Later on, the install script reuses that cache to run the installation.
Also, recipes use their own means of checking the cache and downloading resources, buildout does not maintain it on behalf of the recipes. Thus, there is currently no mechanism in place for the script to determine if anything could be re-used from the existing cache.
Upvotes: 1