a per-framework shared eggs directory
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Buildout |
New
|
Undecided
|
Unassigned | ||
grok |
Won't Fix
|
Undecided
|
Unassigned |
Bug Description
grokproject, a tool to create projects using the Grok web framework, currently inspects .buildout and if there is no default.cfg, creates a line which says:
[buildout]
eggs-directory = /path/to/
This so that users are set up with a shared eggs directory which greatly cuts down on download times when people create new projects or add a dependency to an existing project that they had used elsewhere. We don't do this in grokproject-
For Grok, which restricts which versions of eggs to download from pypi using the 'versions' construct in buildout, this approach works pretty well. Some other projects however rely on a custom index to restrict which versions of packages are installed. If a shared eggs directory is in use, the wrong eggs will be pulled in from this shared directory and the installation procedure fails. This is a problem whenever someone adds a line like this to their .buildout/
Globally sharing eggs can be useful. It also breaks the isolation assumption that some buildouts have. It would be nice if we could have another level of isolation: isolation per "framework" (or perhaps per index). eggs-directory (and perhaps the download cache as well) could then be different for each framework. Grok could then happily share eggs in ~buildout/
One solution to do this with existing buildout technology would be to create a default.cfg which has something
like this:
[grok-dir]
path = /home/faassen/
and then in a specific grokproject-
[buildout]
eggs-directory = ${grok-dir:path}
(not sure whether the grok-dir part needs to be on the parts line here)
This would fail however if there were *no* default.cfg that defined grok-dir. We cannot move the [grok-dir] section into the project's buildout either as this would create a hardcoded path inside buildout.cfg.
We could resolve this by adding something like 'shared-
In default.cfg, we'd have:
[buildout]
shared-
In our own buildout.cfg we'd have:
[buildout]
...
shared-
this would cause the system to look for /path/to/
This way, Grok will put all its eggs in a shared eggs directory shared by all other grok installations on the system, but other buildouts won't be bothered by it, as there'd be no reason to place an egg-directory in buildout.cfg anymore.
Changed in grok: | |
status: | New → Won't Fix |
See also this bug: https:/ /bugs.launchpad .net/grok/ +bug/330480